by admin
Tai Grub4dos
Some thoughts about successfully booting ISO image files with Grub4dos (G4D)
Prerequisites:
1. ISO image file is bootable at all (keywords: emulation or no-emulation boot).
2. ISO image file is on a G4D aware storage medium (Floppy, CD, Harddisk) with (sufficient large) file system (FAT 16, FAT32, NTFS, EXT2/3, ISO9660), which is supported by G4D ('root'-mountable)
or ISO image file is on the BIOS selected booting device ( e.g USB Flash Devices, booting as HDD or Superfloppy, which are totally ignored, if not booting as active boot device).
N.B.: You are more or less a hostage of your BIOS manufacturer concerning BIOS behaviour, when booting a (special) device. Some programmers do their work remarkably well, others leave a disaster. Unfortunately, it's a normal fact, that one system boots flawlessly your device, whereas the other does not.
The main issues with ISO images
1. ISO image files have to be contiguous (not fragmented within a file system), so that they can be mapped as a virtual G4D device (hd32/0xA0 to hd127/0xFF). Memory mapping might be an alternative for very small images, but not for big ones.
2. ISO image files most often contain dependencies (e.g Squashfiles, Virus Definitions or alike), which are loaded, when their Kernel/initial ramdisk took the lead. G4D real mode mapping is no more operant then. So the kernel has to know, how to find its dependencies. In worst case, it only looks for real CD/DVD devices, so that even unpacking the whole ISO image would fail. If it searches at least on other harddisks for the missing files, unpacking just the dependencies would be sufficient to get it working. This might be an interesting feature for an old system, which has an USB connector, but cannot boot from it : just put kernel and initial ramdisk on your active G4D bootable HDD and let Linux kernel load the dependencies from the attached USB Flash device (needs not to be bootable). The good news is, that more and more Live Distros, however, are able to find their dependencies on ISO images as well, so that you can work directly from ONE file. The bad news is, that the majority needs a special kernel parameter to tell the system, where to find the ISO image ... and that YOU have to care about the correct syntax. Since the inherent boot menu of the ISO image does NOT necessarily need this parameter, chainloading by G4D is most often pointless.
How to get it working
It's your task to find out, which kernel parameters and arguments are necessary. If the developers are user-friendly, they store an appropriate document on the ISO image, which explains ALL parameters and gives examples. Sometimes you only find an (un)sorted collection of parameters with no comments or a changelog, where you find a hint in line 556, that ISO image boot feature was added. If these sources are 'dry', you should search and/or ask in our forum. If you are a Linux freak, risk a look on initrd(.gz). This is most often a (gzipped) CPIO file or a (gzipped) EXT2 file system image. Unpack it/mount it and look for the bootup shell script (on / or /etc). You might know its name, if there's a kernel parameter 'boot=<name>'. Open the script with an editor and let it search for '/proc/cmdline'. It should be part of a case ... esac command, where multiple parameters are treated. If the syntax isn't clear at first glance, inspect the script for the variables, which were created (possible questions : Do I need a preceeding slash in a path? Do I need a device name / UUID? Do I need more than one parameter ?). To get other important parameters, you always should edit the menu script file on the ISO image (folder /isolinux or /boot or /boot/grub etc.), because not all parameters appear in the bootup script. Perhaps you may easily localize your distro without annoying dialogues. Be aware, that ANY developer is free to choose name and syntax of ANY parameter used in his own script files. So successful solutions for one distro might not work at all for all others.
Other aspects
1. Not all Live CD distros support (actual) NTFS !
2. ISO image files tend to have tapeworm like file names. Shorten them appropriately, especially if you add a path to a subfolder. There might be a 32 character name limit by some file systems.
Sample 'menu.lst' item
Note, that G4D 'sees' the files and folders on the mapped ISO image as it would do on a real CD. So you have to use the whole CD path to address the kernel/initrd files.
Prerequisites:
1. ISO image file is bootable at all (keywords: emulation or no-emulation boot).
2. ISO image file is on a G4D aware storage medium (Floppy, CD, Harddisk) with (sufficient large) file system (FAT 16, FAT32, NTFS, EXT2/3, ISO9660), which is supported by G4D ('root'-mountable)
or ISO image file is on the BIOS selected booting device ( e.g USB Flash Devices, booting as HDD or Superfloppy, which are totally ignored, if not booting as active boot device).
N.B.: You are more or less a hostage of your BIOS manufacturer concerning BIOS behaviour, when booting a (special) device. Some programmers do their work remarkably well, others leave a disaster. Unfortunately, it's a normal fact, that one system boots flawlessly your device, whereas the other does not.
The main issues with ISO images
1. ISO image files have to be contiguous (not fragmented within a file system), so that they can be mapped as a virtual G4D device (hd32/0xA0 to hd127/0xFF). Memory mapping might be an alternative for very small images, but not for big ones.
2. ISO image files most often contain dependencies (e.g Squashfiles, Virus Definitions or alike), which are loaded, when their Kernel/initial ramdisk took the lead. G4D real mode mapping is no more operant then. So the kernel has to know, how to find its dependencies. In worst case, it only looks for real CD/DVD devices, so that even unpacking the whole ISO image would fail. If it searches at least on other harddisks for the missing files, unpacking just the dependencies would be sufficient to get it working. This might be an interesting feature for an old system, which has an USB connector, but cannot boot from it : just put kernel and initial ramdisk on your active G4D bootable HDD and let Linux kernel load the dependencies from the attached USB Flash device (needs not to be bootable). The good news is, that more and more Live Distros, however, are able to find their dependencies on ISO images as well, so that you can work directly from ONE file. The bad news is, that the majority needs a special kernel parameter to tell the system, where to find the ISO image ... and that YOU have to care about the correct syntax. Since the inherent boot menu of the ISO image does NOT necessarily need this parameter, chainloading by G4D is most often pointless.
How to get it working
It's your task to find out, which kernel parameters and arguments are necessary. If the developers are user-friendly, they store an appropriate document on the ISO image, which explains ALL parameters and gives examples. Sometimes you only find an (un)sorted collection of parameters with no comments or a changelog, where you find a hint in line 556, that ISO image boot feature was added. If these sources are 'dry', you should search and/or ask in our forum. If you are a Linux freak, risk a look on initrd(.gz). This is most often a (gzipped) CPIO file or a (gzipped) EXT2 file system image. Unpack it/mount it and look for the bootup shell script (on / or /etc). You might know its name, if there's a kernel parameter 'boot=<name>'. Open the script with an editor and let it search for '/proc/cmdline'. It should be part of a case ... esac command, where multiple parameters are treated. If the syntax isn't clear at first glance, inspect the script for the variables, which were created (possible questions : Do I need a preceeding slash in a path? Do I need a device name / UUID? Do I need more than one parameter ?). To get other important parameters, you always should edit the menu script file on the ISO image (folder /isolinux or /boot or /boot/grub etc.), because not all parameters appear in the bootup script. Perhaps you may easily localize your distro without annoying dialogues. Be aware, that ANY developer is free to choose name and syntax of ANY parameter used in his own script files. So successful solutions for one distro might not work at all for all others.
Other aspects
1. Not all Live CD distros support (actual) NTFS !
2. ISO image files tend to have tapeworm like file names. Shorten them appropriately, especially if you add a path to a subfolder. There might be a 32 character name limit by some file systems.
Sample 'menu.lst' item
Note, that G4D 'sees' the files and folders on the mapped ISO image as it would do on a real CD. So you have to use the whole CD path to address the kernel/initrd files.
Edited by COD11, 20 December 2010 - 09:46 PM.