View previous topic :: View next topic |
Author |
Message |
sentenza n00b
Joined: 05 Dec 2002 Posts: 30
|
Posted: Sat Feb 11, 2006 12:32 am Post subject: Can't boot with an external log |
|
|
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
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!!! 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 |
|
|
widan Veteran
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Sat Feb 11, 2006 1:56 am Post subject: Re: Can't boot with an external log |
|
|
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 |
|
|
sentenza n00b
Joined: 05 Dec 2002 Posts: 30
|
Posted: Mon Feb 13, 2006 12:45 pm Post subject: |
|
|
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
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 |
|
|
tsteiner n00b
Joined: 14 Sep 2006 Posts: 1
|
Posted: Thu Sep 14, 2006 3:02 pm Post subject: Patch for linuxrc |
|
|
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 |
|
|
|
|
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
|
|