Showing posts with label GRUB2. Show all posts
Showing posts with label GRUB2. Show all posts

Sunday, August 22, 2010

Boot from USB Flash Without BIOS Support Using Plop via GRUB2

As result of an accident the netbook has gone to the heaven in the crisis time, so I've turned FreeNAS box to a normal PC with dual boot (Linux and FreeNAS) for working. Unfortunately, the DVD ROM has gone to the heaven, too. There are not to much options:
  1. Dual boot, each OS on their disk. Needs 2 devices, not my case.
  2. Dual boot on the same disk, still available, but requires skill and time [1].
  3. Boot FreeNAS from USB stick.
The last choice is the most convenient, but BIOS doesn't support booting from USB. Fortunately, there are boot managers, which fill this hole. Plop [2] has many features, many options and well-documented, so I chose it.
The system is running Linux, booted via GRUB2. If you like me don't want to destroy GRUB(2), you can run Plop from GRUB(2). You need to download the program, unzip and copy the boot manager binary program plpbt.bin to /boot, then add the following entry to GRUB2 configuration file (/boot/grub/grub.cfg):

# Boot Plop Boot Manager
menuentry "Plop Boot Manager" {
set root='(hd0,3)' #Change to your boot partition
linux16 /boot/plpbt.bin
}

Hold down Shift key while GRUB2 is booting to get its menu, then you can run Plop, from where FreeNAS on USB Flash can be booted.

See [3] for FreeNAS installation on USB Flash. Get the "embedded" (img) file instead of iso.

P.S. of course this is temporary solution. The better is CF to IDE adapter usage.

1. FreeNAS forum on sf.net
2. Plop boot manager
3. FreeNAS USB installation

Wednesday, August 18, 2010

Boot System Rescue CD from ISO image on the disk with Grub2

"SystemRescueCd is a (Gentoo) Linux system rescue disk available as a bootable CD-ROM or USB stick for administrating or repairing your system and data after a crash." The latest version include many administration tool of both CLI and GUI. If you frequently use SystemRescueCd, you may want to boot it directly from Grub2.
From version 2 GRUB can provide the GREAT loopback option, in co-junction with whom some Linux Live CD distributions (grml, SystemRescueCd, etc) provide direct boot (iso9660) ISO via their options — isofrom, findiso, isoloop and some others. Option isoloop is only supported in SystemRescueCd from version 1.4.0.
The ISO is in (hd0,3)/ISOs/. grub.cfg has the following entry:

# Boot system rescue CD from ISO
menuentry "System Rescue CD from ISO" {
loopback loop (hd0,3)/ISOs/res-1.5.8.iso
linux (loop)/isolinux/rescuecd isoloop=/ISOs/res-1.5.8.iso setkmap=us
initrd (loop)/isolinux/initram.igz
}

grub.cfg contains the global option set root='(hd0,3)', so boot script will search the ISO image in /dev/sda3 partition in the path specified after isoloop option.

Read more:
1. Boot the SystemRescueCD ISO image from the disk using Grub2
2. Boot an ISO via Grub2
3. MultiBoot USB with Grub2 (boot directly from iso files)