3

I use to have a dual system with KDE Neon and Windows 10, all happy together in my lap Asus s510U.  One week ago, the f… Windows decided to update without questioning me. It also changed all my BIOS configuration; this action made it impossible for my Linux to boot. So what I did in sequential order is:

  1. Change the BIOS again; now Linux worked fine again.
  2. After using both systems (I ca’nt remember how often) without problem, I was using Linux, the next day when I started my computer I had a black screen.  It doesn’t load anything. (I think I have GRUB.)
  3. So I have problems to start live Mint USB in UEFI mode, but finally I started it, installed boot-repair, and it supposed to repair it.  (It is important to mention that I have boot in a separate partition of 500 MB.)
  4. But when I start again, it stops in the grub menu, without booting Linux.
  5. Because it didn’t work, I tried to reinstall grub manually, but I have the same results.
  6. I try to did this on the bios… sdb1/EFI/neon/shimx64.efi, but it came in different nomenclature. I found the file shimx64.efi but doesn’t boot at all.

Can somebody help me?  I don’t really know how to fix it.  I leave you some info of the boot.repair and of my system configuration.
Boot successfully repaired!!!
Boot Repair URL: http://paste.ubuntu.com/p/ZnGHZ4HmG5/

http://paste.ubuntu.com/p/ZnGHZ4HmG5/

My disk:

sudo fdisk -l

Disk /dev/sdb: 119.2 GiB, 128035676160 bytes, 250069680 sectors<br> 
Units: sectors of 1 * 512 = 512 bytes<br> 
Sector size (logical/physical): 512 bytes / 4096 bytes<br> 
I/O size (minimum/optimal): 4096 bytes / 4096 bytes<br> 
Disklabel type: gpt<br> 
Disk identifier: xxx

Device         Start       End   Sectors  Size Type<br> 
/dev/sdb1       2048    534527    532480  260M EFI System<br> 
/dev/sdb2     534528    567295     32768   16M Microsoft reserved<br> 
/dev/sdb3     567296 121028607 120461312 57.5G Microsoft basic data<br> 
/dev/sdb4  248430592 250068991   1638400  800M Windows recovery environment<br> 
/dev/sdb5  121028608 122052607   1024000  500M Linux filesystem<br> 
/dev/sdb6  122052608 126148607   4096000    2G Linux swap<br> 
/dev/sdb7  126148608 248429857 122281250 58.3G Linux filesystem<br> 

My boot directory:

/mnt/boot$ ls -al 
total 194116
drwxr-xr-x  5 root root     4096 Jun 19 00:23 .
drwxr-xr-x 25 root root     4096 Jun 19 00:23 ..
-rw-------  1 root root  4049455 Jan 29 15:39 System.map-4.15.0-45-generic
-rw-------  1 root root  4051528 Jun  4 20:33 System.map-4.15.0-52-generic
-rw-r--r--  1 root root   217019 Jan 29 15:39 config-4.15.0-45-generic
-rw-r--r--  1 root root   217278 Jun  4 20:33 config-4.15.0-52-generic
drwxr-xr-x  2 root root     4096 Jun 19 00:20 efi
drwxr-xr-x  5 root root     4096 Jun 19 00:24 grub
drwxr-xr-x  5 root root     4096 Jun 19 00:22 grub.bak
-rw-r--r--  1 root root 57867618 Feb 24 02:26 initrd.img-4.15.0-43-generic
-rw-r--r--  1 root root 57863844 Feb 24 21:43 initrd.img-4.15.0-45-generic
-rw-r--r--  1 root root 57899212 Jun 19 00:23 initrd.img-4.15.0-52-generic
-rw-------  1 root root  8281848 Jan 29 16:11 vmlinuz-4.15.0-45-generic
-rw-------  1 root root  8294136 Jun  4 20:39 vmlinuz-4.15.0-52-generic

Efi:

mint@mint:/tmp/boot$ sudo efibootmgr -v
BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0001,0000,0003,0002,0004,0005
Boot0000* Windows Boot Manager  HD(1,GPT,533df41a-4161-4850-a540-122090825ef0,0x800,0x82000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0001* neon  HD(1,GPT,533df41a-4161-4850-a540-122090825ef0,0x800,0x82000)/File(\EFI\NEON\SHIMX64.EFI)
Boot0002* Efi prueba    HD(1,GPT,533df41a-4161-4850-a540-122090825ef0,0x800,0x82000)/File(\bootx64.efi)
Boot0003* Hard Drive    BBS(HD,,0x0)..GO..NO........o.T.O.S.H.I.B.A. .M.Q.0.4.A.B.F.1.0.0....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . .4. .N.8.P.8.1.A.T.K........BO..NO........o.T.O.S.H.I.B.A. .T.H.N.S.N.K.1.2.8.G.V.N.8....................A...........................>..Gd-.;.A..MQ..L. . . . . . . . .8.4.S.N.0.1.9.K.M.T.T.Y........BO..NO........c.A.D.A.T.A. .U.S.B. .F.l.a.s.h. .D.r.i.v.e. .1.1.0.0....................A.......................6..Gd-.;.A..MQ..L.2.6.8.2.6.2.1.0.0.1.1.7.0.0.1.9........BO
Boot0004* linux efi pma HD(1,GPT,533df41a-4161-4850-a540-122090825ef0,0x800,0x82000)/File(\grubx64.efi)
Boot0005* UEFI: ADATA USB Flash Drive 1100, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(1,MBR,0x70d993e5,0x800,0x1c3d800)..BO

In my /etc/fstab was commented the part of mounting the boot partition.. That is very strange because I am sure I dindt do that.

My grub.cfg has this: search.fs_uuid a5da64fd-c3bd-4689-a6ef-c5fc1ddd17ac root hd1,gpt7 set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg Which points to the non boot partition. I have 2 diferents boot directory, one of the partition ( the original ) and another under /. Maybe in one update the system changed...

2
  • Re: #2, GRUB2 gnu.org/software/grub/manual/grub/grub.html (which everyone calls GRUB) is the default boot manager for KDE Neon.
    – K7AAY
    Jun 19, 2019 at 22:55
  • And, FYI, since the September 19, 2018 edition, it's OK to use a swapfile instead of a swap partition with Neon, as the performance issue with swapfiles has been long resolved. If you changed over, you could release the space now used by sdb6 and add it to the non-booting partition you use for data, instead.
    – K7AAY
    Jun 19, 2019 at 23:44

2 Answers 2

1

Because it didn’t work, I tried to reinstall grub manually, but I have the same results.

You've not actually said what you did here, so my suggestion might be something you've already tried. But to re-install grub manually, try the following:

  1. Boot into Linux mint Live USB and open a command prompt.
  2. Mount your Linux root partition and any partitions required for /, /boot/, /boot/efi and /usr. Based on evidence from your pastebin I believe for you this means:
    sudo mount /dev/sdb7 /mnt
    sudo mount /dev/sdb5 /mnt/boot
    sudo mount /dev/sdb1 /mnt/boot/efi/
    
  3. Mount kernel file systems into that environment

    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys  /mnt/sys
    sudo mount --bind /dev  /mnt/dev
    
  4. chroot into the environment

    sudo chroot /mnt /bin/bash
    
  5. Re-install grub, then reconfigure it
    grub-install
    update-grub
    
  6. exit then Safely shutdown
  7. Start without mint USB

There is a small chance this will creat a grub entry for the Live USB (/dev/sda?). If this exists then ignore it and when you get into your running system just execute update-grub again to remove it.


If you are still experiencing trouble where you get to grub, but it still takes you to the grub rescue menu, then the next thing to check is whether or not the configuration generated by install-grub is correct. From your chroot environment (listed above) in Mint or Ubuntu there is a config file located in /boot/efi/EFI/ubuntu/grub.cfg. Mine contains this:

search.fs_uuid 7fd75078-b1ac-4724-a63f-01980349e51a root hd0,gpt5
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

Check that the first two lines are correct. Firstly you can check the uuid and partition. So for my system the uuid matches /dev/sda5 and is corroborated by hd0,gpt5. Don't worry if yours says hd0 for sdb. That will be correct after you unplug your USB Mint:

sudo blkid
/dev/sda2: UUID="2641-087E" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="27141f73-5de4-4785-8894-3c774fae7e79"
/dev/sda5: UUID="7fd75078-b1ac-4724-a63f-01980349e51a" TYPE="ext4" PARTLABEL="Mint" PARTUUID="540b5b36-d3fe-405a-80b3-465518e2778a"
/dev/sda7: UUID="ae780d1a-3d09-49b7-bd96-c738772e1ecd" TYPE="ext4" PARTLABEL="Linux Home" PARTUUID="0fc32a26-808a-4f1c-8d15-3369da0b564b"

As you've got a /boot partition the first line should reference your /boot partition and the second line for you should read:

set prefix=($root)'/grub'
7
  • 1
    @GAD3R I'll check in a little while to see if the live-usb screws this up but AFAIK you don't need to specify the drive when installing to EFI. And actually no, not /dev/sda that is most likely the USB drive. EFI is installed to a partition not a disk so I would guess /dev/sdb1 might be correct but I'll check later. Jun 20, 2019 at 10:37
  • I did exactly that you put here when "I tried to reinstall grub manually" ; except the mounting the efi partition. I will try it. The grub-install was to the /dev/sdb disk
    – Pol
    Jun 20, 2019 at 14:48
  • @user3424389 I've just corrected a typo. Just double check before you try again. There's a risk that grub-install may have tried to install to your /dev/sdb5 drive and created a directory and files in /boot/efi/EFI. So before you sudo mount /dev/sdb1 /mnt/boot/efi/ check that /mnt/boot/efi is empty. Jun 20, 2019 at 14:52
  • I reinstall grub and every thing still the same.It takes me to the rescue grub menu. So from the rescue menu I put set prefix=(hd2,gpt5)/grub, insmod normal , normal , and so I had my linux back.. So I gues that the grub config is misse placed. I checked the one that is in /etc/default/grub and It doesn't have the correct info... where should be placed the grub file? Can I do this manually to make it work?
    – Pol
    Jun 20, 2019 at 17:13
  • @Pol I've added instructions for checking the config generated by install-grub Jun 20, 2019 at 17:37
1

FINALLY i found the solution :
1) in the grub rescue mode, run “set”

2) It show me prefix=(hd1,gp1)/boot/efi/EFI/ubuntu/
3) In my case, as I have KDE NEON the folder /boot/efi/EFI/ubuntu/ doesnt exist, but the folder //boot/efi/EFI/neon/ It does exist. . So I copied all the folder /boot/efi/EFI/neon/ to /boot/efi/EFI/ubuntu/ . That did the trick
IN my case also is wrong (hd1,gp1) because it shoudl point to hd1,gpt5. But I DINDT changed that and it worked.
What I changed is the file /boot/efi/EFI/ubuntu/grub.cfg, for use msdos format:

search.fs_uuid xkjdiw-18e9-4d0a-ac55-2skjdh8425f root hd1,gpt5 
set prefix=($root)'/grub'
configfile $prefix/grub.cfg

You must log in to answer this question.

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