Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't boot with an external log
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
sentenza
n00b
n00b


Joined: 05 Dec 2002
Posts: 30

PostPosted: Sat Feb 11, 2006 12:32 am    Post subject: Can't boot with an external log Reply with quote

Hi,

I'm trying to boot on an xfs filesytem with an external log. It worked for months, but was a little tricky to boot as i needed a rootflags kernel parameter to specify the external log device. I was using still using devfs, and i had to use /dev/ide/host0/bus1/target0/part2 because /dev/hdc2 won't work (i think this is because devfsd does not run before init).

So it looks like this in grub.conf:
Code:
kernel /bzImage2.6.12 root=/dev/sdb2 rootflags="logdev=/dev/ide/host0/bus1/target0/part2" rootfstype=xfs


And works fine. There is a real performance gain to use an external log on a second device. But now comes udev :D

I updated recently and devfs don't work anymore. Ok that's fine for me, check udev version, compile latest kernel, install, boot ... Bang, Can't find root device!!! :x I can see that all my partitions are detected earlier, so i'm not missing any driver or something like that. I not sure if it don't find my root or my logdev. I've tried:

Code:
kernel /bzImage2.6.15 root=/dev/sdb2 rootflags="logdev=/dev/hdc2" rootfstype=xfs


No luck. So i tried genkernel to get an initrd with udev already activated before mounting my real root. However it seems you can't pass rootflags parameter to your real root, it is only passed to the initrd. Opening the initrd shell, i can mount my root fs with :

Code:
mount -t xfs /dev/sdb2 -o "logdev=/dev/hdc2" /


So does any one know how to pass the rootflags parameters to my real root, or perhaps how to customize the initrd to mount the root fs with options?

Thanks
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Sat Feb 11, 2006 1:56 am    Post subject: Re: Can't boot with an external log Reply with quote

sentenza wrote:
So does any one know how to pass the rootflags parameters to my real root, or perhaps how to customize the initrd to mount the root fs with options?

Unpack the initramfs that genkernel made (look here for the script needed to extract it), and edit the init file in it. Find the point where it mounts $REAL_ROOT, and add your options there. Make this line:
Code:
mount -o rw ${REAL_ROOT} ${NEW_ROOT}

Into that one:
Code:
mount -t xfs -o rw,logdev=/dev/hdc2 ${REAL_ROOT} ${NEW_ROOT}

Then rebuild the initramfs and put it back in /boot (keep a backup of the old one just in case).
Back to top
View user's profile Send private message
sentenza
n00b
n00b


Joined: 05 Dec 2002
Posts: 30

PostPosted: Mon Feb 13, 2006 12:45 pm    Post subject: Reply with quote

Thanks,

It did it... I still can't understand why i have to use an initramfs, as the kernel find my devices with no problem 8O

Perhaps it would be a good idea to add a real_rootflags parameter interpreted in the initramfs, i'll try to contact genkernel developpers about it...

Anyway, thanks to you widan...
Back to top
View user's profile Send private message
tsteiner
n00b
n00b


Joined: 14 Sep 2006
Posts: 1

PostPosted: Thu Sep 14, 2006 3:02 pm    Post subject: Patch for linuxrc Reply with quote

I've submitted a patch that adds support for a real_rootflags boot parameter to the bugzilla thread.

All you should have to do to enable it is use the patch against /usr/share/genkernel/generic/linuxrc and then use genkernel to rebuild your initramfs image.
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