Fun with grub2

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Fun with grub2

Post 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
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

you need to load the linux kernel first

Post 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.
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

References

Post by ^rooker »

User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

booting Jaunty from with scan-iso, drops to busybox

Post 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*
Post Reply