0

I have run into this situation by doing several silly thing in a row.

It all started when I made distribution upgrade from 17.10 to 18.04. The machine is dual-boot with Windows 8, and there was secure boot activated on the machine (ASUS X75A laptop). After the upgrade was complete and the computer rebooted, I accidentally pressed "Continue to boot" instead of "Enter MOK" or something similar. It did not continue to boot, however, regardless of how many time I restarted it. I even got the password right, but since the second boot there was no option to "Enter MOK" or so, I could just "enroll keys from disk" (which I supposedly don't have?).

So I decided to reinstall grub, but most stupidly used the old 16.04 Lubuntu alternate iso disk to do that (it was the disk from which the system was installed once, later upgraded to 17.04 and then to 17.10). Installation of grub failed, of course.

Then I burned 18.04 disk and tried again with no success. I tried rewriting the partition table from testdisk, changing EFI partiition type from "Microsoft data" to "EFI", with no gain. It even showed linux partition as "Microsoft data", oddly enough, of "ext4" type (which is correct).

Then I tried chrooting in rescue mode, removing grub and installing grub-efi, with no success: it complained about missing /usr/lib/grub/i386-pc/modinfo.sh (that's grub-efi). I tried to follow advices of purging grub manually and then installing grub-efi, but the error persisted. I then tried to install grub-pc, which gave me the best results so far - grub rescue shell prompt. I didn't like it so, though (silly me), and after some other efforts decided to reinstall lubuntu from scratch, leaving windows partitions untouched (if possible). Installation freezed at update-grub in the very end, and the machine is not bootable by now ("Insert appropriate boot media and press any key" message after turning on); also, BIOS menu (opened after F2 is hit right after reboot) doesn't show any boot option connected with HDD. Next time during the rescue mode chroot session update-grub ran smoothly, but the picture after reboot is the same.

Then I read about gdisk and launched it from Knoppix, but is showed that the partition table is OK (GPT with MBR):

GPT fdisk (gdisk) version 1.0.1

Type device filename, or press <Enter> to exit: /dev/sda
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 747C0D94-3D8A-9C4A-A47B-40714820931D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2029 sectors (1014.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          616447   300.0 MiB   EF02
   2          616448         1845247   600.0 MiB   0700
   3         2107392       391895039   185.9 GiB   0700
   4       391895040       392816639   450.0 MiB   0700
   5       392816640       926996479   254.7 GiB   8300
   6       926996480       934809599   3.7 GiB     8200
   7       934809600       976773119   20.0 GiB    0700
   8         1845248         2107391   128.0 MiB   8300

Then I also ran testdisk again, and this is shown:

TestDisk 6.14-WIP, Data Recovery Utility, September 2012
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63
     Partition               Start        End    Size in sectors
>P MS Data                    13960     628359     614400 [NO NAME]
 P MS Data                   660424     666597       6174 [Boot]
 P MS Data                  1109040    1115213       6174 [Boot]
 P MS Data                  1659760    1665933       6174 [Boot]
 P MS Data                  1845247    3074046    1228800
 P Mac HFS                 42763530   42978641     215112
 P MS Data                 61659936   61666109       6174 [Boot]
 P MS Data                 61842568   61848741       6174 [Boot]
 P MS Data                 63305686   63326424      20739 [NO NAME]
 P MS Data                 73289656   73295829       6174 [Boot]
 P Mac HFS                118840118  246439479  127599362 [~X^D]
 P MS Data                366007096  366013269       6174
Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
FAT32, blocksize=4096, 314 MB / 300 MiB

Actual contents of partitions are the following:

sda1: EFI
sda2: MS Windows Recovery
sda3: MS Windows main
sda4: ??? (something from Windows probably)
sda5: Lubuntu /
sda6: Linux swap
sda7: ASUS things (?)
sda8: Lubuntu /boot

PLease, can anyone suggest anything except for complete repartitioning of the disk? Backups have been made, files copied from linux and Windows partitions dd'd.

16
  • The ef02 is a bios_grub which is unformatted, to be the ESP - efi system partition it should be code ef00 and FAT32. Or with gparted FAT32 with boot flag. May be best to see details, you can run from your Ubuntu live installer or any working install, use ppa version not older Boot-Repair ISO: Post the link to the Create BootInfo summary report. Is part of Boot-Repair: help.ubuntu.com/community/Boot-Info
    – oldfred
    May 30, 2018 at 17:15
  • Sorry for the delay. Here is the output: http://paste.ubuntu.com/p/sMpCYBpHNz/
    – Esmu Igors
    Jun 5, 2018 at 20:08
  • Following the directions by the Boot-Repair, I disabled "Launch CSM" in BIOS, but this caused it to see no any boot options, including the USB stick and DVD drive. Is that a sign of a very serious situation?
    – Esmu Igors
    Jun 5, 2018 at 20:28
  • Also, the usb stick appears as a boot option only if "Legacy USB" is enabled in BIOS settings -- although that can be a consequence of the USB stick used, as in Linux (not in Windows) it takes unusually long for the system to recognize it (and it is not mounted until I mount it manually).
    – Esmu Igors
    Jun 5, 2018 at 20:32
  • You have gpt which with Windows can only boot in UEFI boot mode. But you have only two Windows partitions that look more like a BIOS install of Windows, but it requires MBR(msdos). Did you convert drive from MBR to gpt, or force UEFI install? Your bios_grub is very large, was it an ESP - efi system partition? The bios_grub is unformatted, but the ESP must be FAT32 with boot flag. If system originally had Windows 8 then it was UEFI and sda1 was the ESP. If so, I might try changing that back to FAT32 and see if Windows UEFI boot files are still there. Only change type, do not reformat.
    – oldfred
    Jun 5, 2018 at 21:09

1 Answer 1

0

OK, it seems the problem is unrecoverable by now and the situation is too specific due to my chaotic actions before asking that question. I resorted to installing everything from scratch. I have no objections to closing the question if administrators think it's appropriate.

Many thanks to oldfred for his persevering and professional, yet doomed to fail, attempts to help me!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .