My desktop system has a BIOS that makes booting from USB drives cumbersome. The only way I have found to make it work is to plug in the USB drive, power on the computer, press 'delete' to enter BIOS, change the hard drive boot priority to raise the flash drive (which is detected as a hard drive) to the top, then save and reboot. Once I remove the flash drive, BIOS forgets about it, so I have to go through this process on every boot. While I can easily boot from a CD, I would like to add modules and don't like waiting for all of the files to load from the CD while the system is booting and running. Thus, I have decided on a frugal installation (i.e. running Porteus from the compressed modules, with the files on a hard drive instead of a flash drive or CD).
I also have Windows XP Pro installed on this machine, and in the past my own mistakes in playing with Linux bootloaders have broken my Windows installations, so I want to avoid tampering with the normal course of business (I don't want to put grub on my first hard drive's MBR and use it to boot Windows). The solution I have derived is a little convoluted, but gives me the flexibility I want while leaving little room to bork Windows.
Here's an overview of how this setup works:
I set my BIOS to boot from CD first, and the first hard drive (dedicated to Windows) after that. I then insert a grub boot CD, with a menu.lst that chainloads to Windows by default (so Windows always starts if I take no action at boot time -- thus the Windows users in my household don't wind up in Linux if I accidentally leave the CD in the drive), with a second option that chainloads to my second hard drive (dedicated to Linux). I have left my Windows bootloader alone, and installed grub to the same partition on my second hard drive where my Porteus files are located. When I select Linux from the CD's bootloader menu, I get a second menu that gives me several options to boot Porteus.
If you're familiar with grub, you might be wondering why I am chainloading to an additional grub installation on my second hard drive, rather than simply booting Porteus from grub on the CD. While this is certainly possible and would avoid the need to install grub on any hard drive partitions (I'll give an example of a menu.lst entry for this method below), I chose to chainload so that I don't have to burn a new boot CD every time I make a change to my linux install that would require modifications to the menu.lst. In other words, by chainloading to a second grub install, I have a second menu.lst that is on writeable media.
Steps to implement:
First, I downloaded the Porteus ISO images (I want to have both 32 and 64 bit editions installed) and extracted the contents to my target drive (/mnt/sdb3/32/ and /mnt/sdb3/64/).
Then, following the instructions from this page: http://porteus.org/info/docs/37-install ... drive.html, I installed the grub txz package (while in Porteus booted from a CD), copied the grub files to my target Porteus partition (/mnt/sdb3/boot/grub), and installed the grub bootloader to that partition with the following commands:
Code: Select all
root (hd1,2)
setup (hd1,2)
I then generated a menu.lst for the grub install on my Porteus partition, at /mnt/sdb3/boot/grub/menu.lst:
Code: Select all
# This is a sample menu.lst file. You should make some changes to it.
# The old install method of booting via the stage-files has been removed.
# Please install GRLDR boot strap code to MBR with the bootlace.com
# utility under DOS/Win9x or Linux.
color blue/green yellow/red white/magenta white/magenta
timeout 30
default /default
title Porteus xfce 32-bit
root (hd1,2)
kernel /32/boot/vmlinuz from_dev=UUID:602fc913-daa4-4314-b3cd-2764fc973289 from_dir=/32/porteus/ vga=791 toroot xfce
initrd /32/boot/initrd.xz
title Porteus xfce 64-bit
root (hd1,2)
kernel /64/boot/vmlinuz from_dev=UUID:602fc913-daa4-4314-b3cd-2764fc973289 from_dir=/64/porteus/ vga=791 toroot xfce
initrd /64/boot/initrd.xz
title first hard drive (Windows)
rootnoverify (hd0,0)
makeactive
chainloader +1
title reboot
reboot
title halt
halt
With grub now installed and configured and the Porteus files in place, all that was left was to build the grub boot CD. For this, I followed the instructions found in the legacy grub manual, here: http://www.gnu.org/software/grub/manual ... CD_002dROM
Prior to generating the iso, I inserted the following menu.lst to the iso files:
Code: Select all
# This is a sample menu.lst file. You should make some changes to it.
# The old install method of booting via the stage-files has been removed.
# Please install GRLDR boot strap code to MBR with the bootlace.com
# utility under DOS/Win9x or Linux.
color blue/green yellow/red white/magenta white/magenta
timeout 3
default /default
title Windows
root (hd0,0)
makeactive
chainloader +1
title Linux
root (hd1,2)
makeactive
chainloader +1
title reboot
reboot
Some other useful menu.lst entries:
Boot Porteus files that are placed in a folder on the Windows partition (C:\portdata -- first drive, first partition), from a grub CD:
Code: Select all
title Porteus
root (hd0,0)
kernel /portdata/boot/vmlinuz from_dir=/portdata/porteus/ vga=791
initrd /portdata/boot/initrd.xz
Code: Select all
title Windows
root (hd1,0)
map (hd1,0) (hd0,0)
map (hd0,0) (hd1,0)
makeactive
chainloader +1
I've played with grub a little bit now...if others have questions or would like to see more examples, let me know and I'll see what I can add in.