1

I recently tried to resize my partition with Ubuntu 16.04 on it, and now cannot boot. I got the "boot repair disk" (https://sourceforge.net/p/boot-repair-cd/home/Home/) and tried the recommended settings.

It asked me to reinstall the Grub, and I did so, and now the Grub won't even show up! I have been dual booting with Windows 10 and was previously able to boot to that, but now the Grub does not even work! I'm not just trying to get Windows 10 to work, I'm trying to get Ubuntu to work. I have all my program files and other stuff, so if you know how to isolate them from the problem files, and reinstall Ubuntu, I'd be happy.

When I try recommended settings it gives me the followng error : Please enable a repository containing the [grub2] packages in the software sources of Ubuntu 16.04.1 LTS (sda5). Then try again.

Also here is my boot info summary from boot repair : paste.ubuntu.com/23546988/

Is there any other way to reinstall the Grub? Please help!

  • You have the Windows boot loader Syslinux in MBR, but boot flag on Linux partition. Unless using Syslinux to boot Ubuntu boot flag should be on Windows primary NTFS partition with boot files, probably sda1, but you also have boot files in sda2. Boot-Repair often copies them as many users do not know Windows usually has a small boot partition and delete it. Use gparted or Windows repair disk to move boot flag back to sda1. Do not let Boot-Repair move it again, only use advanced mode. Was drive gpt before Windows? Run this to remove gpt data. http://www.rodsbooks.com/fixparts/ – oldfred Nov 28 '16 at 04:43
  • I installed Windows 10 first, then Ubuntu. I couldn't get it too work with gpt and efi, so I used msdos and legacy. – PatDaBunnyLego Nov 28 '16 at 04:51
  • Ok! I am in Windows 10 now, but I want the Grub back so I can boot Ubuntu. – PatDaBunnyLego Nov 28 '16 at 04:57
  • Make sure fast start up is off in Windows and Windows has done chkdsk which is required after any resize. http://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation Then you can use Boot-Repair or manually reinstall grub from Ubuntu live installer. Because on major updates Windows may turn fast start up back on, be prepared to turn if off before rebooting, or you have to reinstall Windows boot loader to boot Windows and then reinstall grub again. So keep Windows repair/recovery flash drive & Ubuntu live installer handy. Nice of Windows to make it easy. – oldfred Nov 28 '16 at 15:18
  • For chdsk do I do that in cmd in Windows? Boot repair disk still gives me that wierd error when I try. With Ubuntu live installer, doesn't it only let you install ubuntu in it's entirety? Also I noticed that after I switched from Win10 to Ubuntu, it doesn't have the fast startup option. I'll try them and report back. – PatDaBunnyLego Nov 28 '16 at 15:53
  • You run chkdsk from Windows or Windows repair disk. If repository not available that is usually no Internet. Or somehow you turned off the standard repository for Ubuntu which has grub. Or Boot-Repair has a new bug. – oldfred Nov 28 '16 at 17:02
  • Also in boot repair I am unable to add repositories! I tried to edit the repository file manually, but it always said something like "unable to open file to write" so I don't think the universe repository is even active! That may be the problem! – PatDaBunnyLego Nov 29 '16 at 15:45
  • The /etc folder is corrupt. It has non-functional files, as well as missing folders, and I can't edit them from boot-repair disk, even though I should be the super user! – PatDaBunnyLego Nov 30 '16 at 18:15

2 Answers2

0

Actually this problem is depend on laptop company also. But don`t worry, Just press 'Ctrl+Alt+Del' it will restart then while restarting continuously press F2 or F12 then you will enter into the doss then there is option to change the system configure....

Basically now days all laptops having UEFi and CSM option in the doss. for windows you can select UEFI in system configuration and for Ubuntu CSM. but UEFI is having secure boot ooption...

  • You mean I can have an os that is efi and one that is legacy ? I don't think so! Also I got windows 10 working again, by putting the boot flag on the partition in which it is stored, but my grub still does not boot, and I'm pretty sure that the Ubuntu boot files are corrupt. – PatDaBunnyLego Nov 28 '16 at 15:47
  • While you can have one install UEFI and the other BIOS, you can only boot from UEFI boot menu. UEFI & BIOS write the hardware configuration differently onto hard drive for operating system to use. So once you start booting in one mode, you cannot switch. Or grub can only boot other installs in same boot mode. So best to always install all systems in same boot mode. – oldfred Nov 29 '16 at 16:37
0

Fixed!

I used a series of root commands from live Ubuntu 16.04 LTS and completely replaced the etc directory in my normal folder with that of my live Ubuntu. I was then able to reinstall the Grub, (because it had the repository files again) and boot up.

My user was corrupted, so I made a new root user, from recovery mode, and moved my personal files there.