Grub issue, boot repair not working
I think your best bet would be to just reinstall GRUB. Boot into a live session (of whichever distro you have handy) and set up a chroot environment and install grub on it.
-
Mount the partition you will be using as
/
(I will call the drive/dev/sda
and the/
partitionsda1
, the names may be different on your system, you will need to use the correct ones) somewhere :sudo mount /dev/sda1 /mnt/foo
-
Bind the directories that
grub
needs to have access tosudo mount --bind /dev /mnt/foo/dev && sudo mount --bind /dev/pts /mnt/foo/dev/pts && sudo mount --bind /proc /mnt/foo/proc && sudo mount --bind /sys /mnt/foo/sys
-
Set up the
chroot
environmentsudo chroot /mnt/foo
-
Create grub's configuration file:
sudo grub-mkconfig -o /boot/grub/grub.cfg
If you have multiple operating systems installed, make sure that the command above lists all of them. For example:
$ sudo grub-mkconfig -o /boot/grub/grub.cfg Generating grub.cfg ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-3.10-2-amd64 Found initrd image: /boot/initrd.img-3.10-2-amd64 Found linux image: /boot/vmlinuz-3.2.0-4-amd64 Found initrd image: /boot/initrd.img-3.2.0-4-amd64 Found linux image: /boot/vmlinuz-3.2.0-3-amd64 Found initrd image: /boot/initrd.img-3.2.0-3-amd64 Found linux image: /boot/vmlinuz-3.2.0-2-amd64 Found initrd image: /boot/initrd.img-3.2.0-2-amd64 Found memtest86+ image: /boot/memtest86+.bin Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin Found Windows 7 (loader) on /dev/sda2 done
-
Now install grub to the MBR of your drive (remember to change
/dev/sda
to whichever drive you actually want to install it on)grub-install /dev/sda grub-install --recheck /dev/sda
-
Exit the
chroot
and unmount everything so your running system is back to normal:exit sudo umount /mnt/foo/dev/pts /mnt/foo/dev /mnt/foo/proc /mnt/foo/sys /mnt/foo
Try booting from the drive, you should have a grub menu this time.
Related videos on Youtube
Charles
Young boy (14) I'm wad first interested in computers by my brother that was playing with old pentium 2 at the time and... Few years after it was my turn, I started with a pentium 3 and after a bit od use.... Windows was just BAD. I had to do someting... Then My bro talked me about a penguin..... :-| .. I was like: What is that stuff? There is no window a startup. So I had a old version of ubuntu (cannot remember wich) for about 3 months. Then came a ''Brand New'' pentium 4 wich at this time was already kinda old. But... it was free so I took it! Now I have serval computers and I help peoples wich have troubles with their computers, it kind of became a small job. And the best of all is... I have no system running Windows! ;-)
Updated on September 18, 2022Comments
-
Charles over 1 year
I have an installation of multiple systems on my laptop. I m running on a asus vivobook x202e with an i3, a 240gb ssd and 4gb ram. I have: Ubuntu 14.04, Ubuntu 14.10, Windows 8.1 and and fedora (Cant remember wich version). I wanted to install 15.04 nightly and to do so I tried to resize some partitions on my ssd. After doing that my grub just would not work at all. When I boot my PC it directly goes to the BIOS and there are no boot options in there. I tried boot repair but it would block at this step:
When I do the commands one by one everything is working except the last one:
sudo chroot "/mnt" apt-get purge -y --force-yes grub*-common grub-common:i386 shim-signed linux-signed*
When I execute this command the following error comes every single time:
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: grub-efi-amd64 : Depends: grub-common Depends: grub-efi-amd64-bin (= 2.02~beta2-9ubuntu1) grub2-common : Depends: grub-common (= 2.02~beta2-9ubuntu1) E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.**
I've tried do fix it but nothing seems to work. As this command does not work, when I hit continue in boot repair it tells me:
If you guys could help me out by telling me a way to fix this or just another way to fix grub then it would be really appreciated! :-)
-
oldfred about 9 yearsAre all installs UEFI or all installs BIOS? You cannot mix without issues. Post link to summary report from Boot-Repair. And if UEFI you also have to include that in the chroot.
-