Click to See Complete Forum and Search --> : grub bootable cd problem


exsencon
02-25-2008, 07:39 PM
Newbie to linux and to this forum
My system: dell inspiron 1501 laptop,120GB HD, 2GBRam, AMD turion 64x2
I installed a dual boot between WinXP and Ubuntu 7.10 a few weeks ago and it is running very well.
Grub is in the MBR and doing it's job.
I thought it would be nice to have a grub boot cd as I plan to install other linux on an external USB harddrive (later!)
So I followed the grub official howto and made a iso image with the eltorito file in it and burned it to a cd (RW cautiously!) because this is the first time I did it in a linux OS.
Of course I wanted to try my new grub boot cd,so I put it in my laptop, got the grub prompt and I couldn't boot the ubuntu but could boot Win without a problem (very insulting)
For Windows I do:

root (hd0,1) that's where windows is
makeactive
chainloader +1
boot

And up it goes. Windows booting from grub,a good feeling!

For my Ubuntu I do:

root (hd0,4) that's where it is supposed to be from the menu.lst
kernel /root/vmlinuz-2.6.22-14 generic root (and a long list of letters and numbers all in the menu.lst)
I get: error: file not found. I did it several times to rule out a typo.
I also tried to put in
root=/dev/sda5 where it is supposed to be but I get the same error.

Reading every booting tip (almost) on this forum I tried

configfile (hd0,4)/boot/grub/menu.lst

and then i get my usual grub menu, I do enter to boot my linux and I get:

Error25 Disk read error

The only thing I can do is to pull out the cd and reboot and then I get my standard dual boot menu from grub and I boot in linux or Windows.

The boot cd is only half working in that it lets me boot into WinXP but not into linux.
I don't know what goes wrong, especially when you are supposed to boot everything with it.

I put in my fdisk and geometry

fdisk
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0f4738c

Device Boot Start End Blocks Id System
/dev/sda1 1 14 112423+ de Dell Utility
/dev/sda2 * 15 7107 56974522+ 7 HPFS/NTFS
/dev/sda3 14202 14593 3148740 db CP/M / CTOS / ...
/dev/sda4 7108 14201 56982555 5 Extended
/dev/sda5 7108 8143 8321638+ 83 Linux
/dev/sda6 8144 8653 4096543+ 82 Linux swap / Solaris
/dev/sda7 8654 14201 44564278+ 83 Linux

Partition table entries are not in disk order
Geometry:

grub> geometry (hd0)
drive 0x80: C/H/S = 14593/255/63, The number of sectors = 234441648, /dev/sda
Partition num: 0, Filesystem type unknown, partition type 0xde
Partition num: 1, Filesystem type unknown, partition type 0x7
Partition num: 2, Filesystem type unknown, partition type 0xdb
Partition num: 4, Filesystem type is ext2fs, partition type 0x83
Partition num: 5, Filesystem type unknown, partition type 0x82
Partition num: 6, Filesystem type is ext2fs, partition type 0x83

menu.lst

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=6ac75234-c42f-4332-ab42-3aaf8b8efa92 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=6ac75234-c42f-4332-ab42-3aaf8b8efa92 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,4)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Dell Utility Partition
root (hd0,0)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1

Any suggestions, did I do something wrong, bad cd...
Thanks

bwkaz
02-25-2008, 08:02 PM
kernel /root/vmlinuz-2.6.22-14 generic root (and a long list of letters and numbers all in the menu.lst)
I get: error: file not found. I did it several times to rule out a typo. Well, there's still a typo there. Kernels are in /boot, not in /root. ;)

(This is assuming that the root partition of your Ubuntu install is actually (hd0,4) (aka /dev/hda5 or /dev/sda5), because otherwise the /boot part may not be necessary. It depends on how Ubuntu set up its partitioning.)

I also tried to put in
root=/dev/sda5 where it is supposed to be but I get the same error. That's a kernel command line option, not anything that grub can understand. :)

exsencon
02-26-2008, 09:26 AM
Well, there's still a typo there. Kernels are in /boot, not in /root. ;)

(This is assuming that the root partition of your Ubuntu install is actually (hd0,4) (aka /dev/hda5 or /dev/sda5), because otherwise the /boot part may not be necessary. It depends on how Ubuntu set up its partitioning.)

That's a kernel command line option, not anything that grub can understand. :)

Yes, that was a typo in my post only, when I did the line in the grub prompt it was correct "boot"
However there was another typo in the line at the end,so now I used the tab key to let linux do most of the typing work (no typos)
the lines are now:

root (hd0,4)
kernel /boot/vmlinuz-2.6.22-14-generic /root/dev/sda5/ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
boot

And it boots...and it stalls everytime in midway.
I get some message about modules not found and reverting to shell and then i get a initramfs. when I do help I get a lot of commands to use but since I don't know them it's no use really.
So I pull out the cd and boot normally with my grub menu.
I thought I had figured it out but now it stalls. I don't know why really because since the linux is firing up already the boot cd has nothing to do with it anymore (I think) :(
Any suggestions?
Thanks

exsencon
02-26-2008, 03:24 PM
Well I got it together I think.
The kernel command line should read
> kernel /boot/vmlinuz-2.6.22-14-generic ro root=/dev/sda5 quiet splash
the "ro" should be in front of the root statement.Maybe it starts to write to early and that makes it stall.
Anyway I booted 4 times like this with my boot cd and it works perfectly now.
I do still have a question though. WindowsXP boots readily with very simple commands (root-makeactive-chainloader-boot) while for linux you have to point it at the kernel and the intrd file. Is this because the menu.lst file is not on the cd? If I understand this well (after reading up on the howtos on this forum) putting the menu.lst file on the boot cd would make it easier but the boot cd would be distro-specific and could not be used for another distro and/or PC?
I like to understand things and that's why I like this forum!
I feel the more I understand linux the more I like it. I think I'll be back many times when I start putting distro's on my external USB disk!

bwkaz
02-26-2008, 08:18 PM
kernel /boot/vmlinuz-2.6.22-14-generic /root/dev/sda5/ro quiet splash Assuming this isn't another typo, simply remove the slash between sda5 and ro (make it a space), and replace /root with root=. (So it should look like root=/dev/sda5 ro instead of what you posted.) ;)

kernel /boot/vmlinuz-2.6.22-14-generic ro root=/dev/sda5 quiet splash Yep, like I just said. :p

the "ro" should be in front of the root statement. The order of arguments doesn't matter. What matters is where the spaces and slashes are (and whether you use /root or root=). :)

I do still have a question though. WindowsXP boots readily with very simple commands (root-makeactive-chainloader-boot) while for linux you have to point it at the kernel and the intrd file. That's because the XP kernel isn't booted directly from grub (because nobody has tried to figure out how to do it, and it's completely undocumented), while Linux can be (and usually is).

However, you don't have to boot the Linux kernel directly; you can always chainload the grub that's already installed. saikee has done that sort of thing a few times, where he has something like 70-odd OSes installed on a single machine, and chains grub menus together to organize them. Anyway, you can do the same sort of exercise as with XP (though you don't need "makeactive", and AFAIK you don't need "boot" either, but that might be wrong): make the partition that grub was installed to the root, then "chainloader +1" it. :)

exsencon
02-26-2008, 08:44 PM
Thanks a lot for your comments. I got it now just like you said and in working order!
Reading up on Saikee's multiple boot stuff. I might need him shortly!