The map command is used for disk emulation. It is one of the more complex commands available in Grub4dos - see for grub4dos output when entering the command help map. Using the map command it is possible to -. Boot Windows from a non-first hard disk.
Boot from hard disk images. Boot floppy disk images on a floppyless machine. Create virtual devices accessible from certain operating systems. Boot from ISO images (note - experimental) There are two distinct types of mapping, direct and memory. Direct mapping is generally used for larger images/devices.
If using direct mapping to create a virtual device from a disk image, then the image file must be contiguous (not fragmented). Either of the following programs can be used to defragment a file that is not contiguous -.
Attempting to directly map a non-contiguous file will result in Error 60: File for drive emulation must be in one contiguous disk area, in which case memory mapping or defragmenting the file, and then retrying, should be attempted. Memory mapping, which copies the mapped device/image into memory, is generally used for smaller images - e.g. Floppy disk images. In memory mapping the image file can be non-contiguous. Available system RAM will restrict the size of any image mapped to memory. The 'map' process is implemented using INT 13 - any disk emulation will remain accessible from an OS that uses compatible mode disk access, e.g. DOS and Windows 9x.
The emulation can't however, be accessed from an OS which uses protected mode drivers (Windows NT/2000/XP/Vista, Linux, FreeBSD) once the protected mode kernel file(s) take control. Breaking down these commands line by line, as they would be entered from the command line (above is from a configuration file entry) -.
Grub4dos Installer Download
title Boot Disk Image - description for configuration file entry. This would be omitted when using the command line. map (hd0,0)/win98.ima (fd0) enter - this maps the image file (in this case win98.ima, at the root of first partition on the first hard disk) to the first floppy (fd0). map -hook enter - this command makes the mapping take place immediately.
Until map -hook is entered, all map commands are only recognised from the booted operating system. Once map -hook is executed, mappings become 'global' - they take effect even within Grub4dos.
This in covered in more detail in the following section. If the floppy image fails to boot and you are returned to the command line interface (or menu) the mapping will remain in effect until the map -unhook command is issued. chainloader (fd0)+1 enter - this tells grub4dos to chainload the first sector of the first floppy disk. As the image file has been mapped as (fd0) and the map -hook command has been issued, this will boot the image file. rootnoverify (fd0) enter - this tells grub4dos to make the first (mapped) floppy the ROOT device, without attempting to mount the device. As discussed previously, this can usually be substituted by the 'normal' root command, at least for objects that have standard filesystems, like the floppy in this example. map -floppies=1 enter - this tells grub4dos that it must 'show' just one floppy (the mapped one) to the OS - this can usually be omitted.
The boot command will also need to be executed when using the command line. Grub4dos feedback when entering the above commands from the command line. Booting hard disk images uses the same principles required for booting a floppy disk image. To boot hard disk image PE.ima from the first logical volume on the second hard disk -.
map (hd1,4)/PE.ima (hd0) enter - this maps the image file (in this case PE.img, at the root of first logical volume on the second hard disk) as the first hard disk (hd0). map -hook enter - same usage as in floppy disk image example above.
chainloader (hd0)+1 enter - this tells grub4dos to chainload the MBR of the first hard disk. As the image file has been mapped as (hd0) and the map -hook command has been issued, this will boot the MBR of the image file. rootnoverify (hd0) enter - this tells grub4dos to make the first (mapped) hard disk the ROOT device, without attempting to mount the device. In this case the root command cannot be used as the whole disk cannot be mounted. It would however be possible to use the root command if chainloading a partition within the disk image - e.g. If chainloader command was chainloader (hd0,0)+1, root (hd0,0)+1 could work, provided the partition type was supported. boot enter - boot the chainloaded entry.
When directly mapping a hard disk image the image file must have a valid MBR. An image with multiple partitions should be mapped as a (hd) type device. If the hard disk image file is of a single partition (without MBR), then it should be mapped as a floppy disk. There are a number of examples of direct mapping in the file. Disk Swapping An example of when you might use the map command to change the disk order occurs when booting from a USB device (e.g. Flash drive, or external hard drive).
As the BIOS settings are changed to boot from the USB bus, the internal hard disk would become (hd1). DOS and Windows 9x will not boot from a non-first hard disk, although Windows NT based systems will theoretically boot from a non-first disk the arcpaths in boot.ini will have become invalid when booting from the USB device.
If a windows OS is installed on the internal device it will therefore no longer boot. Another example would be adding a new hard disk to an existing system. If for example the old disk had Windows XP installed - and was moved from 'master' to 'slave' (becoming (hd1)), whilst the new disk was set as 'master' (hd0) and Windows Vista was installed to it, it would no longer be possible to boot Windows XP from the slave disk. It is possible to boot these systems from a non-first hard disk by using the map command to change the disk order (e.g. Remapping (hd1) to (hd0)).
It is possible to 'trick' the system into thinking that device (hd1) is the first hard disk by using the map command. To remap (hd1) as (hd0) and chainload the DOS kernel io.sys, use the commands -. map (hd1) (hd0) enter. root (hd1,0) enter. chainloader /io.sys enter. boot enter NOTE - using the above sequence of commands, the mapping of (hd1) to (hd0) does not take effect until after the boot command has been issued. Although (hd1) has been mapped as (hd0), all references to the actual device remain (hd1) in Grub4dos.
Entering the command find /hd0.tag from the Grub4dos command line will return the device (hd0,0), whilst entering the command find /hd1.tag from the Grub4dos command line will return the device (hd1,0) - see box below. Grub map (hd1) (hd0) grub find /hd0.tag (hd0,0) grub find /hd1.tag (hd1,0) grub root (hd1,0) Filesystem type is fat, partition type 0xe grub chainloader /io.sys Will boot MS-DOS 7.x from drive=0x81, partition=0x0(hidden sectors=0x3f) grub boot Note the output following the chainloader command.from drive=0x81. After booting into DOS the command mbrwizd.exe /list was executed. As you can see from the disk size and filesystem type parameters in figure 1. the device (hd1) is listed as Disk:0 and Disk:1 - the device (hd0) is not visible.
As noted previously, when using the map command the mapping does not take place until after the boot command is issued. Using the command map -hook however, makes any map commands take place immediately. This is best explained by the following example -. map (hd1) (hd0) enter.
map -hook enter. root (hd0,0) enter. chainloader /io.sys enter. boot enter NOTE - using the above sequence of commands, the mapping of (hd1) to (hd0) takes effect immediately after the map -hook command has been issued. Entering the command find /hd0.tag from the Grub4dos command line will result in a 'File not found' error, whilst entering the command find /hd1.tag from the Grub4dos command line will return the devices (hd0,0) and (hd1,0) - see box below.
Grub map (hd1) (hd0) grub map -hook grub find /hd0.tag Error 15: File not found grub find /hd1.tag (hd0,0) (hd1,0) grub root (hd0,0) Filesystem type is fat, partition type 0xe grub chainloader /io.sys Will boot MS-DOS 7.x from drive=0x80, partition=0x0(hidden sectors=0x3f) grub boot Note the output following the chainloader command.from drive=0x80. After booting into DOS the command mbrwizd.exe /list was executed. The results were the same as in the previous example, with the device (hd1) listed as Disk:0 and Disk:1 - and the device (hd0) not visible. To make both hard disks visible in DOS, remap (hd1) as (hd0) and (hd0) as (hd1) by using the command -.
map (hd1) (hd0) enter. map (hd0) (hd1) enter. root (hd1,0) enter. chainloader /io.sys enter.
boot enter NOTE - After entering the commands map (hd1) (hd0) and map (hd0) (hd1), entering find /hd0.tag from the Grub4dos command line will return the device (hd0). Entering find /hd1.tag will return the device (hd1). Once DOS has booted both disks will be accessible, however the physical device (hd1) will be listed as Disk: 0, and the device (hd0) will be Disk: 1 - see figure 2. 'Counters for floppies and harddrives in the BIOS Data Area remain unchanged during the mapping. You should manually set them to proper values with `map -floppies=' and/or `map -harddrives=', especially, e.g., when there is no real floppy drive attached to the mother board. If not doing so, DOS might fail to start.
`map -status' can report the values. Note also that `map -floppies=' and `map -harddrives=' can be used independently without the appearance of mappings.' Memory Mapping Memory mapping uses the same command syntax as the direct mapping examples above, with the addition of the -mem switch. Use,. map -mem (hd0,0)/win98.ima (fd0) enter. map -hook enter. root (fd0) enter.
chainloader (fd0)+1 enter. boot enter When memory mapping is used the disk image file can be non-contiguous. Devices can also be mapped to memory - e.g.
Map -mem (hd0,0)+1 (fd0) (as explained previously, the +1 notation is used in the map command to denote the whole partition). If mapping a disk image of a partition without a MBR to memory, it can be mapped as a (hd) device as the MBR will be created within Grub4dos - based on the partition data. Compressed images can also be used when memory mapping. The images must be compressed with gzip (.gz file extension), which is a freeware opensource compressor. Since many disk images are not 'full', their contents can be compressed with a noticeable compression ratio.
A standard floppy image (1440 Kb) can usually be reduced to a fraction of its original size. The use of compressed images is therefore recommended, as it allows for faster loading and less usage of disk space. Example use for Gzip'ed images -. find -set-root /win98.ima.gz enter. map -mem /win98.ima.gz (fd0) enter. map -hook enter. root (fd0) enter.
chainloader +1 enter. boot enter gzip can be downloaded from. Using gzip to compress the floppy disk image bcdl201a.ima, the image was compressed from 1440kb to 10.4kb. Although Grub4dos only supports the.gz format natively, the memdisk kernel (part of the syslinux project) can be loaded to support.zip compressed images - e.g.
Twilight in hindi dubbed. Also you can Download THE Lord Of The Rings & The Hobbit all in Hindi - Direct Download Link For Twilight. This video is taken from Twilight (2008). ''Twilight'' Bella and Edward First Meeting ''Hindi Dubbed.
The Winimage.imz format. The memdisk kernel can be gzip'ed and loaded from Grub4dos. 'The 'map' process is implemented using INT 13 - any disk emulation will remain accessible from an OS that uses compatible mode disk access, e.g. DOS and Windows 9x. The emulation can't however, be accessed from an OS which uses protected mode drivers (Windows NT/2000/XP/Vista, Linux, FreeBSD) once the protected mode kernel file(s) take control.'
This means that there is no way (at present) to install Windows using Grub4dos ISO emulation. Also, it is not possible to boot a Windows PE (Preinstallation Environment) boot disc image, unless the image is RAM disk based. RAM disk based discs include Windows PE 2/2.1 and builds that utilise ramdisk.sys and setupldr.bin files from windows 2003 server SP1 source (see and ). The majority of Linux based CD images will also fail to work with Grub4dos ISO emulation. Linux distributions require kernel and initrd files to be specified, as soon as these files are loaded the protected mode kernel driver(s) take control and the virtual CD will no longer be accessible.
If any other files are required from the CD/DVD they will be missing, resulting in boot error(s). Linux distributions that only require kernel and initrd files function fully via iso emulation, as no other data needs accessing from the virtual CD/DVD drive once they have been loaded - INT 13 access works until these files are loaded and is then not required. Some CD/DVD-ROM (ISO9660) images (see exceptions above) can be mapped as the device (hd32), and booted using the following commands (replace (device)/path/file.iso with the relevant path/filename) -. map (device)/path/file.iso (hd32) enter. map -hook enter. root (hd32) enter. chainloader (hd32) enter - this can be substituted with chainloader enter, as the root device was set in the previous command.
boot enter There are different types of CD boot emulation, including floppy emulation - in which the boot sector of the CD is a bootable floppy disk image. The boot sector is not accessible when viewing the CD in a file manager such as Windows Explorer and might appear to be a blank disk if no files are contained on the disc root. In the following test an image was taken of a CD containing a DOS boot disk based bootsector, with various DOS utilities on the CD (not in the boot sector image). When booting this setup from a real CD, the bootsector image is allocated as the A: drive, and the CD-ROM (and files at the root of the CD) is allocated the next available drive letter. The CD image file (hd0,0)/dos.iso was booted using the commands above, this resulted in the following Grub4dos output.
Grub map (hd0,0)/dos.iso (hd32) grub map -hook grub root (hd32) Filesystem type is iso9660, using the whole disk grub chainloader (hd32) Load segment: 0x0 System Type: 0x0 Sector Count: 0x1 Load RBA: 0x3E Boot Type: 2 = 1.44M floppy grub boot The CD appeared to boot normally. The CD bootsector image was loaded and allocated the A: drive letter and the CD-ROM was allocated as E: drive. Unfortunately attempting to access any files on the E: drive (the root of the CD image) resulted in an error. The file suggests the following when using DOS.google for ELTORITO.SYS and use it in CONFIG.SYS as a device driver for the virtual cdrom. Example usage of eltorito.sys in CONFIG.SYS: device=eltorito.sys /D:oemcd001 Corresponding MSCDEX command which can be placed in AUTOEXEC.BAT: MSCDEX /D:oemcd001 /L:D NOTE - if mkisofs –iso-level 4 command has been used to create the.iso image (as is normal with PE builds), MSCDEX.EXE should not be used - replace with SHSUCDX (see ).
Edited config.sys and autoexec.bat and injected the amended files (and eltorito.sys) into the boot image, before rebuilding dos.iso. The remastered CD-ROM was booted, as before the bootsector itself was accessible however the root of the CD was not.
Also suggests replacing (hd32) with (0xFF), e.g. map (device)/path/file.iso (0xFF) enter. map -hook enter. root (0xFF) enter.
chainloader (0xFF) enter or chainloader enter as root has already been set. boot enter When mapping the.iso containing eltorito.sys in the bootsector as device (0xFF), the CD-ROM booted and both the bootsector image and the root of the CD were accessible.
The above example illustrates some of the complexities of CD-ROM Emulation. For working examples see this thread Nested Mapping. Using recent versions of Grub4dos it is possible to map an image from another mapped image - this is sometimes referred to as double mapping.
The UBCD project, for example, utilises a bootable CD containing bootable floppy disk images. Using the CDROM Emulation discussed above, it is possible to map a UBCD.iso file as (hd32), then map a floppy image from (hd32) as device (fd0), then boot from the newly mapped floppy image. map -mem (hd0,0)/ubcd34-basic.iso (hd32) enter. map -hook enter.
map -mem (hd32)/IMAGES/MAXBLAST.IGZ (fd0) enter. map -hook enter. root (fd0) enter. chainloader +1 enter. boot enter.
Note from Grub4dos author tinybit - there is no limit to the depth of the nest when using this form of mapping. Expanding on the example above, it would be possible to map another image from within the mapped device (fd0). map -mem (hd0,0)/ubcd34-basic.iso (hd32) enter.
map -hook enter. map -mem (hd32)/IMAGES/MAXBLAST.IGZ (fd0) enter. map -hook enter. map -mem (fd0)/floppy.img.gz (fd1) enter. map -hook enter.
root (fd1) enter. chainloader +1 enter. boot enter.
GRUB4DOS can boot off DOS / LINUX, or via Windows boot manager / syslinux / lilo, or from MBR / CD. It also has builtin BIOS disk emulation, ATAPI CDROM driver, etc.
GRUB4DOS can be easily run via command-line so you can take it for a test drive to see what it's all about! GRUB4DOS can boot off DOS / LINUX, or via. GRUB4DOS can boot off DOS / LINUX, or via Windows boot manager / syslinux / lilo, or from MBR / CD. It also has builtin BIOS disk emulation, ATAPI CDROM driver, etc. GRUB4DOS can be easily run via command-line so you can take it for a test drive to.,.