grub2 doesn’t allow passing arguments to ‘modules’ in multiboot environment

This seamingly reasonable entry will fail to boot (waiting for root filesystem, iirc):

menuentry “Xen 3.2″ {
multiboot (hd0,1)/xen-3.2-1-amd64.gz dom0_mem=256M
module (hd0,1)/vmlinuz-2.6.18-5-xen-amd64 root=/dev/sda2 ro
module (hd0,1)/initrd.img-2.6.18-5-xen-amd64
}

The issue is that the arguments “root=/dev/sda2 ro” do not actually get passed to the kernel. If you’re sufficiently patient and you get dropped to a busybox shell, ‘cat /proc/cmdline’ will demonstrate this. A possible work-around if you build your own kernels is to set the kernel command line options statically at compile time. It’s the very last option under “Processor Type and Features” or whatever (don’t recall exactly).

This strikes me as a pretty crippling limitation of grub2. I hope I’m just missing something that will be obvious in hindsight.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s