Logical partitions on USB stick
I've hit a snag in my project. I have an 8Gb USB memory stick and I have one FAT partition of 2GB for shared data and GRUB. Then I have multiple ext2 partitions for loading various Linux distro "Live CDs", utility disks, and some full installs of small distros. I want a fully bootable install of each in its own partition, so that I can use your chainloader scheme to start any of them from one GRUB menu.
The plan is working fine with Puppy Linux in Partition #2 and System Rescue CD in Partition #3. I converted the ISOLINUX from the Live CD to EXTLINUX on the USB partition. These two both work fine with the GRUB chainloader. It is after that where I run into trouble.
Partition #4 is the Extended partition that houses the Logical partitions, #5, #6, #7, #8, etc. When I use the same EXTLINUX method to load a Live CD (Ubuntu, for example) into one of these Logical partitions, it refuses to boot from the GRUB chainloader. I can put a full stanza into GRUB (title, root, kernel, initrd) and they will then boot up just fine. But when I try to use the chainloader, I just get a "Boot error" with no error code or other information.
The reason that I wanted to use the chainloader command is partly for consistency, and partly because on some Live CDs, I have not been able to figure out what to put into the full GRUB stanza to get it to boot correctly. Take Ultimate Boot CD for example, I can't find a description anywhere of what would go into a GRUB menu to start that CD.
It seems like the EXTLINUX should boot from the GRUB chainloader, but it is only working for me in the two Primary Partitions (#2 and #3), not in any of the Logical Partitions. Since you are clearly using the chainloader command to boot from many Logical Partitions on your hard disks, I was hoping that you might be able to give me a clue as to where to look for a solution on my USB stick drive.
Thanks,
Employing your scheme on a USB Flashdrive!
First of all, I am so glad that i stumbled upon your posts Saikee. I have become an instant fan of your posts and you are a celebrity in my world. Your instructions are clear and precise. I am pretty new to linux but am so deeply in love with it that I am posting this at 4:30am in the morning... lol... I go crazy about linux...
Anyhow, the problem:
I wish to create a bootable USB flash drive with dual/triple boot with various small distros such as DSL, Knoppix, INSERT.
So I took a 512MB Kingston SD Card, shoved it in a USB card reader and deleted whatever partition was there by default.
Using fdisk, i created two primary partitions for now. The first partition (sdb1), 10MB in size is FAT16, the second partition (sdb2), 60MB in size (for DSL) is ext3. The remaining space is empty for now.
I love your scheme of installing grub into it's own partition, hence I made the Fat16 partition.
I created /boot/grub dir structure in /dev/sdb1 and copied all the files from /usr/share/grub/i386-redhat/ into /boot/grub/
Then on my Centos system, I typed:
grub
root (hd1,0)
setup (hd1)
quit
Now, when I plug this USB into my thinkpad and boot from USB, I get the grub prompt. So far it's all good.
Next, I copy the 'boot' dir and 'KNOPPIX' dir that reside inside the dsl-4.4.10.iso image into /dev/sdb2 (the 60MB ext3 partition).
On /dev/sdb1, i create a menu.lst under /boot/grub/ and type this inside this file:
title Damn Small Linux
root (hd1,1)
chainloader +1
Save, exit, plug this USB into thinkpad and boot from USB, i still get the grub prompt. Shouldn't it show me the menu, or since there is only one item in menu.lst, boot directly into DSL. What am I doing wrong?
Thanks a lot in advance.
P.S. My Linux System is a Centos 5.2 running as a Virtual Machine on XP Host (VMware Workstation). Intel Core 2 Duo E8400, 4GB RAM.