Grub cannot be installed (installer stops at 95%)  [Solved]

When you run into problems installing MX Linux XFCE
Message
Author
gmerguez
Posts: 5
Joined: Fri Mar 24, 2023 11:26 am

Grub cannot be installed (installer stops at 95%)

#1 Post by gmerguez »

I hope that someone in this great forum can help. I tried installing MX Linux on an old Lenovo Ideapad S205. The system runs well from a live USB, and I really like the way it looks and feels. Unfortunately, the installer stops at 95% saying that GRUB could not be installed. The symptoms are similar to those described in another post: https://forum.mxlinux.org/viewtopic.php ... 53#p576053.

Quick system info::

Code: Select all

System:    Kernel: 5.10.0-20-amd64 [5.10.158-2] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/antiX/vmlinuz quiet splasht nosplash 
           Desktop: Xfce 4.18.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.18.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.3_x64 Wildflower January 15  2023 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: LENOVO product: 1038D9G v: Ideapad S205 serial: <filter> Chassis: 
           type: 10 serial: <filter> 
           Mobo: LENOVO model: Inagua v: 109-B78210-00A serial: <filter> UEFI: LENOVO v: 4BCN24WW 
           date: 08/10/2011 
Battery:   ID-1: BAT0 charge: 18.7 Wh (97.9%) condition: 19.1/38.9 Wh (49.1%) volts: 11.9 
           min: 10.8 model: SANYO L09S6Y14 type: Li-ion serial: <filter> status: Unknown 
CPU:       Info: Dual Core model: AMD E-450 APU with Radeon HD Graphics bits: 64 type: MCP 
           arch: Bobcat family: 14 (20) model-id: 2 stepping: 0 microcode: 5000119 cache: 
           L2: 512 KiB 
           flags: lm nx pae sse sse2 sse3 sse4a ssse3 svm bogomips: 6586 
           Speed: 1140 MHz min/max: 825/1650 MHz Core speeds (MHz): 1: 1140 2: 899 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: mmio_stale_data status: Not affected 
           Type: retbleed status: Not affected 
           Type: spec_store_bypass status: Vulnerable 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: AMD Wrestler [Radeon HD 6320] vendor: Lenovo driver: radeon v: kernel 
           bus-ID: 00:01.0 chip-ID: 1002:9806 class-ID: 0300 
           Device-2: Acer Lenovo Integrated Webcam type: USB driver: uvcvideo bus-ID: 2-3:4 
           chip-ID: 5986:0292 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.18.0 driver: 
           loaded: ati,radeon unloaded: fbdev,modesetting,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") 
           s-diag: 414mm (16.3") 
           Monitor-1: LVDS res: 1366x768 hz: 60 dpi: 136 size: 256x144mm (10.1x5.7") 
           diag: 294mm (11.6") 
           OpenGL: renderer: AMD PALM (DRM 2.50.0 / 5.10.0-20-amd64 LLVM 11.0.1) 
           v: 3.3 Mesa 20.3.5 compat-v: 3.1 direct render: Yes 
Audio:     Device-1: AMD Wrestler HDMI Audio vendor: Lenovo driver: snd_hda_intel v: kernel 
           bus-ID: 00:01.1 chip-ID: 1002:1314 class-ID: 0403 
           Device-2: AMD SBx00 Azalia vendor: Lenovo driver: snd_hda_intel v: kernel 
           bus-ID: 00:14.2 chip-ID: 1002:4383 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-20-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Lenovo driver: r8169 
           v: kernel port: 1000 bus-ID: 02:00.0 chip-ID: 10ec:8136 class-ID: 0200 
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter> 
           Device-2: Ralink RT3090 Wireless 802.11n 1T/1R PCIe vendor: Lenovo driver: rt2800pci 
           v: 2.3.0 modules: wl port: 1000 bus-ID: 03:00.0 chip-ID: 1814:3090 class-ID: 0280 
           IF: wlan0 state: down mac: <filter> 
Bluetooth: Device-1: Foxconn / Hon Hai Broadcom Bluetooth 2.1 Device type: USB driver: btusb 
           v: 0.8 bus-ID: 3-5:2 chip-ID: 0489:e00d class-ID: fe01 serial: <filter> 
           Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 2.0 lmp-v: 3.0 
           sub-v: 4203 hci-v: 3.0 rev: 1d8 
           Info: acl-mtu: 1021:8 sco-mtu: 64:1 link-policy: rswitch hold sniff park 
           link-mode: slave accept service-classes: rendering, capturing, object transfer, audio 
Drives:    Local Storage: total: 469.5 GiB used: 7.85 GiB (1.7%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Toshiba model: MK5076GSX size: 465.76 GiB 
           block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 5400 
           serial: <filter> rev: 1A scheme: GPT 
           ID-2: /dev/sdb maj-min: 8:16 type: USB model: General USB Flash Disk size: 3.73 GiB 
           block-size: physical: 512 B logical: 512 B type: SSD serial: <filter> rev: 1.0 
           scheme: MBR 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 5.25 GiB used: 0 KiB (0.0%) priority: -2 
           dev: /dev/sda3 maj-min: 8:3 
Sensors:   System Temperatures: cpu: 61.6 C mobo: 41.0 C gpu: radeon temp: 62.0 C 
           Fan Speeds (RPM): N/A 
Repos:     Packages: note: see --pkg apt: 1967 lib: 989 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mxrepo.com/mx/repo/ bullseye main non-free
Info:      Processes: 188 Uptime: 2h 24m wakeups: 2 Memory: 3.45 GiB used: 1.97 GiB (57.1%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: N/A 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI
My intention was a clean instal without Windows or any other OS in parallel. The latest attempt was done on the hdd without prior partitioning, just created a new partition table in Gparted and left the rest to the installer. The complete minstall.log file is attached. I believe this may be the relevant part:

Code: Select all

2023-03-24 15:00:19.461 DBG default: ++ Installing GRUB ++
2023-03-24 15:00:19.516 DBG default: Exec #158: /bin/mount /dev/sda1 /mnt/antiX/boot/efi
2023-03-24 15:00:19.720 DBG default: Exit #158: 0 QProcess::NormalExit
2023-03-24 15:00:19.720 DBG default: Exec #159: cat /sys/firmware/efi/fw_platform_size
2023-03-24 15:00:19.776 DBG default: Exit #159: 0 QProcess::NormalExit
2023-03-24 15:00:19.776 DBG default: Bash #160: /bin/ls /sys/firmware/efi/efivars | grep dump
2023-03-24 15:00:19.846 DBG default: Exit #160: 1 QProcess::NormalExit
2023-03-24 15:00:19.849 DBG default: Exec #161: chroot /mnt/antiX grub-install --force-extra-removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX21 --recheck
2023-03-24 15:00:39.857 DBG default: SErr #161: "Installing for x86_64-efi platform.\ngrub-install: warning: Cannot set EFI variable Boot0009.\ngrub-install: warning: efivarfs_set_variable: writing to fd 6 failed: No space left on device.\ngrub-install: warning: _efi_set_variable_mode: ops->set_variable() failed: No space left on device.\ngrub-install: error: failed to register the EFI boot entry: No space left on device.\n"
I tried a few things from the post mentioned above, but I am not sure I understood correctly what to do. Maybe it is helpful:

Code: Select all

demo@mx1:~
$ lsblk -f
NAME   FSTYPE   FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs 4.0                                                         0   100% /live/linux
sda                                                                                  
├─sda1 vfat     FAT32 EFI System 7E09-9A3B                                           
├─sda2 ext4     1.0   rootMX21   7c4051eb-bd41-4280-b277-55481acbc442                
└─sda3 swap     1     swapMX     19079fe3-a082-40c5-9fb7-174284edf685                
sdb                                                                                  
└─sdb1 vfat     FAT32 MX-LIVE    664D-5FEC                               1.9G    49% /live/boot-dev
demo@mx1:~
$ sudo parted --list

Model: ATA TOSHIBA MK5076GS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name     Flags
 1      1049kB  269MB  268MB   fat32           primary  boot, esp
 2      269MB   494GB  494GB   ext4            primary
 3      494GB   500GB  5637MB  linux-swap(v1)  primary


Model: General USB Flash Disk (scsi)
Disk /dev/sdb: 4010MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  4010MB  4009MB  primary  fat32        boot, lba

demo@mx1:~
$ sudo fdisk --list
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: TOSHIBA MK5076GS
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: gpt
Disk identifier: DB17B8D5-1937-4A60-AA4B-D83CA15A88F0

Device         Start       End   Sectors   Size Type
/dev/sda1       2048    526335    524288   256M EFI System
/dev/sda2     526336 965748735 965222400 460.3G Linux filesystem
/dev/sda3  965748736 976758783  11010048   5.3G Linux filesystem


Disk /dev/sdb: 3.73 GiB, 4009754624 bytes, 7831552 sectors
Disk model: USB Flash Disk  
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: 0x03fe7246

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     2048 7831551 7829504  3.7G  c W95 FAT32 (LBA)


Disk /dev/loop0: 1.77 GiB, 1904525312 bytes, 3719776 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
demo@mx1:~
This may also be of interest: After the first unsuccessful attempt with MX Linus, I decided to check if it is a problem specific to MX and tried installing lubuntu. It failed with similar GRUB installation warnings.
Any suggestions what to do next?

User avatar
dolphin_oracle
Developer
Posts: 19926
Joined: Sun Dec 16, 2007 1:17 pm

Re: Grub cannot be installed (installer stops at 95%)

#2 Post by dolphin_oracle »

remove old UEFI entries from your system. you can use either your system bios/UEFI utlity, or you may be able to use mx-boot-options which has a "Manage EFI Options" function.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

MXRobo
Posts: 1499
Joined: Thu Nov 14, 2019 1:09 pm

Re: Grub cannot be installed (installer stops at 95%)

#3 Post by MXRobo »

I'll post this since I have it ready, but I see D.O. found the problem, follow his advice, not mine.

I'm a newb, so heed my advice to take my suggestions with a grain of salt as I'm just kind of guessing – and I'll try to start with the obvious, but I think I see:

No space left on device.\ngrub-install: error: failed to register the EFI boot entry: No space left on device.\n"

What size is the ESP EFI partition?, Did you set the boot and esp flags for that partition?
Is this a dual-boot, more info, did you select to wipe everything, or something else, partition manually, did you first use gparted to create a GPT partitioning scheme? I assume you're attempting to install in GPT and not MBR. More info, others with more knowledge will likely need this too, but they may be able to ascertain some of this from your QSI too.
Where does the QSI come from, the live USB – more detailed info.

When it paused at 95%, did it read, "Paused for required operator input"?, if it did, then there isn't a problem, this is normal, I don't recall exactly, but it's dead simple, either enter something obvious, like username, password, etc. or hit enter, then enter something obvious. But I doubt that this is the problem because you had the same problem with Lubuntu and I don't think Lubuntu installs the same way.

Good Luck

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: Grub cannot be installed (installer stops at 95%)

#4 Post by fehlix »

Hmme, it complains about no space with the EFI NVRAM.:

Code: Select all

grub-install --force-extra-removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX21 --recheck
Installing for x86_64-efi platform.
grub-install: warning: Cannot set EFI variable Boot0009.
grub-install: warning: efivarfs_set_variable: writing to fd 6 failed: No space left on device.
grub-install: warning: _efi_set_variable_mode: ops->set_variable() failed: No space left on device.
grub-install: error: failed to register the EFI boot entry: No space left on device."
What would this show, running from terminal as normal user:

Code: Select all

efibootmgr -v
In case of to many entries, some tidy-up /removal of unused entries may help,
to give some space free in NVRAM.

I'd probaly also try to solve it like this:
Install first with out selecting GRUB installation.
After installation don not reboot - untick on last screen to reboot.
Next "visit" the installation using the tool chroot-rescue-scan:
Open terminal and run

Code: Select all

sudo chroot-rescue-scan
Now install "GRUB" without NVRAM entries, but still a full grub-install:

First check the ESP ("EFI System Partition") is mounted:

run (within chroot)

Code: Select all

lsblk -f
Post the output.
Next if mounted install grub without writing into NVRAM:
run (within chroot no sudo needed)

Code: Select all

grub-install   --no-nvram --force-extra-removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX21 --recheck
if that works : The only missing bit would be the entry within NVRAM.
After GRUB install worked, do create the GRUB-menu
run (within chroot no sudo needed)

Code: Select all

update-grub
And you could probably now also boot into the installed system
with help of LiveUSB -> Boot Menu -> Boot/GRUB rescue menu ..

Maybe you can manual set the entry within "UEFI System Setup" uitility.

Also try again but this time with writing into NVRAM:
run (within chroot no sudo needed)

Code: Select all

grub-install   --force-extra-removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX21 --recheck
Which may gain fail.
Post any command output.

+++EDIT+++
added: run (within chroot no sudo needed)
and added update-grub with chroot to create the GRUB menu.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

gmerguez
Posts: 5
Joined: Fri Mar 24, 2023 11:26 am

Re: Grub cannot be installed (installer stops at 95%)

#5 Post by gmerguez »

Thank you for these incredibly fast responses!

Following the instructions by fehlix, I got

Code: Select all

$ efibootmgr -v
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0003,0002,0005,0006,0007,0008
Boot0000  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0001  Boot Menu	FvFile(86488440-41bb-42c7-93ac-450fbf7766bf)
Boot0002* USB FDD:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot0003* ATA HDD0: TOSHIBA MK5076GSX                       	PciRoot(0x0)/Pci(0x11,0x0)/Ata(0,0,0)..bYVD.A...O.*..
Boot0004* USB HDD: General USB Flash Disk	PciRoot(0x0)/Pci(0x12,0x2)/USB(0,0)3.!..3.G..A.....
Boot0005* USB CD:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot0006* PCI LAN: Realtek PXE B02 D00	BBS(Network,Realtek PXE B02 D00,0x0)..................@.......@...@.............................................A.....................
Boot0007* ubuntu	HD(1,GPT,8b77fd42-eae8-4c7b-b0e4-e61cb8668292,0x800,0x80000)/File(\EFI\ubuntu\shimx64.efi)
Boot0008* ubuntu	HD(1,GPT,4de10967-8c41-4030-8628-f8615fd80b08,0x800,0x80000)/File(\EFI\ubuntu\shimx64.efi)
demo@mx1:~
It seems that I was able to remove the last two entries using mx-boot-options, it now shows

Code: Select all

$ efibootmgr -v
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0003,0002,0005,0006,0007,0008
Boot0000  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0001  Boot Menu	FvFile(86488440-41bb-42c7-93ac-450fbf7766bf)
Boot0002* USB FDD:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot0003* ATA HDD0: TOSHIBA MK5076GSX                       	PciRoot(0x0)/Pci(0x11,0x0)/Ata(0,0,0)..bYVD.A...O.*..
Boot0004* USB HDD: General USB Flash Disk	PciRoot(0x0)/Pci(0x12,0x2)/USB(0,0)3.!..3.G..A.....
Boot0005* USB CD:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot0006* PCI LAN: Realtek PXE B02 D00	BBS(Network,Realtek PXE B02 D00,0x0)..................@.......@...@.............................................A.....................
I feel rather stupid, but I am now stuck at installing without without GRUB installation. It seems there should be a checkbox, but I have not found that in the installer. I need to stop now, will continue searching tomorrow. Again, thank you all very much for your help.

gmerguez
Posts: 5
Joined: Fri Mar 24, 2023 11:26 am

Re: Grub cannot be installed (installer stops at 95%)

#6 Post by gmerguez »

It seems that the latest installer really does not ask whether to install Grub. So I got an older version (MX 21), which does present this choice. The first attempt to install failed with an error message saying that the required partitions could not be created. I tried again, this time the install went through without any problems.

Next step in the instructions in post #4:

Code: Select all

(MX_21_Wildflower_) Sun Mar 26 12:08:09 /
chroot> lsblk -f
NAME   FSTYPE   FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs 4.0                                                                  
sda                                                                                  
├─sda1 vfat     FAT32 EFI System C33D-E898                                           
├─sda2 ext4     1.0   rootMX21   9516aedd-efb0-43ab-852a-52112c7d692f    423G     1% /
└─sda3 swap     1     swapMX     4d1151dc-3a06-4915-bfb5-7ae9898b4ec4                
sdb                                                                                  
└─sdb1 vfat     FAT32 MX-LIVE    70BC-69D8                                           

(MX_21_Wildflower_) Sun Mar 26 12:08:29 /
I guess that means the ESP is not mounted. I tried something I saw in another post (without really understanding what I am doing):

Code: Select all

chroot> sudo mount /dev/sda1 /boot/efi
mount: /boot/efi: mount point does not exist.
This is far as I get for now. Thanks again.

User avatar
j2mcgreg
Global Moderator
Posts: 4092
Joined: Tue Oct 23, 2007 12:04 pm

Re: Grub cannot be installed (installer stops at 95%)

#7 Post by j2mcgreg »

My synopsis: you've got a twelve year old HDD that will no longer allow an ESP partition to be created: it's fair to assume that if the ESP partition was in place, the mount point would be also. What does your bios say about the HDD's health? If it's anything but Healthy, you should replace the drive with an SSD (for the performance boost). Here's a video that shows you how:

https://www.youtube.com/watch?v=AHexWDjxWoU
HP 15; ryzen 3 5300U APU; 500 Gb SSD; 8GB ram
Aspire V5-571; CPU Intel I3; 500 GB SSD; Intel 2nd Gen Graphics; 8 GB Ram
Aspire XC-866; i3-9100; UHD 630; 8 GB ram; 1TB HDD

In Linux, newer isn't always better. The best solution is the one that works.

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: Grub cannot be installed (installer stops at 95%)

#8 Post by fehlix »

gmerguez wrote: Sun Mar 26, 2023 7:16 am It seems that the latest installer really does not ask whether to install Grub. So I got an older version (MX 21), which does present this choice. The first attempt to install failed with an error message saying that the required partitions could not be created. I tried again, this time the install went through without any problems.

Next step in the instructions in post #4:

Code: Select all

(MX_21_Wildflower_) Sun Mar 26 12:08:09 /
chroot> lsblk -f
NAME   FSTYPE   FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs 4.0                                                                  
sda                                                                                  
├─sda1 vfat     FAT32 EFI System C33D-E898                                           
├─sda2 ext4     1.0   rootMX21   9516aedd-efb0-43ab-852a-52112c7d692f    423G     1% /
└─sda3 swap     1     swapMX     4d1151dc-3a06-4915-bfb5-7ae9898b4ec4                
sdb                                                                                  
└─sdb1 vfat     FAT32 MX-LIVE    70BC-69D8                                           

(MX_21_Wildflower_) Sun Mar 26 12:08:29 /
I guess that means the ESP is not mounted. I tried something I saw in another post (without really understanding what I am doing):

Code: Select all

chroot> sudo mount /dev/sda1 /boot/efi
mount: /boot/efi: mount point does not exist.
The selection of GRUB installation is here:
Do choose "Customize disk layout" - not "Regular install entire disk",
b/c the drive was already prepared with partitions, just re-use existing partitons:
minstaller-customize-disk-layout.jpg
In this example choosing only ESP and root-partition:
minstaller-choose-partitions.jpg
and confirm partitions selected:
minstaller-confirm-partitions.jpg
Next windows show GRUB installer selection:
minstaller-choose-grub.jpg
Disable GRUB to avoid the NVRAM hanger:
minstaller-unselect-grub.jpg
After installer finished, don't reboot:
minstaller-dont-reboot.jpg
Next run as instructed ...
+++EDIT+++
Added instructions (in the above post) with running
update-grub
within the chroot terminal.
So if that works you can probably boot into the system with help of LiveUSB->Boot/GRUB rescue -> and select
to search for efi-GRUB loader
or just the GRUB-menu files grub.cfg
You do not have the required permissions to view the files attached to this post.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

gmerguez
Posts: 5
Joined: Fri Mar 24, 2023 11:26 am

Re: Grub cannot be installed (installer stops at 95%)

#9 Post by gmerguez »

Thank you, I am back to MX 21.3, installed without GRUB. I did not check the swap partition in the installer. It seems the ESP is mounted this time:

Code: Select all

chroot> lsblk -f
NAME   FSTYPE   FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs 4.0                                                                  
sda                                                                                  
├─sda1 vfat     FAT32 EFI System C33D-E898                               252M     0% /boot/efi
├─sda2 ext4     1.0   rootMX21   e3bb479c-718e-4fd3-8ea8-521f453daad9  422.9G     1% /
└─sda3 swap     1     swapMX     4d1151dc-3a06-4915-bfb5-7ae9898b4ec4                [SWAP]
sdb                                                                                  
└─sdb1 vfat     FAT32 MX-LIVE    664D-5FEC                                           

the GRUB-install went through, too:

Code: Select all

chroot> grub-install   --no-nvram --force-extra-removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX21 --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.
I shut down the computer and had a look into the UEFI setup. I am not sure what to look for, but it is an extremely limited utility (does not even offer legacy BIOS mode) and I do not see how to do anything meaningful to the NVRAM there. I played with the different options in the LiveUSB boot menus but wound up booting the Live system again. Maybe I missed something there?

So I went back to chroot-rescue-scan and tried grub-install with writing NVRAM:

Code: Select all

Visiting distro MX_21.3_Wildflower_
Directory: /mnt/chroot-rescue-scan/rootMX21  Device: sda2
Use the exit command or <ctrl>-d to return to main menu
===============================================================================
root@mx1:/# grub-install   --force-extra-removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX21 --recheck
Installing for x86_64-efi platform.
grub-install: error: cannot find a device for /boot/efi (is /dev mounted?).
root@mx1:/# lsblk -f
lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory
Looks like I really got pretty far this time, but I have no idea how to proceed now.

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: Grub cannot be installed (installer stops at 95%)

#10 Post by fehlix »

gmerguez wrote: Sun Mar 26, 2023 10:13 am I shut down the computer and had a look into the UEFI setup. I am not sure what to look for, but it is an extremely limited utility (does not even offer legacy BIOS mode) and I do not see how to do anything meaningful to the NVRAM there. I played with the different options in the LiveUSB boot menus but wound up booting the Live system again. Maybe I missed something there?
Maybe you just didn't generated the GRUB menu ( the /boot/grub/grub.cfg file).
grub-install is not enough, it needs the grub.cfg menu files:
As mentioned within chroot-terminal
run

Code: Select all

update-grub
So in case it workes, you should find the Boot-rescue menu entry within the LiveUSB GRUB menu,
the option to scan for efi-GRUB loader or grub.cfg GRUB menus.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “Installation”