There are a lot of answers and tutorials how to fix this but I was not able to apply any of the solutions in my case.
Here is my situation:
- I have perfectly working Ubuntu 12.04
- I have installed Ubuntu 14.04
- the error occurred when I am trying to boot 14.04 (the 12.04 is working fine)
I have usb stick with 14.04 and working 12.04 so I am able to apply fixes or debug further.
Running sudo grub-update
gives me:
> Generating grub.cfg ... Found linux image:
> /boot/vmlinuz-3.5.0-52-generic Found initrd image:
> /boot/initrd.img-3.5.0-52-generic Found linux image:
> /boot/vmlinuz-3.5.0-46-generic Found initrd image:
> /boot/initrd.img-3.5.0-46-generic Found linux image:
> /boot/vmlinuz-3.5.0-45-generic Found initrd image:
> /boot/initrd.img-3.5.0-45-generic Found linux image:
> /boot/vmlinuz-3.5.0-23-generic Found initrd image:
> /boot/initrd.img-3.5.0-23-generic Found memtest86+ image:
> /boot/memtest86+.bin Found Ubuntu 14.04 LTS (14.04) on /dev/sda6
> done
One of the solution I have try was to press e
on the grub menu
and replace the ID with /dev/sda6
, but nothing change.
What is causing the issue and is there an easy way to fix the grub using the 12.04?
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 0970394e-13f2-47c9-979e-c93cb6eef06d
linux /boot/vmlinuz-3.5.0-52-generic root=UUID=0970394e-13f2-47c9-979e-c93cb6eef06d ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.5.0-52-generic
}
--
search --no-floppy --fs-uuid --set=root 0970394e-13f2-47c9-979e-c93cb6eef06d
echo 'Loading Linux 3.5.0-52-generic ...'
linux /boot/vmlinuz-3.5.0-52-generic root=UUID=0970394e-13f2-47c9-979e-c93cb6eef06d ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.5.0-52-generic
--
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 0970394e-13f2-47c9-979e-c93cb6eef06d
linux /boot/vmlinuz-3.5.0-46-generic root=UUID=0970394e-13f2-47c9-979e-c93cb6eef06d ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.5.0-46-generic
}
--
search --no-floppy --fs-uuid --set=root 0970394e-13f2-47c9-979e-c93cb6eef06d
echo 'Loading Linux 3.5.0-46-generic ...'
linux /boot/vmlinuz-3.5.0-46-generic root=UUID=0970394e-13f2-47c9-979e-c93cb6eef06d ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.5.0-46-generic
--
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 0970394e-13f2-47c9-979e-c93cb6eef06d
linux /boot/vmlinuz-3.5.0-45-generic root=UUID=0970394e-13f2-47c9-979e-c93cb6eef06d ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.5.0-45-generic
}
--
search --no-floppy --fs-uuid --set=root 0970394e-13f2-47c9-979e-c93cb6eef06d
echo 'Loading Linux 3.5.0-45-generic ...'
linux /boot/vmlinuz-3.5.0-45-generic root=UUID=0970394e-13f2-47c9-979e-c93cb6eef06d ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.5.0-45-generic
--
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 0970394e-13f2-47c9-979e-c93cb6eef06d
linux /boot/vmlinuz-3.5.0-23-generic root=UUID=0970394e-13f2-47c9-979e-c93cb6eef06d ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.5.0-23-generic
}
--
search --no-floppy --fs-uuid --set=root 0970394e-13f2-47c9-979e-c93cb6eef06d
echo 'Loading Linux 3.5.0-23-generic ...'
linux /boot/vmlinuz-3.5.0-23-generic root=UUID=0970394e-13f2-47c9-979e-c93cb6eef06d ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.5.0-23-generic
--
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root ee707b14-31a7-4f86-a6e5-1b9aa38bdd68
linux /boot/vmlinuz-3.13.0-30-generic root=UUID=ee707b14-31a7-4f86-a6e5-1b9aa38bdd68 ro nomodeset quiet splash $vt_handoff
initrd /boot/initrd.img-3.13.0-30-generic
}
--
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root ee707b14-31a7-4f86-a6e5-1b9aa38bdd68
linux /boot/vmlinuz-3.13.0-30-generic root=UUID=ee707b14-31a7-4f86-a6e5-1b9aa38bdd68 ro nomodeset quiet splash $vt_handoff
initrd /boot/initrd.img-3.13.0-30-generic
}
--
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root ee707b14-31a7-4f86-a6e5-1b9aa38bdd68
linux /boot/vmlinuz-3.13.0-30-generic root=UUID=ee707b14-31a7-4f86-a6e5-1b9aa38bdd68 ro recovery nomodeset nomodeset
initrd /boot/initrd.img-3.13.0-30-generic
}
--
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root ee707b14-31a7-4f86-a6e5-1b9aa38bdd68
linux /boot/vmlinuz-3.13.0-24-generic root=UUID=ee707b14-31a7-4f86-a6e5-1b9aa38bdd68 ro nomodeset quiet splash $vt_handoff
initrd /boot/initrd.img-3.13.0-24-generic
}
--
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root ee707b14-31a7-4f86-a6e5-1b9aa38bdd68
linux /boot/vmlinuz-3.13.0-24-generic root=UUID=ee707b14-31a7-4f86-a6e5-1b9aa38bdd68 ro recovery nomodeset nomodeset
initrd /boot/initrd.img-3.13.0-24-generic
}
Two possible causes for the above error are (assuming install is not completely broken):
a) Grub is not loading the correct root for booting of 14.04
b) The entry for root in 14.04 install's fstab and/or initrd is broken.
Given the comments in question, it looks unlikely that a) would be the cause. Reason being that replacing with root=/dev/sda6 in grub did not help. The 12.04 grub entries look correct, but it is likely that the actual grub install is currently is from 14.04 (can be checked from entries shown in front grub boot page would be of 14.04 and 12.04 will be in alternative screen). So replacing with 12.04 grub can be tried first though, as mentioned, it is likely not the problem. From working 12.04 environment:
Do confirm that grub has some timeout set to enable selecting an option:
sudo gedit /etc/default/grub
, both GRUB_HIDDEN_TIMEOUT and GRUB_TIMEOUT should be non-zero say 10 (for 10secs timeout), and then runsudo update-grub
. Reboot will now show 12.04 in the front boot screen while 14.04 will be in the alternative screen. If 14.04 now works then we are done and can just install 14.04's grub by runningsudo grub-install /dev/sda
from 14.04 environment. Otherwise we will try to fix b) as mentioned next.There are two ways to go about b). One is to boot from live CD, mount existing install and then fix it. Other is to fix from the working 12.04 install. I will elaborate on 2nd, though 1st option will be fairly similar with the only difference being booting into live CD instead of existing 12.04 install.
After booting into 12.04, first drop into root shell to avoid repeated
sudo
invocations:sudo -i
.Now we will mount the 14.04 install somewhere (say
/mnt/trusty
) andchroot
into it which will make the 14.04 install as the new root for that shell (and effectively make the shell as 14.04 one). In the old Linux days this was mostly sufficient to operate in a 14.04 environment from a shell, but in newer kernels most of the device files in/dev
have become dynamic and replaced by theudev
daemon, so it requires manual creation of many things first. However, for our purposes of fixing the fstab/initrd it should be fine as is. Still we will have to do a couple of things to avoid warnings/errors -- copy current mtab and mount proc.At this point we are ready to check and fix fstab, before
chroot
ing, then regenerate 14.04 kernel's initrd image. So open it:gedit /mnt/trusty/etc/fstab
and check that the first uncommented line has the correct UUID for mount point of root (/). In this case we have seen that UUID of 14.04's root /dev/sda6 isee707b14-31a7-4f86-a6e5-1b9aa38bdd68
, so check that fstab also says the same else correct the UUID, save fstab and close. Now we can regenerate the initrd:This should end without errors. Then unmount /proc, logout from
chroot
environment and unmount 14.04:Now reboot and try starting 14.04. If it now starts fine, then replace with 14.04's grub as mentioned before:
sudo grub-install /dev/sda
from 14.04 environment. Also will be a good idea to regenerate initrd from within 14.04 environment just in case the chrooted environment had some differences:sudo update-initramfs -k all -c
.I got the same error message and nothing helped. In my case, the error turned out to be corruptions the file system. It was failing to read from the disk.
I fixed it by running fsck on my linux drives (/dev/sdaN) with the -f option. That way I forced fsck to check the drive for errors (and not just read the flag from the last check) and manually corrected the errors it found.
Once the errors were fixed, my system was back online after a reboot. I hope this helps.