Page 1 of 1

Fun with grub2

Posted: Sun Oct 11, 2009 7:36 pm
by ^rooker
Here are a few notes I've collected trying to build the computer scientist's holy grail:
A multi-boot USB stick with lots of ISOs on it.

I've decided to give grub2 a try, because of its "loop" (loopback) function for ISOs.

Problem #1:
Unknown command: kernel
I've copy/pasted a grub1 "menu.lst" and modified it to be a grub2 "grub.cfg". The old entry for booting memtest had a line like this:

Code: Select all

kernel /boot/memtest.bin
Which should for grub2 be changed to:

Code: Select all

linux /boot/memtest.bin

you need to load the linux kernel first

Posted: Sun Oct 11, 2009 8:05 pm
by ^rooker
Problem #2
When trying to boot a GRML iso (thanks Mika), I ran into the following message:
you need to load the linux kernel first
Solution 1
The iso was broken (my fault). Check your ISO and simply replace it with a good copy.

Solution 2
I've still had a "kernel ..." line in a menuentry in my grub.cfg. Replace the word "kernel" with "linux" and you're set.

References

Posted: Sun Oct 11, 2009 9:45 pm
by ^rooker

booting Jaunty from with scan-iso, drops to busybox

Posted: Mon Oct 12, 2009 10:35 pm
by ^rooker
Problem #3
Using exactly the same /boot/grub/grub.cfg, known to work on another USB stick, I'm dropped to a busybox prompt instead of booting the live CD graphical environment when booting from an external 2.5" harddisk over USB.

According to the "Debugging Casper" entry in the Ubuntu wiki, I've added the "debug=" option to the boot parameters in the "linux ..." line in grub.

When being dropped to the busybox prompt (showing the text "(initramfs)"), I've checked the casper.log:

Code: Select all

cat /casper.log
It seems that it was unable to mount the filesystem the ISO was on:
Could not find the ISO /boot/iso/ubuntu-9.04-desktop-i386.iso This could also happen if the file system is not clean because of an operating system crash, an interrupted boot process, or an improper shutdown, or unplugging of a removeable device without first unmounting or ejecting it. To fix this, simply reboot into Windows let it fully start, log in, run 'chkdsk /r', then gracefully shut down and reboot back into Windows. After this you should be able to reboot again and resume the installation.
I've done filesystem checks on the ext3 and vfat partition (were mixed on the drive), but that did not fix the problem.

Additional strange error message are in casper.log:
cannot open /dev/sdb: no such file
Unfortunately, /dev/sdb *is* exactly the external HDD I'm trying to boot from. It seems to be a strange racing condition, because at the initramfs prompt I can access and mount /dev/sdb and all its partitions without problems.

I get the feeling it's related to Bug #363038. Even if it's claimed to be fixed. The descriptions there are just too similar. Unfortunately, the boot option "rootdelay=xxx" did not work for me. :(

Also, descriptions about boot problems in a post by user 'locutus42'' at the ubuntuforums.org, contains similar same error messag
Touch: /var/run/lupin-waited-for-dev no such file for directory
stdin: error 0
Strange... the Karmic .iso boots fine, although similar error message are visible during the boot process.

It's sooo weird! The Jaunty .iso boots fine from a 2GB USB stick, but not from my external usb HDD.

[ASSUMPTION]
I really think it's a racing condition, because the HDD seems to be re-initialized when the installer boot searches for USB devices. I guess that "hickup" causes /dev/sdb to disappear for exactly that amount of time the initramfs part looks for the iso. *sigh*