You are not logged in.

#1 2025-05-08 10:25

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Grub not starting at boot after maintenance- cannot launch OS

Hi Q4OS users,

I have a Q4OS AQUARIUS installed directly on my Windows in a /Windows/Linux64/ directory.

I was doing some maintenance yesterday and I suspect BleachBit (as user role not sudo) or "sudo apt autoremove" corrupted my grub files also this last action removed some linux headers only.

SYMPTOM
I cannot launch OS, grub menu never appears.

ACCESS TO FILE SYSTEM OK
I manage to get it displayed JUST BY PLUGING A USB STICK WITH Q4OS 5.0 AQUA which makes my native grub entries displayed on the screen. I therefore CAN GET IN THE SYSTEM ("ouf !!" as we say in French).

BUT PROBLEM REMAINS IF I REMOVE THE USB STICK.

I found out /boot/grub/grub.cfg was created / modified exactly when I was doing my maintenance things

What I then tried :

1. I keep a backup of /boot/grub/grub.cfg in the same folder.
2. I copied the one from the portable OS instaed to replace it > NOK
3. I regenerated it with "sudo grub-update" > NOK
4. I changed manually some path to files (hoping to solve in the meantime the "/EFI/Debian image not found") > NOK
5. I removed lines at the beginning which were looking for previous entries and doing some "obscure" things to me > NOK
6. I renamed all /boot/grub/ files so that none be named as grub.cfg > NOK

TEMPORARY CONCLUSIONS

At that stage I am thinking "On startup system doesn't use /boot/grub/grub.cfg".

Ok. Then I have a lot of "grub" and others files in :
- /mnt/host/Linux64/Debian12_S001/winboot/EFI where /mnt/host/ is my Windows disk.
- No file in /mnt/host/Linux64/Debian12_S001/install/boot/grub/

Noe of those folders / files have been modified yesterday at that very moment when I took wrong actions.....

CAN SOMEONE GIVE ME A CLUE ON HOW I COULD GET BACK MY GRUB MENU WITHOUT THE USB STICK PLEASE ?

Thank you.

Alexandre

Offline

#2 2025-05-08 10:49

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,846
Website

Re: Grub not starting at boot after maintenance- cannot launch OS

Try to run:
$ sudo update-efigrub
reboot and post back

Or try to go to BIOS and select the Q4OS EFI boot entry.

Also run:
$ sudo efibootmgr -v
and post back the output

Offline

#3 2025-05-08 11:40

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Re: Grub not starting at boot after maintenance- cannot launch OS

Thank you Q4OS team member.

First command isn't known on my system.

Second gives :
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0006,2003,0005,2001,2002
Boot0000* EFI PXE 0 for IPv4 (D4-93-90-27-0E-5A)        PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/MAC(d49390270e5a,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
Boot0001* EFI PXE 0 for IPv6 (D4-93-90-27-0E-5A)        PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/MAC(d49390270e5a,0)/IPv6([::]:<->[::]:,0,0)RC
Boot0002* EFI USB Device (USB DISK 2.0) UsbWwid(6557,21,0,90001886E8B0CC2)/CDROM(1,0x514,0xa000)RC
Boot0005* Windows Boot Manager  HD(1,GPT,a82660d5-a5a6-4b99-b62c-0aa13e36d794,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.}...e................
Boot0006* Q4OS Aquarius HD(1,GPT,a82660d5-a5a6-4b99-b62c-0aa13e36d794,0x800,0x82000)/File(\EFI\DebianBoot\shimx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.e.f.5.1.b.b.e.c.-.4.3.d.1.-.1.1.e.e.-.8.e.4.0.-.c.3.4.e.9.5.7.e.d.5.6.2.}...e................
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

I am going to go to BIOS and give some feedback.

---- AFTER REBOOT ----
BIOS seems OK. EFI enabled as secured boot too.
First option is Q4OS Aquarius as seen on the picture.

---- LOOKING FOR RIGHT BOOT FILES ----
Here is the result of lsblk. My Linux is on /dev/loop0 ; shouldn't I have a 'boot' tag here ?

NAME        FSTYPE   FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0       ext4     1.0            5f5b6f47-950d-4469-8242-2fdc46700607  224,4G    55% /
loop1       squashfs 4.0                                                       0   100% /snap/bare/5
loop2       squashfs 4.0                                                       0   100% /snap/core18/2846
loop3       squashfs 4.0                                                       0   100% /snap/core18/2855
loop4       squashfs 4.0                                                       0   100% /snap/core20/2501
loop5       squashfs 4.0                                                       0   100% /snap/core20/2571
loop6       squashfs 4.0                                                       0   100% /snap/core22/1908
loop7       squashfs 4.0                                                       0   100% /snap/core22/1963
loop8       squashfs 4.0                                                       0   100% /snap/core24/739
loop9       squashfs 4.0                                                       0   100% /snap/core24/888
loop10      squashfs 4.0                                                       0   100% /snap/gnome-3-28-1804/198
loop11      squashfs 4.0                                                       0   100% /snap/gnome-3-38-2004/143
loop12      squashfs 4.0                                                       0   100% /snap/gnome-42-2204/176
loop13      squashfs 4.0                                                       0   100% /snap/gnome-42-2204/202
loop14      squashfs 4.0                                                       0   100% /snap/gtk-common-themes/1535
loop15      squashfs 4.0                                                       0   100% /snap/restfox/57
loop16      squashfs 4.0                                                       0   100% /snap/restfox/58
loop17      squashfs 4.0                                                       0   100% /snap/snapd/23771
loop18      squashfs 4.0                                                       0   100% /snap/snapd/24505
loop19      squashfs 4.0                                                       0   100% /snap/wireguard-dtp/25
loop20      squashfs 4.0                                                       0   100% /snap/wireguard-dtp/29
nvme0n1                                                                                 
├─nvme0n1p1 vfat     FAT32 SYSTEM   CCD7-DED7                             198,8M    22% /boot/efi
├─nvme0n1p2                                                                             
├─nvme0n1p3 ntfs           Recovery 8868D82A68D81930                                   
└─nvme0n1p4 ntfs           Windows  0A58E4DD58E4C911                      236,8G    75% /mnt/host
nvme1n1                                                                                 
├─nvme1n1p1                                                                             
└─nvme1n1p2 ntfs           Data     A0C62BECC62BC200

Last edited by alexandremassoutier (2025-05-08 14:20)


Attachments:
jpg BIOS_image.jpg, Size: 289.34 KiB, Downloads: 20

Offline

#4 2025-05-08 15:03

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,846
Website

Re: Grub not starting at boot after maintenance- cannot launch OS

alexandremassoutier wrote:

First command isn't known on my system.

So, run this command:
$ sudo update-sbgrub
and reboot

Also run command:
$ ls -l /boot/efi/EFI/DebianBoot/
and post back its output.

Offline

#5 2025-05-08 23:20

josek
Member
Registered: 2025-02-23
Posts: 38

Re: Grub not starting at boot after maintenance- cannot launch OS

Hi, I just deleted that folder from /boot/efi/EFI/DebianBoot/ yesterday
because it showed me that it was empty, and the one on my OS on my Q40S Aquarius was the original one.
I was just afraid that was going to happen to me. By any chance, do you not have a backup in Timeshift?

Last edited by josek (2025-05-09 15:21)

Offline

#6 2025-05-08 23:39

crosscourt
Member
From: Wash DC
Registered: 2017-05-07
Posts: 2,261
Website

Re: Grub not starting at boot after maintenance- cannot launch OS

Josek do you mean Timeshift?


Q4OS Aquarius 5.x KDE   Dell Inspiron 3670, Dell Latitude 5450

Offline

#7 2025-05-09 00:56

josek
Member
Registered: 2025-02-23
Posts: 38

Re: Grub not starting at boot after maintenance- cannot launch OS

Yes

Offline

#8 2025-05-09 01:03

crosscourt
Member
From: Wash DC
Registered: 2017-05-07
Posts: 2,261
Website

Re: Grub not starting at boot after maintenance- cannot launch OS

You might want to edit your post josek as it reads timeshxx at the moment.....

Last edited by crosscourt (2025-05-09 18:39)


Q4OS Aquarius 5.x KDE   Dell Inspiron 3670, Dell Latitude 5450

Offline

#9 2025-05-09 15:22

josek
Member
Registered: 2025-02-23
Posts: 38

Re: Grub not starting at boot after maintenance- cannot launch OS

done

Offline

#10 2025-05-09 18:40

crosscourt
Member
From: Wash DC
Registered: 2017-05-07
Posts: 2,261
Website

Re: Grub not starting at boot after maintenance- cannot launch OS

Thanks smile


Q4OS Aquarius 5.x KDE   Dell Inspiron 3670, Dell Latitude 5450

Offline

#11 2025-05-10 08:06

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Re: Grub not starting at boot after maintenance- cannot launch OS

Thanks for replies.

I cannot use TimeShift on a "Q4OS within Windows" installation. File system not compatible with rsync (or else) method (I am saying this from memory).

I managed to get out my ssd m2 and to set it into a shell so that I can access it and mount it.
It appears /boot/efi/ IS NOW EMPTY.
There should be :
/boot/efi/EFI/DebianBoot/___.efi
/boot/efi/EFI/debian/___.efi
/boot/efi/EFI/Microsoft___.efi
And one another I don't remember.

I HAVE NO BACKUP OF THOSE.

Could someone tell me where I could get copies of this folder please ?

NOTES :
1) I did not try Q4OS team proposal "sudo update-sbgrub" since I cannot access the system.
2) I mounted the system on another computer and launched a boot-repair live USB ; my SSD to be repaired is on loop1 biut boot-repair doesn't see it and I am not sure it could repair it.

Files I am looking for are also in sdd1 but I don't know if I can just reuse it and besides I don't know where they are (sdd1 isn't actually a removable peripheral).
sdd1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files:        /efi/Boot/bootx64.efi /efi/Boot/grubx64.efi
                       /efi/DebianBoot/fbx64.efi /efi/DebianBoot/grubia32.efi
                       /efi/DebianBoot/grubx64.efi /efi/DebianBoot/mmx64.efi
                       /efi/DebianBoot/shimx64.efi /efi/DebianBoot/grub.cfg
                       /efi/debian/grub.cfg
                       /efi/Microsoft/Boot/SecureBootRecovery.efi
                       /efi/Microsoft/Boot/bootmgfw.efi
                       /efi/Microsoft/Boot/bootmgr.efi


Thank you.

Last edited by alexandremassoutier (2025-05-10 08:33)


Attachments:
txt Boot-Info_20250510_0633.txt, Size: 25.6 KiB, Downloads: 10

Offline

#12 2025-05-10 12:33

josek
Member
Registered: 2025-02-23
Posts: 38

Re: Grub not starting at boot after maintenance- cannot launch OS

If the Q4OS installer for Windows followed a traditional Wubi model, it may not have placed the standard boot files (\EFI\DebianBoot, \EFI\debian, etc.) on the EFI System Partition (ESP) of your SSD (nvme0n1p1). Instead, these methods typically rely on a bootloader loaded by the Windows boot loader (BCD), which then looks for the necessary files (the kernel, initrd, GRUB, etc.) within the Q4OS installation directory on the Windows NTFS partition.

If your /boot/efi is empty (assuming /boot/efi is where you mount nvme0n1p1), confirm that the Boot0006 entry you saw earlier (\EFI\DebianBoot\shimx64.efi) wasn't working for this type of installation anyway. That entry was either created by a failed standard repair attempt, or it was never the correct way to boot your system.

Files on sdd1: The list of files you found on sdd1 (/efi/Boot, /efi/DebianBoot, /efi/Microsoft) are not the files you need to repair your specific Q4OS installation. These files are the standard UEFI bootloaders located on the ESP partition of another system (probably the computer where you connected your SSD or bootable USB drive). Copying these standard files to your SSD's ESP (nvme0n1p1) will not work, because those standard bootloaders don't know how to find your Q4OS system inside the loopback file on your Windows NTFS partition.

Boot Repair Live USB. They are not designed to detect or repair Wubi/loopback installations inside Windows NTFS partitions. It's normal for it not to detect your system on /dev/loop0.

You should focus your efforts on finding and restoring the bootloader that actually knows how to boot Q4OS from its location within your Windows NTFS partition.

Offline

#13 2025-05-10 13:27

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,846
Website

Re: Grub not starting at boot after maintenance- cannot launch OS

Q4OS installer places boot files in this folder "<ESP>/EFI/DebianBoot/". If it's empty now, you have lost EFI boot files some way, so you need to give them back. One way would be to proceed a fresh installation to get ESP files back. You can save "root.disk" file, and replace the new one after the install process to get your original filesystem. We strongly recommend you to backup all your important Linux data prior that action as it's risky one.

Last edited by q4osteam (2025-05-10 13:34)

Offline

#14 2025-05-10 13:39

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Re: Grub not starting at boot after maintenance- cannot launch OS

Thank you Josek for this very useful clarification.

1) Ok I'll investigate my folder C:/Windows/Linux64/Debian0012/.... where there are / were files used to boot the PC.
Second option : look for Windows Boot Loader itself you mention as BCD.
Could GPARTED be of help in this process ?

2) Since I cannot access BIOS (because of the manipulations I did I think) of the PC of which I extracted the SSD to connect to, it is true I am using another computer on which I plugged the SSD I removed from the PC I want to get on feet again.

3) About Boot0006. I will try to re-run "sudo efibootmgr -v" from the computer I am using to mount the SSD and the Linux partition.
However I don't know if it will find anything that is on the SSD ; it may tell me about the computer I am using.... I'll give it a try.
In the result I had above (I was still abole to access the broken PC thanks to a Live Aquarius USB) I had :
Boot0002* EFI USB Device (USB DISK 2.0) UsbWwid(6557,21,0,90001886E8B0CC2)/CDROM(1,0x514,0xa000)RC
> Boot0005* Windows Boot Manager  HD(1,GPT,a82660d5-a5a6-4b99-b62c-0aa13e36d794,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.}...e................
> Boot0006* Q4OS Aquarius HD(1,GPT,a82660d5-a5a6-4b99-b62c-0aa13e36d794,0x800,0x82000)/File(\EFI\DebianBoot\shimx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.e.f.5.1.b.b.e.c.-.4.3.d.1.-.1.1.e.e.-.8.e.4.0.-.c.3.4.e.9.5.7.e.d.5.6.2.}...e................

The \EFI\Microsoft\Boot\bootmgfw.efi is - I thought - what appeared to be missing in the C://Windows/Linux64/DebianS0012/.... But I am probably wrong.

I am attaching two pictures of my tree structure of the C:/Windows/Linux64 folder.

I am seeing bat files that could perhaps be of help? Like fixefiboot.bat ? Has someone some XP with those ? Shaall I dig into what they do ?

4) Do you think I should try to boot the computer I use with Boot-Repair Live USB WITH THE SSD ?

Thank you again for the help you are providing guys and girls.

Last edited by alexandremassoutier (2025-05-10 13:41)


Attachments:
jpg 20250510_141858_TREE_1.jpg, Size: 290.34 KiB, Downloads: 17

Offline

#15 2025-05-10 13:43

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Re: Grub not starting at boot after maintenance- cannot launch OS

Image I cannot add in the previous POST.

Offline

#16 2025-05-10 13:46

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,846
Website

Re: Grub not starting at boot after maintenance- cannot launch OS

alexandremassoutier wrote:

Image I cannot add in the previous POST.

You can edit a post to add multiple attachments.

Offline

#17 2025-05-10 15:06

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Re: Grub not starting at boot after maintenance- cannot launch OS

Sorry smthg went wrong ; 2nd image was rejected. Trying again.

DOESN'T WORK - error = Max limit exeeced although file is 309Ko

2nd image shows :
C:/Windows/linux64/Debian12_S001/winboot/EFI/disks (d)
C:/Windows/linux64/Debian12_S001/winboot/EFI/install (d)
C:/Windows/linux64/Debian12_S001/winboot/EFI/winboot (d)
C:/Windows/linux64/Debian12_S001/winboot/EFI/copylog.bat
C:/Windows/linux64/Debian12_S001/winboot/EFI/fixefiboot.bat
C:/Windows/linux64/Debian12_S001/winboot/EFI/mountefi.bat
C:/Windows/linux64/Debian12_S001/winboot/EFI/uninstall-wubi.exe

Last edited by alexandremassoutier (2025-05-10 15:11)

Offline

#18 2025-05-11 09:48

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Re: Grub not starting at boot after maintenance- cannot launch OS

Hi readers,

Update on my situation just to share info in case it be useful for anyone.

1) On a maintenance computer I :
- plugged the SSD M2 that is faulty on the boot
- enabled UEFI boot
- allow a UEFI start on a shellx64.efi

Doing so, on reboot, i see the "regular" following message on black screen :
Failed to open \EFI\DebianBoot\.... - Not found
Failed to boot image ISO - Not found
Start_image() referenced - Not found

I USED TO HAVE THAT ON THE PC TO BE REPAIRED

Then I have the grub with three entries I was used to :
- Q4OS
- Windows
- BootManager

Windows works fine.
Launching Q4OS fails on the following error message :
Boot chainload, phase 1
umount: can't umount /host1: invalid argument
Host filesytem not found, make Windows partition accessible.
Press [Enter] to reboot...

I don't yet understand where the problem is but it is a new step.

NOTE : when starting the maintenance computer on linux, I CAN MOUNT C:/Windows/Linux64/Debian12_S001/disks/root.disk

Offline

#19 2025-05-11 18:58

josek
Member
Registered: 2025-02-23
Posts: 38

Re: Grub not starting at boot after maintenance- cannot launch OS

The "Host file system not found" error you saw on the maintenance computer is likely a symptom of trying to boot a Wubi-style installation in a different hardware environment than the one designed for. Don't focus too much on resolving this error on the maintenance computer, as the goal is to boot on your regular computer.
Your original problem was that the GRUB menu wouldn't even appear without the USB drive on the original computer. Now, on the maintenance computer, the menu appears. This suggests that:

1. The steps you took in removing the disk and testing it (even if you didn't run the scripts yet) modified something that allowed GRUB from the EFI partition to load on that computer.

2. Or, and this is important, the original problem could be more related to a specific interaction between the SSD's EFI partition and the original computer's UEFI firmware, which prevented the Boot0006* Q4OS Aquarius entry from loading GRUB from the ESP correctly without the USB drive.

Option 1 (GRUB Alternative): If Option 1 doesn't work, or if you prefer to try this option first, put the SSD back in the original computer. Boot the computer with the Q4OS USB flash drive, but select the option to boot YOUR INSTALLED INSTALLATION from the hard drive.

Once inside the installed Q4OS, run:

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Q4OS_Aquarius --recheck --no-floppy and then sudo update-grub.

Reboot without the USB flash drive.

Why: This repairs the GRUB files on the EFI partition and regenerates the main configuration file for your installation, ensuring everything is correctly linked to the original computer's hardware.

The "Host file system not found" error you saw on the maintenance computer is likely a symptom of an attempted boot.

Your priority now is to put the SSD back in the original computer and try Option 1.

Option 2 would be...
1. Put the SSD back in the original computer where Q4OS was installed.
2. Turn on that computer and start Windows normally. If Windows doesn't boot, let me know; we'll need a different method.
3. Once inside Windows, open File Explorer (you can press Windows key + E).
4. Navigate to the folder where you found the fixefiboot.bat file. According to your list, the path is: C:\Windows\linux64\Debian12_S001\winboot\EFI\ (You may need to adjust the drive letter if your Windows partition isn't C:, but it usually is).
5. Locate the file named fixefiboot.bat.
6. Right-click the fixefiboot.bat file.
(Run as administrator)
7. When finished, restart and remove the USB drive before the computer restarts completely (right after the screen turns off or the BIOS/UEFI tells you to).

Offline

#20 2025-05-12 07:30

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Re: Grub not starting at boot after maintenance- cannot launch OS

Thank you very very much Josep for taking some of your time to guide me.
I'll try today and five some feed back.

Offline

#21 2025-05-13 07:51

alexandremassoutier
Member
Registered: 2022-08-13
Posts: 18

Re: Grub not starting at boot after maintenance- cannot launch OS

Some feedback upon Josek's advises.

"Option 1 (GRUB Alternative)" above didn't work. Although USB LIVE Q4OS be plugged into, computer remained on manufacturer screen on startup
"Option 2" above didn't actually worked; I mean I could execute as administrator  the fixefiboot.bat but once SSD be in the original computer I stayed again on the  manufacturer screen.

Therefore problem could be as Josek says that "the original problem could be more related to a specific interaction between the SSD's EFI partition and the original computer's UEFI firmware".

I decided to call the manufacturer. I explained all steps I took. They told be to send back the computer. They think there is a hardware problem otherwise I could not be able to launch from the maintenance computer.

I will post any more info that could be of use when my PC will be back (3 or 4 weeks I am afraid :-(  !! )

Thank you again Josek. I don't forget the  commands "sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Q4OS_Aquarius --recheck --no-floppy and then sudo update-grub." which may be of use once I get the computer back if Q4OS startup is still faulty.

Offline

Board footer

Powered by FluxBB