laptop fails to boot; grub2 sees garbage in /boot/grub/grub.cfg

Bug #570686 reported by Marius Gedminas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: grub2

My sister installed Ubuntu 9.10 on her laptop using Wubi. The boot sequence is MBR -> NTLDR -> Grub2 -> Ubuntu. It worked fine after initial installation. After a couple of Ubuntu kernel updates, new kernels stopped booting (Grub2 complained "must load a kernel first"), but old kernels still worked. After my attempts to fix the boot process by running

  sudo apt-get install linux-image-2.6.31-21-generic --reinstall

grub2 no longer even shows the boot menu; it just beeps, shows three errors, then immediately clears the screen (helpful, that) and gives me a grub2 shell.

The shell has (hd0,1)/ubuntu/disks/root.disk mounted on (loop0), and I can do things like ls /boot/grub, cat /boot/grub/grub.cfg (full of binary garbage!), and even boot the OS by typing fun-and-user-friendly-commands like

  linux /boot/vmlinuz-2.6.31-19-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro
  initrd /boot/initrd-2.6.31-19-generic
  boot

If I try -21-generic instead of -19-generic, Linux fails to boot (after complaining that initrd could not be uncompressed and then failing to mount the root filesystem and panicking).

If I boot from a LiveCD, mount the NTFS filesystem, then loop-mount /media/disk/ubuntu/disks/root.disk, I can look at /boot/grub/grub.cfg (it looks fine, no binary garbage in sight) or unpack the initrd with cd /tmp; zcat /boot/initrd-2.6.31-21-generic|cpio -i (again, no errors).

Could it be that grub2's ext4 support is buggy? E.g. the grub.cfg file -- it starts with valid commands, I assume (since loop0 is mounted and root set to it), then continues with binary garbage that I do not see if I loop-mount the ext4 fs image after booting a LiveCD.

I'm not even sure it's pristine grub2 that I'm using here; how exactly does Wubi chain-load from NTLDR to Grub?

Revision history for this message
Karl Larsen (klarsen1) wrote :

  Sounds to me the problem here is Wubi. We are are all using Grub2 and ext4 since 9.10 in standard partitions with few problems. No sign of the problems in this bug.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

https://bugs.launchpad.net/ubuntu/+source/lupin/+bug/477169/comments/110 is very similar to what I'm seeing, so this is probably a duplicate of bug 477169

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Bug 477169 comment #210 redirects to https://bugs.edge.launchpad.net/ubuntu/+source/grub2/+bug/477104/comments/90, and that workaround works for me.

AFAICT that fix is released to karmic-proposed; I didn't try enabling the repository and upgrading since replacing c:\wubildr directly from Windows was simpler.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.