40_custom for Natty Narwhal 11.04 fails

Asked by Paul Loughman

Just installed Natty Narwhal 11.04 Alpha 3 as my third Kubuntu OS this afternoon. I edited the /etc/grub.d/40_custom files in Lucid and Maverick, including what should be the required entry for Natty. This is what the Lucid /etc/grub.d/40_custom file looks like:

menuentry "Ubuntu, Maverick Meerkat"{
   set root='(hd0,7)'
   configfile /boot/grub/grub.cfg
}
menuentry "Ubuntu, Natty Narwhal"{
   set root='(hd0,9)'
   configfile /boot/grub/grub.cfg
}

And this is what the Marverick /etc/grub.d/40_custom file looks like:

menuentry "Ubuntu, Lucid Lynx"{
   set root='(hd0,1)'
   configfile /boot/grub/grub.cfg
}
menuentry "Ubuntu, Natty Narwhal"{
   set root='(hd0,9)'
   configfile /boot/grub/grub.cfg
}

Lucid's Grub2 is the controlling Grub (it's installed to the MBR). After booting into Lucid I ran sudo update-grub. I rebooted into Maverick and did the same (ran sudo update-grub). Natty appears in the Grub Menu of each. However, selecting Natty from either Lucid or Maverick results in the following errors:

error: file not found
error: file not found
error: unknown command 'background_color'.
error: unknown command 'lua'.
syntax error
Incorrect command

Press any key to continue...
Pressing any key returns me to the Grub menu.

I activated 30_os-prober in Lucid and Maverick and reran sudo update-grub, adding Natty to the ### BEGIN /etc/grub.d/30_os-prober ### section of grub.cfg in Lucid and Maverick. Selecting Natty from there, Natty boots correctly. This is the Natty stanza in ### BEGIN /etc/grub.d/30_os-prober ### of Lucid's and Maverick's grub.cfg:

menuentry "Ubuntu, with Linux 2.6.38-5-generic (on /dev/sda9)" {
   insmod ext2
   set root='(hd0,9)'
   search --no-floppy --fs-uuid --set 67532fdd-10e6-47bf-9ac3-26a52581799a
   linux /boot/vmlinuz-2.6.38-5-generic root=UUID=67532fdd-10e6-47bf-9ac3-26a52581799a ro quiet splash vt.handoff=7
   initrd /boot/initrd.img-2.6.38-5-generic
}
menuentry "Ubuntu, with Linux 2.6.38-5-generic (recovery mode) (on /dev/sda9)" {
   insmod ext2
   set root='(hd0,9)'
   search --no-floppy --fs-uuid --set 67532fdd-10e6-47bf-9ac3-26a52581799a
   linux /boot/vmlinuz-2.6.38-5-generic root=UUID=67532fdd-10e6-47bf-9ac3-26a52581799a ro single
   initrd /boot/initrd.img-2.6.38-5-generic
}

What is wrong with the Natty stanza in the 30_os-prober files? The Lucid and Maverick stanzas work just fine.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Paul Loughman
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Log a bug is all I can suggest. Natty is NOT ready and NOT stable and there will be lots of bugs and glitches to iron out.

Revision history for this message
Paul Loughman (snowhog) said :
#2

Found the answer using Google.

This is what you have to put in the 40_custom file in order to get the Grub Menu for Natty:

menuentry "Ubuntu, Natty Narwhal"{
   insmod ext2
   set root='(hd0,9)'
   multiboot /boot/grub/core.img
}

It's specifically the multiboot line that does it. I'm not sure that the insmod ext2 line is needed - haven't tested without it - but the answer I found via Google included it so...