On Wed, Feb 16, 2011 at 12:11 PM, Pierre Lorenzon <
[email protected]> wrote:

>
> Hi all,
>
> Here is my grub.cfg on an usb stick :
>
> >>>  -- grub.cfg
>
> #
> # DO NOT EDIT THIS FILE
> #
> # It is automatically generated by /usr/sbin/grub-mkconfig using templates
> # from /etc/grub.d and settings from /etc/default/grub
> #
>
> ### BEGIN /etc/grub.d/00_header ###
> set default=0
> set timeout=5
> ### END /etc/grub.d/00_header ###
>
> ### BEGIN /etc/grub.d/10_linux ###
> menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6" {
>        insmod ext2
> #       set root=(hd4,1)
>        search --fs-uuid 310c5993-4d9c-436a-82e6-165f00df18f0 --set root
>        linux   /boot/vmlinux-2.6.32.8-lfs-6.6 rootwait
> }
> menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6 (recovery mode)" {
>        insmod ext2
> #       set root=(hd4,1)
>        search --fs-uuid 310c5993-4d9c-436a-82e6-165f00df18f0 --set root
>        linux   /boot/vmlinux-2.6.32.8-lfs-6.6 rootwait single
> }
> ### END /etc/grub.d/10_linux ###
>
> ### BEGIN /etc/grub.d/30_os-prober ###
> ### END /etc/grub.d/30_os-prober ###
>
> ### BEGIN /etc/grub.d/40_custom ###
> # This file provides an easy way to add custom menu entries.  Simply type
> the
> # menu entries you want to add after this comment.  Be careful not to
> change
> # the 'exec tail' line above.
> ### END /etc/grub.d/40_custom ###
>
>
> >>>  -- End grub.cfg
>
> There's no root= option on the kernel line since this stick has
> to be used on an arbitrary machine and the root partition will
> have an undeterminated name. I thought that if no root= is
> specified the kernel takes the partition were it is located as
> root partition.
>
> Anyway I suspect that without root= option, the rootwait option
> has no effect since last time it boots very fast apparently
> without waiting. And with an usb stick if it does not wait the
> drive may not be available. Has this rootwait option any effect
> if and only if the root= option is present ?
>
> Yuou might say that I only have to indicate the root by its
> uuid on the kernel line but, this seems to be possible only if
> an initrd is used. And I would greatly prefer not to have to
> setup an initrd.
>
> Any suggestion ?
>
> Thanks in advance !
>
> Pierre
> --
> http://linuxfromscratch.org/mailman/listinfo/blfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
>

you may have to resort to building a initrd or a initramfs.  Without one,
you need to specify a partition.

just consider it like a "mini" linux system that can run a small bash
script, which could find your usb stick, mount it, and continue.  there is a
command called switch_root that is very useful for this.  At that stage
too,  you can use UUID's if you have a linux environment to work with.

Documentation/kernel-parameters.txt in the linux kernel may have other
options that I am unaware of, but afaik, root= can only be given devices.

there was a way to determine what your boot device was in /sys, but I
believe you still need a initrd/initramfs to take advantage of this.

-- 
Nathan Coulson (conathan)
------
Location: British Columbia, Canada
Timezone: PST (-8)
Webpage: http://www.nathancoulson.com
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to