2

I am having issues booting and end up in a grub rescue shell.

error: attempt to read or write outside of disk 'hd0'.
Entering rescue mode...
grub rescue>

Searching around the web, i have found some commands to get a bit more information about my system. Running sudo fdisk -l gives

Disk /dev/loop0: 1.8 GiB, 1864450048 bytes, 3641504 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 86.9 MiB, 91099136 bytes, 177928 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 34.7 MiB, 36323328 bytes, 70944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 140.9 MiB, 147722240 bytes, 288520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 2.3 MiB, 2433024 bytes, 4752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 13 MiB, 13619200 bytes, 26600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 14.5 MiB, 15196160 bytes, 29680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 3.7 MiB, 3887104 bytes, 7592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x99811f5b

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1  *     2048 488396799 488394752 232.9G 8e Linux LVM


Disk /dev/sdb: 14.5 GiB, 15524167680 bytes, 30320640 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x32234161

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1  *     8064 30320639 30312576 14.5G  c W95 FAT32 (LBA)




Disk /dev/mapper/ubuntu--vg-root: 231.9 GiB, 249028411392 bytes, 486383616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ubuntu--vg-swap_1: 980 MiB, 1027604480 bytes, 2007040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

From which we can see my main drive is /dev/sda and the root and swap use lvm. The /dev/sda and /dev/sda1 have the boot flag. It is pretty much a standard unbuntu installation. The /dev/sdb is the usb drive i am using right now to run my computer.

To me, all seems fine and i am out of idea on how to get my desktop back. How should one approch this problem to solve it?

Thanks,

  • Dropping a bounty on this. I have this happening on a server with an HP Enterprise SSD in it. It happens very frequently when rebooting. I have the luxury of wiping the install and reprovisioning the disk with ansible afterwards as this is just the root disk, but this keeps reoccurring. It's not a one off problem. And it's 18.04 specific. I would like a way to recover without a wipe. – Routhinator Jan 10 at 4:16
  • Just found this, looks like this issue is a mixed bag: askubuntu.com/questions/229715/… – Routhinator Jan 10 at 4:30
  • Have you tried this method shown in askubuntu? askubuntu.com/questions/397485/… – Dasel Jan 11 at 9:29
  • 1
    I think your question lacks information about your grub install and settings, since it is a grub problem. From gnu.org/software/grub/manual/grub/grub.html#Device-syntax I find strange Grub would read from "hd0" when LVM is supposed to be named "lvm". It may be easier to have a small physical /boot partition. See also gnu.org/software/grub/manual/grub/… – L. Levrel Jan 12 at 10:31
  • I'm sorry, but I have to ask: have you tried reinstalling grub? – V.7 Jan 12 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.