I come here looking for some help.
I Have Windows 8.1, i can boot the hard drive so i can access in a easy way to the grub to boot #!.
Now, i reinstall windows 8.1 and i lost the grub configuration, now when i try to enter to #! i have this error:
Entering rescue mode
grub rescue> _
I can access to #! with the next list of commands:
> set boot=(hd0,partition)
> set prefix=(hd0,partition)/boot/grub
> insmod normal
But always i try to access to #! i have to put those commands.
I already try with sudo update-grub.
How i can fix permanent?
Thanks in advance
Last edited by emek (2015-09-02 22:57:45)
HI, and thanks for your answer.
I use sudo lsblk -fm to identify what is the partition where i have install #!
I get this:
NAME FSTYPE LABEL MOUNTPOINT NAME SIZE OWNER GROUP MODE sda sda 698,7G root disk brw-rw---T ├─sda1 ntfs WINRE ├─sda1 650M root disk brw-rw---T ├─sda2 vfat ├─sda2 260M root disk brw-rw---T ├─sda3 ├─sda3 128M root disk brw-rw---T ├─sda4 ntfs Windows ├─sda4 650,8G root disk brw-rw---T ├─sda5 ext4 / ├─sda5 19,1G root disk brw-rw---T ├─sda6 swap [SWAP] ├─sda6 931M root disk brw-rw---T └─sda7 ntfs RECOVERY └─sda7 26,8G root disk brw-rw---T sr0 sr0 1024M root cdrom brw-rw---T
I guess that must be /dev/sda5, so i try with the command that you give me, but i have this error:
sudo grub-install /dev/sda5 && sudo update-grub
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea.. /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. /usr/sbin/grub-setup: error: will not proceed with blocklists.
What i can do?
I get an error again:
/usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!. /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. /usr/sbin/grub-setup: error: will not proceed with blocklists.
Please post the output of:
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS sudo gdisk -l /dev/sda
You may have to install gdisk to run the second command.
I get this:
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.5 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Disk /dev/sda: 1465149168 sectors, 698.6 GiB Logical sector size: 512 bytes Disk identifier (GUID): DF015988-BCD7-4E37-8FB3-835B4680A442 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 1465149134 Partitions will be aligned on 2048-sector boundaries Total free space is 13997 sectors (6.8 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 1333247 650.0 MiB 2700 Basic data partition 2 1333248 1865727 260.0 MiB EF00 EFI system partition 3 1865728 2127871 128.0 MiB 0C01 Microsoft reserved part 4 2127872 1367001087 650.8 GiB 0700 Basic data partition 5 1367001088 1407039487 19.1 GiB 0700 6 1407039488 1408946175 931.0 MiB 8200 7 1408946176 1465137151 26.8 GiB 0700 Basic data partition
Your #! system is installed in non-EFI mode but your Windows system is installed (and booting) in EFI-mode.
I think that Windows has changed your partition table to a GPT type.
There are two ways to go here: either create a BIOS boot partition and install (non-EFI) GRUB there or convert #! to UEFI.
We'll try the former method first.
Load up gdisk
sudo gdisk /dev/sda
Create a new partition with "n" and accept the default first and last sectors (34 and 2048, respectively) and use the "ef02" Hex code when asked then use "p" to check the table (it should have a "BIOS boot partition" at the start of the disk) and then use "w" to write the changes to disk.
Then install GRUB and update the configuration file with:
sudo grub-install --recheck /dev/sda sudo grub-mkconfig -o /boot/grub/grub.cfg
Thanks you very much.
The best part is that work as before the problem.
Really, really, thanks you
You are most welcome, glad you got it fixed
I suppose this might help too.
If you have a Debian/Ubuntu live cd/dvd/usb around, you could boot into it and,
sudo su fdisk -l
Find your former boot partition. Let's assume it as sda5
mount /dev/sda5 /mnt grub-install --root-directory=/mnt /dev/sda
Once, it is installed,
umount /dev/sda5 reboot
^ That would work too
In this case the OP could boot into their system so I thought it made more sense to run the commands from there.
Thanks for the tip though!