0

I have a machine with Windows 10 installed alongside Ubuntu 16.04. I have lost the partition before after Windows update but was able to get it back by using a Live CD and running either boot-repair or re-installing grub, but nothing is working this time.

It is a UEFI system. EFI partition is sda2, Linux partition is sda6. Secure boot is disabled. Fast Startup is disabled (in Windows).

Boot-repair hits an error at the very end - log below:

https://pastebin.com/uU9npbB9

I've tried all of the upvoted answers on these pages, with no success (just keeps loading windows):

Windows 10 upgrade kills grub and boot-repair doesn't help

How can I repair grub? (How to get Ubuntu back after installing Windows?)

https://help.ubuntu.com/community/Grub2/Installing#via_ChRoot

Grub and Ubuntu disappeared after Windows update

How can I repair grub? (How to get Ubuntu back after installing Windows?)

Any help would be much appreciated. Let me know if more info is needed.

Output of: cat /etc/apt/sources.list; for X in /etc/apt/sources.list.d/*; do echo; echo; echo "** $X:"; echo; cat $X; done

deb cdrom:[Ubuntu-GNOME 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe


** /etc/apt/sources.list.d/yannubuntu-ubuntu-boot-repair-xenial.list:

deb http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial main
# deb-src http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial main

EDIT: Problem ended up being that the ubuntu folder on my EFI partition was a file - deleting it and re-installing grub got me the partition back. This post helpe me

plfa
  • 1
  • You have way too many kernels which you regularly need to houseclean. But issue seems to be some repository that is obsolete that prevents Boot-Repair from downloading & updating grub. cat /etc/apt/sources.list; for X in /etc/apt/sources.list.d/*; do echo; echo; echo "** $X:"; echo; cat $X; done Look for this and comment it out. http://repo.mongodb.org... then run Boot-Repair's full reinstall of grub. – oldfred Jul 05 '18 at 22:56
  • output of that command added into my post. I don't see repo.mongodb.org – plfa Jul 05 '18 at 23:48
  • What are you trying to say - that you can't boot into Ubuntu or reach Grub? Either way I'm not surprised with all those kernel versions and all of them duplicated in your grub.cfg. Delete Ubuntu, re-install and just stick with one kernel version - ie the latest one. – Paul Benson Jul 06 '18 at 00:12
  • I can't reach grub. I can't delete and re-install - this is not my machine I am trying to help someone recover their install. – plfa Jul 06 '18 at 00:21
  • You said you have a live Ubuntu CD? Why can't you re-install from there? First though I suggest booting up from the CD. Then deleting everything in the HDD grub.cfg file, then doing another boot-repair. That should fix grub2 as a fresh grub.cfg file will be created. I tried this out (deleting my grub.cfg) from my live USB then reinstating it with boot-repair and it works fine for me. – Paul Benson Jul 06 '18 at 01:56
  • I suppose I should not have said "can't". I know very little about Linux. A friend of mine passed away unexpectedly and his son has been using his computer since. His wife asked me to try and recover the Linux partition. Although I believe she is just after documents - he was a developer, so he could have apps, etc. I just want to make sure I can "preserve his environment" as much as possible. I have his passwords, etc. but I'm in a little over my head with regards to what to do here. – plfa Jul 06 '18 at 02:59
  • The sources list you posted is from the live installer. We need the one from your actual install. Follow this to chroot into install, then run above command to find repo.https://askubuntu.com/questions/53578/can-i-install-in-uefi-mode-with-the-alternate-installer/57380#57380 Boot-Repair may walk you thru enough of the chroot process to be able to run the command from there, but not sure. – oldfred Jul 06 '18 at 04:01
  • The pastebin shows a few errors, but the important one re Grub is on line 2316, which can be easily checked out. If you wish to try doing another boot-repair but with some changes first, let us know. – Paul Benson Jul 06 '18 at 15:03
  • Thanks for pointing out the important error! Got me on the right track and it is now solved. Ended up I had the same problem as this person, where the ubuntu folder in /boot/efi/EFI was a file instead of a folder - deleting it and re-installing grub fixed everything. Solved - thanks for all your help! – plfa Jul 06 '18 at 18:29
  • Glad to hear it. Make sure you run sudo apt-get autoremove to get rid of all those superfluous kernels that are downloaded that must be taking up a lot of unnecessary space. – Paul Benson Jul 06 '18 at 19:38

0 Answers0