Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Boot with/without USB disks attached: genkernel,...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
gentoo_fragen
n00b
n00b


Joined: 18 Jan 2007
Posts: 4

PostPosted: Sat Jan 20, 2007 1:45 pm    Post subject: [solved] Boot with/without USB disks attached: genkernel,... Reply with quote

Hello!

First the program versions:
genkernel-3.4.5-r1
udev-103
gentoo-sources-2.6.18-r6
grub-0.97-r3

I would like to use the links created by udev for my harddisk within the booting process, e.g.
/dev/disk/by-id/scsi-SATA_ST3250824AS_XXXXXXXX-part7

grub.conf:
Code:

# For booting GNU/Linux
title  Gentoo Linux 2.6.18-r6-udev
root (hd0,5)
kernel /boot/kernel-genkernel-x86-2.6.18-gentoo-r6 init=/linuxrc root=/dev/ram0 ramdisk=8192 real_root=/dev/disk/by-id/scsi-SATA_ST3250824AS_XXXXXXXX-part7 udev vga=extended
initrd /boot/initramfs-genkernel-x86-2.6.18-gentoo-r6


instead of:
Code:
kernel /boot/kernel-genkernel-x86-2.6.18-gentoo-r6 init=/linuxrc root=/dev/ram0 ramdisk=8192 real_root=/dev/sda7 udev vga=extended

Now it seems that udev is not included in the initramfs created by genkernel.

The reason for trying this is: If I attach a USB stick or harddisk before booting, the naming of the devices for the different harddisk gets mixed up: The USB disk is now /dev/sda instead of the SATA harddisk.

How can I get this configuration to work?

Thanks for your help!


Last edited by gentoo_fragen on Wed Jan 24, 2007 11:40 am; edited 1 time in total
Back to top
View user's profile Send private message
gentoo_fragen
n00b
n00b


Joined: 18 Jan 2007
Posts: 4

PostPosted: Tue Jan 23, 2007 11:45 pm    Post subject: [solved] real_root=LABEL=/ instead of udev Reply with quote

The solution is using real_root=LABEL=/ in grub.conf

udev is not needed.

First attach a label (e.g. "/") to the root disk:
e2label /dev/sda7 /

Then change the grub.conf:
Code:

kernel /boot/kernel-genkernel-x86-2.6.18-gentoo-r6 init=/linuxrc root=/dev/ram0 ramdisk=8192 real_root=LABEL=/ udev vga=extended


genkernel has to be called with the option:
--disklabel

Unfortunately this option is not mentioned in the man page. With genkernel --help you get:
--disklabel Include disk label and uuid support in your initrd

http://gentoo-wiki.com/HOWTO_Initramfs states that this should not work!?!
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Wed Jan 24, 2007 4:32 am    Post subject: Reply with quote

If the wiki is incorrect and the functionality does in fact work, flag it. Or, if you can, check whether the description matches current releases and make a note about known working versions.

Also, to flag a topic [solved], edit the topic head post and add it to the subject.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum