PDA

View Full Version : [SOLVED] 14.10 upgrade mangled grub, boot repair fails



hailholyghost
January 27th, 2015, 03:09 AM
Hello,

I attempted an upgrade from 14.04 to 14.10 and paused in the middle of the upgrade. Foolish, I know.

I cannot boot into my Ubuntu partition, though my data is still there.

I first attempted to fix with boot-repair ISO, but this failed. It did produce, this logfile, however: http://paste.ubuntu.com/9874720/ I later tried this with boot repair in live CD, which also failed.

When I attempt to boot from Ubuntu in the boot menu, I only see Windows loaders. I should mention that my Windows 8.1 partition has been unaffected by this mistake.

Under UEFI boot, I tried to boot into GRUB 2.02-beta2-15 and I can find my boot.cfg

I attempted this series of commands in the grub terminal:



set prefix=(hd0,gpt8)/boot/grub
set root=(hd0,gpt8)
linux /vmlinuz root=/dev/sda8 ro
initrd /initrd.img
boot

but this does not help me to boot my linux partition back up again.

I have run out of ideas, except another wipe of the Ubuntu partition.

Any help is very much appreciated.

thank you in advance,
-DEC

oldfred
January 29th, 2015, 11:20 PM
You are not showing any kernels, so os-prober has nothing to find. Script does not always find everything, but if os-prober is not finding them, then you need to install kernel.

Boot-Repair can help you chroot into your system. I think the full uninstall and reinstall of grub will also add a kernel but make sure by running this when inside the chroot.

# is comment do not copy or type when chrooted.
apt-get update #resync package index

apt-get upgrade #newest versions of all packages, update must be run first
#would upgrade you to the latest kernel in the repositories
#dist-upgrade is also able to remove existing packages if required
apt-get dist-upgrade
dpkg --configure -a

Slightly updated chroot to also mount the efi partition with UEFI:
efi chroot:
sudo mount /dev/sda2 /mnt #sda2 is my root partition
sudo mount /dev/sda1 /mnt/boot/efi #sda1 is my efi partition
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo cp /etc/resolv.conf /mnt/etc/ #makes the network available after chrooting
sudo chroot /mnt
apt-get install --reinstall grub-efi-amd64

or alternatively:
apt-get install --reinstall grub-efi
update-grub




Older Manual chroot commands, if not using Boot-Repair.

drs305 chroot to purge & reinstall grub2
http://ubuntuforums.org/showthread.php?t=1581099
kansasnoob- full chroot one line version with &&---- change sda3 to your install
http://ubuntuforums.org/showpost.php?p=8068512&postcount=10

hailholyghost
January 31st, 2015, 11:16 PM
hi oldfred, thank you so much! I would've replied earlier but I am very busy with my job during the week.

unfortunately, I am unable to mount when I run ubuntu from live USB. The terminal gives the error 'mount: can't find /dev/sda8 in etc/fstab' There is no root partition. Grub cannot list /dev/sda8 unknown filesystem.

Whatever happened, my laptop is seriously damaged. The only alternatives I can see are a complete wipe of my windows partition as well, or buying a new laptop altogether. All my files are backed up so it shouldn't cause too much damage.

is there any other alternative, so I can still run Ubuntu on my laptop?

thanks,
-Dave

oldfred
February 1st, 2015, 05:32 PM
You should have sda8, how were you mounting it?
It would not be automatically mounted from live installer.

Or is error from a reboot?

From live installer's terminal, post your commands and errors. If longer use code tags or # icon in advanced editor.

hailholyghost
February 7th, 2015, 04:22 PM
Hi oldfred,

thanks so much for your help. The problem has been resolved.

-DEC

CortonaJ
February 8th, 2015, 09:23 AM
I have an Acer aspire, until recently it worked fine with 12.4 on dual boot. I switched to windows as the place I was staying had wifi that refused to work with Ubuntu. After this when I tried to boot I got grub rescue. I partially solved the problem by running boot repair but I have lost ubuntu, and now boot straight into windows. Everything on the disk is backed up through drop box. My question is can I just install a more recent version of Ubuntu now or will that leave me with a partition full of files I can't access?

oldfred
February 8th, 2015, 04:50 PM
@CortonaJ
Please only post a question once and best in your own thread.
From the other place you posted, I did move it to your own thread.
See this:
http://ubuntuforums.org/showthread.php?t=2264550

Also threads posted as Solved will not be reviewed by those that can help but more by those also looking to see if their issue is the same and would work for them.