|
Saturday, 04 April 2009 13:25 |
Parted Magic can be booted with grub4dos iso emulation.
You can use the pmagic-4.0.iso from the pmagic-4.0.iso.zip or pmagic-grub4dos-4.0.iso.zip archive. The pmagic-4.0.iso from the pmagic-4.0.iso.zip archive uses isolinux as bootloader, the pmagic-4.0.iso from the pmagic-grub4dos-4.0.iso.zip archive uses grub4dos as bootloader.
When you want to use grub4dos iso emulation without adding extra parameters to the Parted Magic kernel, you can only put the iso only in a few locations, namely /, /images/ and /pmagic/ else Parted Magic won't find the iso which is needed to access the rest of the files.
Grub4dos can use 2 distinct types of mapping: direct and memory mapping:
Direct mapping: When the booted operating system makes a read or write call to the direct mapped image (iso, floppy or hard disk image), then the read or write calls will access and modify the data inside the image directly. Those changes are permanent. With direct access, only the parts of the image, accessed by the booted operating system are read, unlike with memory mapping.
For direct mapping the image needs to be contiguous (not fragmented). If you attempt to directly map an non-continuous file, grub4dos will reply:
| Error 60: File for drive emulation must be in one contiguous disk area |
Use one of the following programs to defragment the file and try again afterwards:
- contig: a command line tool for defragmenting single files
- wincontig: a GUI tool for defragmenting single files
title Parted Magic 4.0 (iso in / and direct mapping) find --set-root /pmagic-4.0.iso map /pmagic-4.0.iso (hd32) map --hook root (hd32) chainloader (hd32)
|
title Parted Magic 4.0 (iso in /images/ and direct mapping) find --set-root /images/pmagic-4.0.iso map /images/pmagic-4.0.iso (hd32) map --hook root (hd32) chainloader (hd32)
|
title Parted Magic 4.0 (iso in /pmagic/ and direct mapping) find --set-root /pmagic/pmagic-4.0.iso map /pmagic/pmagic-4.0.iso (hd32) map --hook root (hd32) chainloader (hd32)
|
The chainloader (hd32) command will boot the bootsector of the iso, which will in turn boot the actual iso.
- When you use the pmagic-4.0.iso from the pmagic-4.0.iso.zip, the chainloader (hd32) command will start isolinux from the iso.
- When you use the pmagic-4.0.iso from the pmagic-grub4dos-4.0.iso.zip, the chainloader (hd32) command will start the grub4dos on the iso.
For both pmagic-4.0.iso variants, you also start the grub4dos menu with:
title Parted Magic 4.0 (iso in / and direct mapping and loading new grub4dos configfile) find --set-root /pmagic-4.0.iso map /pmagic-4.0.iso (hd32) map --hook root (hd32) configfile /boot/grub/grub4dos.lst
|
In this case, no other bootloader takes over the command. So in this case, the /boot/grub/grub4dos.lst config file, will be loaded by the grub4dos version with which you mapped the iso.
This will also work when you have memory mapped the iso.
Memory mapping: The whole image (iso, floppy or hard disk image) will be first copied to RAM (slow for large images, when your BIOS only supports USB1.1). Any changes made, to this memory mapped image, by the booted operating system, will be lost after a reboot. For memory mapping, the image doesn't need to be contiguous.
title Parted Magic 4.0 (iso in / and memory mapping) find --set-root /pmagic-4.0.iso map --mem /pmagic-4.0.iso (hd32) map --hook root (hd32) chainloader (hd32)
|
title Parted Magic 4.0 (iso in /images/ and memory mapping) find --set-root /images/pmagic-4.0.iso map --mem /images/pmagic-4.0.iso (hd32) map --hook root (hd32) chainloader (hd32)
|
title Parted Magic 4.0 (iso in /pmagic/ and memory mapping) find --set-root /pmagic/pmagic-4.0.iso map --mem /pmagic/pmagic-4.0.iso (hd32) map --hook root (hd32) chainloader (hd32)
|
Moving the pmagic-4.0.iso file: If you want to put the iso in another directory than /, /images or /pmagic, then you have to pass the directory location of the iso to the Parted Magic kernel (iso_location= parameter).
title Parted Magic 4.0 (iso is located at /custom, direct mapping and booting the kernel) find --set-root /custom/pmagic-4.0.iso map /custom/pmagic-4.0.iso (hd32) map --hook root (hd32) kernel /pmagic/bzImage noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 sleep=10 loglevel=0 keymap=us iso_location=/custom initrd /pmagic/initramfs map --unmap=0:0xff | Everything in red needs to be on one line.
Renaming the pmagic-4.5.iso file: If you want to rename the
pmagic-4.5.iso to another filename, you have to pass the filename to
the Parted Magic kernel (iso_filename=) parameter. Suppose you have renamed it to pm.iso and did put it in a subdir "/custom".title Parted Magic 4.5 (pm.iso is located at /custom, direct mapping and booting the kernel) find --set-root /custom/pm.iso map /custom/pm.iso (hd32) map --hook root (hd32) kernel /pmagic/bzImage noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 sleep=10 loglevel=0 keymap=us iso_filename=/custom/pm.iso initrd /pmagic/initramfs map --unmap=0:0xff
|
Everything in red needs to be on one line. Leading slashes aren't needed:
iso_filename=/custom/pm.iso is the same as iso_filename=custom/pm.iso iso_filename=pm.iso is the same as iso_filename=/pm.iso The iso_filename and iso_location parameter can be combined: "iso_filename=pm.iso iso_location=/custom" is the same as "iso_filename=/custom/pm.iso".
Links: Download grub4dos: Use the last release 0.4.4 (older releases don't support all commands). Also take a look at a grub4dos guide.
|
|
Last Updated on Sunday, 20 September 2009 23:42 |