Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

grub settings to boot from USB CDROM

53 views
Skip to first unread message

blac...@yahoo.com

unread,
Nov 2, 2005, 3:09:23 PM11/2/05
to
In order to upgrade my small Lapotop (Portege without internal floppy
nor CDROMs) I'd like to configure grub in order to allow me to boot
from the new opensuse installation CDROM.

As my external USB CDROM is shown on my Portege (from my installed
Linux kernel 2.6) as /dev/sr0 I configured a new entry in my grub menu
as

kernel (hd0,0)/vmlinuz root=/dev/sr0 showopts ide=nodma apm=off
acpi=off vga=normal barrier=off 3

initrd (hd0,0)/initrd-cdrom

where initrd-cdrom is the initrd file I copied from the opensuse file
/boot/loader/initrd

Now, when I boot my laptop with this grub entry, the sistem boots but
immediately the kernel panic with the following message:

- not syncing: No init found. Try passing init= option to the kernel


What I'm missing? (I did it once but now I'm probably to tired to find
it out)

Do you have any suggestion?

thanks,
Timur

Douglas Mayne

unread,
Nov 2, 2005, 5:14:00 PM11/2/05
to

Caveat: I am not running Suse.

Does your laptop boot from the external CDROM? That is the simplest
solution, if it will do it; otherwise, read below.

I downloaded the "internet installation boot image" for OpenSuse 10, for
simple testing.

I mounted the image to see what files it uses to boot:
mount -o loop boot.iso /mnt/cdrom

I found these files:
/mnt/cdrom/boot/loader/isolinux.cfg

Above says it should work with the files below. There are also some
failsafe settings you might need (look at the file). At a minimum you
will need these files:

/mnt/cdrom/boot/loader/linux
/mnt/cdrom/boot/loader/initrd

I copied the files to the local hard disc and modified the grub menu,

mkdir /boot/suse
cp /mnt/cdrom/boot/loader/linux /boot/suse
cp /mnt/cdrom/boot/loader/initrd /boot/suse

A new stanza for grub's menu.lst:
title SuSE setup
root (hd0,0)
kernel /boot/suse/linux
initrd /boot/suse/initrd

Reboot. If all works out, it will recognize your USB CD ROM and you can
install from there.

blac...@yahoo.com

unread,
Nov 3, 2005, 8:04:25 AM11/3/05
to

Douglas Mayne wrote:
>
> Does your laptop boot from the external CDROM? That is the simplest
> solution, if it will do it; otherwise, read below.
>

Unluckly it doesn't.

>
> Above says it should work with the files below. There are also some
> failsafe settings you might need (look at the file). At a minimum you
> will need these files:
>
> /mnt/cdrom/boot/loader/linux
> /mnt/cdrom/boot/loader/initrd
>
> I copied the files to the local hard disc and modified the grub menu,
>
> mkdir /boot/suse
> cp /mnt/cdrom/boot/loader/linux /boot/suse
> cp /mnt/cdrom/boot/loader/initrd /boot/suse
>
> A new stanza for grub's menu.lst:
> title SuSE setup
> root (hd0,0)
> kernel /boot/suse/linux
> initrd /boot/suse/initrd
>

That's exactlty what I was doing (even if my description was not as
clear as your)... what I found out is that the provided initrd does not
contain modules for USB cdrom. I'll generate a new one using mkinitrd
in order to do that.

thanks for confirming that I was following a correct approach.

regards,
blackdir

Douglas Mayne

unread,
Nov 3, 2005, 9:30:50 AM11/3/05
to

The parameters you entered for your kernel (original post) don't look
right to me, especially root=/dev/sr0. That alone could account for the
kernel panic.

When I boot the kernel designed for Suse setup (as shown above), I clearly
see "loading USB" support. If your CD is supported and you have Suse
setup CD1 in the drive, setup will begin.

blac...@yahoo.com

unread,
Nov 3, 2005, 10:07:28 AM11/3/05
to
Maybe I didn't understand your suggestion, but if I do not load
/dev/sr0 as root filesystem, how can I expect my Linux installation to
use my CDROM? wouldn't it default to /dev/hda i.e. will boot my
installed distribution and not the one on CD?

I was under the impression that the kernel panic was generated by the
fact that my system was not able to read from /dev/sr0 due to lack of
modules... (unluckely I will be able to test this again when I'm back
home tonight)

blackdir

Douglas Mayne

unread,
Nov 3, 2005, 10:31:02 AM11/3/05
to

The kernel which is copied to the hard disc (/boot/suse/linux) is the
Suse setup kernel. Don't use another kernel which might be on your
system. The setup kernel will read modules from its initrd
(/boot/suse/initrd). Don't use or make another initrd which might be
on your system. Try to boot /*exactly*/ as I did, using the Suse tools.

If you want to get into the technical details about linux startup, then
this is a good resource:
http://www.tldp.org/HOWTO/Bootdisk-HOWTO/x88.html

That documenent explains that the kernel parameter, root=, defines where
the kernel should look for a root filesystem to mount and look for the
program init. Without specifying these kernel parameters with the loader
(grub, in this case), the kernel will use its internal defaults. rdev
is a command which which will display the internal kernel settings
(man rdev). In any case, the internal defaults must be correct because
it boots without any parameters.

blac...@yahoo.com

unread,
Nov 4, 2005, 3:33:50 AM11/4/05
to

Douglas Mayne wrote:

> >
> The kernel which is copied to the hard disc (/boot/suse/linux) is the
> Suse setup kernel. Don't use another kernel which might be on your
> system. The setup kernel will read modules from its initrd
> (/boot/suse/initrd). Don't use or make another initrd which might be
> on your system. Try to boot /*exactly*/ as I did, using the Suse tools.
>

Thank you very much for your suggestion: It worked!
I assume then that the SUSE setup program is included in the supplied
initrd (6.5MB)

thank you again for your patience.

regards,
blackdir

Nico Kadel-Garcia

unread,
Nov 4, 2005, 8:10:36 AM11/4/05
to

<blac...@yahoo.com> wrote in message
news:1131093230.2...@g14g2000cwa.googlegroups.com...

Bingo. If you happen to require drivers that are *not* in that initrd or
that kernel, then life gets interesting. I ran headlong into that with a
particular SATA controller and SuSE 9.1. SuSE has a structure for loading
additional drivers at install time, but it takes some work to implement and
is very fragile if you updte the kernel at any time.


0 new messages