SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-08-27 00:35:13

emek
Member
Registered: 2015-01-18
Posts: 41

[SOLVED]GRUB in Rescue Mode

Hi there,

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:

> ls
> set boot=(hd0,partition)
> set prefix=(hd0,partition)/boot/grub
> insmod normal
> 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)

Offline

Be excellent to each other!

#2 2015-08-27 02:05:05

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: [SOLVED]GRUB in Rescue Mode

Once you boot into #!, then you need to reinstall grub before you update-grub. Assuming you want to install to sda...

sudo grub-install /dev/sda && sudo update-grub

BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#3 2015-08-30 02:23:44

emek
Member
Registered: 2015-01-18
Posts: 41

Re: [SOLVED]GRUB in Rescue Mode

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?

Offline

#4 2015-08-30 04:14:38

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED]GRUB in Rescue Mode

GRUB installs to the first sector of the drive itself, not the partition, so do what damo said...

sudo grub-install /dev/sda && sudo update-grub

bunsenlabs     8)     forum mod squad

Offline

#5 2015-09-02 21:35:24

emek
Member
Registered: 2015-01-18
Posts: 41

Re: [SOLVED]GRUB in Rescue Mode

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.

Offline

#6 2015-09-02 21:42:34

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED]GRUB in Rescue Mode

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.

Offline

#7 2015-09-02 21:58:42

emek
Member
Registered: 2015-01-18
Posts: 41

Re: [SOLVED]GRUB in Rescue Mode

I get this:

[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

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

Offline

#8 2015-09-02 22:10:14

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED]GRUB in Rescue Mode

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

Offline

#9 2015-09-02 22:35:24

emek
Member
Registered: 2015-01-18
Posts: 41

Re: [SOLVED]GRUB in Rescue Mode

It works!!

Thanks you very much.

The best part is that work as before the problem.

Really, really, thanks you

Offline

#10 2015-09-03 06:22:53

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED]GRUB in Rescue Mode

You are most welcome, glad you got it fixed smile

Offline

#11 2015-09-03 07:32:51

ostrołęk
CB Member
Registered: 2015-08-13
Posts: 110

Re: [SOLVED]GRUB in Rescue Mode

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

Offline

#12 2015-09-03 17:59:04

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: [SOLVED]GRUB in Rescue Mode

^ That would work too smile

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!

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo