You are not logged in.

#1 2023-11-21 23:27:15

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

GRUB Update does not find other OS when running in mounted env

I'm using Arch Linux in dual boot with Windows. I note that sometimes when I reboot my system, in GRUB the Windows entry disappears and remains only my Arch Linux entry.

To make the Windows entry appearing again, I login on my Arch Linux environment and I run "update-grub" (alias for "sudo grub-mkconfig -o /boot/grub/grub.cfg").

Today, when I got the same issue, where also my Arch entry was deleted, I used a USB Live Environment Arch-based to restore the GRUB by mounting the volumes and running arch-chroot on mounted point, and then running grub-install and update-grub.

What I noted is that:

When I run update-grub in my normal Arch Linux system, Windows OS entry is recovered in GRUB. When I run update-grub in a USB Live Environment in an arch-chrooted environment, it cannot find the Windows OS entry and Windows entry is not restored iin GRUB.

Why in Live Environment arch-chrooted env the command update-grub is not able to find Windows entry?

Offline

#2 2023-11-22 10:17:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,844

Re: GRUB Update does not find other OS when running in mounted env

The partition containing the Windows UEFI binary needs to be mounted when you run the update command, is that the case? The actual ntfs partition in case of a BIOS boot.

The fact that this "randomly" happens might also suggest you are booting distinct and different grubs for "reasons".

What do you get from

efibootmgr -uv
lsblk -f
cat /boot/grub/grub.cfg

https://wiki.archlinux.org/title/List_o … n_services

Offline

#3 2023-11-22 18:01:18

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

Re: GRUB Update does not find other OS when running in mounted env

If I run them currently (I already restored Windows boot entry):

"efibootmgr -uv" output

BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000
Boot0000* Windows Boot Manager	HD(1,GPT,71e827d6-2276-46f2-816b-881e51c53d30,0x800,0x96000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)䥗䑎坏S
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 60 09 00 00 00 00 00 d6 27 e8 71 76 22 f2 46 81 6b 88 1e 51 c5 3d 30 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 49 00 43 00 52 00 4f 00 53 00 4f 00 46 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 4d 00 47 00 46 00 57 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
    data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 0c 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0001* GRUB	HD(1,GPT,71e827d6-2276-46f2-816b-881e51c53d30,0x800,0x96000)/File(\EFI\GRUB\GRUBX64.EFI)
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 60 09 00 00 00 00 00 d6 27 e8 71 76 22 f2 46 81 6b 88 1e 51 c5 3d 30 02 02 / 04 04 30 00 5c 00 45 00 46 00 49 00 5c 00 47 00 52 00 55 00 42 00 5c 00 47 00 52 00 55 00 42 00 58 00 36 00 34 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00

"lsblk -f" output

NAME FSTYPE FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                               
├─sda1
│    ntfs         Data        585CD7885CD75EF6                                    
├─sda2
│    ntfs         BIOS_RVY    AA88D91A88D8E63B                                    
└─sda3
     btrfs                    c22ab153-e6ad-4a8c-9826-d48baabad590   67.2G    24% /
zram0
                                                                                  [SWAP]
nvme0n1
                                                                                  
├─nvme0n1p1
│    vfat   FAT32             E856-25BA                             268.9M     9% /boot/efi
├─nvme0n1p2
│    ntfs                     2E1A68031A67C705                                    
└─nvme0n1p3
     ntfs         WinRE tools 9E8ED2E08ED2AFCF 

"cat /boot/grub/grub.cfg" output: https://pastebin.com/uRUTYVBM

About mounting partition containing Windows UEFI binary, I just need to run "mount /dev/nvme0n1p1 /mnt/boot/efi" and then arch-chroot there and run "update-grub"?

Last edited by D3vil0p3r (2023-11-22 20:32:59)

Offline

#4 2023-11-22 20:42:18

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

Re: GRUB Update does not find other OS when running in mounted env

Now I show you the scenario where Windows boot entry disappeared. For example, now I don't have Windows boot entry and I have only Arch Linux one. To show you that when I chroot to the system I'm not able to restore the Windows entry by grub-mkconfig command, I used a USB stick to boot on a Live Environment, then I mounted my target system and I accessed to the mounted partition by arch-chroot command.

So, now I am inside it by arch-chroot. If I run the same commands you asked me above:

"efibootmgr -uv" output

BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0001,0002,0000
Boot0000* Windows Boot Manager	HD(1,GPT,71e827d6-2276-46f2-816b-881e51c53d30,0x800,0x96000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)䥗䑎坏S
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 60 09 00 00 00 00 00 d6 27 e8 71 76 22 f2 46 81 6b 88 1e 51 c5 3d 30 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 49 00 43 00 52 00 4f 00 53 00 4f 00 46 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 4d 00 47 00 46 00 57 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
    data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 0c 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0001* GRUB	HD(1,GPT,71e827d6-2276-46f2-816b-881e51c53d30,0x800,0x96000)/File(\EFI\GRUB\grubx64.efi)
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 60 09 00 00 00 00 00 d6 27 e8 71 76 22 f2 46 81 6b 88 1e 51 c5 3d 30 02 02 / 04 04 30 00 5c 00 45 00 46 00 49 00 5c 00 47 00 52 00 55 00 42 00 5c 00 67 00 72 00 75 00 62 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
Boot0002* UEFI: KingstonDataTraveler 3.0PMAP, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/HD(1,MBR,0x2d801cf,0x800,0x1d49a00)
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 14 / 03 05 06 00 00 00 / 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 9a d4 01 00 00 00 00 cf 01 d8 02 00 00 00 00 00 00 00 00 00 00 00 00 01 01 / 7f ff 04 00
    data: 00 00 42 4f

"lsblk -f" output

NAME        FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0
sda
├─sda1
├─sda2
└─sda3                                74.4G    16% /
sdb
└─sdb1
nvme0n1
├─nvme0n1p1                          268.9M     9% /boot/efi
├─nvme0n1p2
└─nvme0n1p3

Note that nvme0n1p1 is the partition containing GRUB and Windows UEFI while /dev/sda3 is the partition containing my Linux system.

"cat /boot/grub/grub.cfg" output: https://pastebin.com/v2bFc5G0

In this chroot environment, if I run "grub-mkconfig -o /boot/grub/grub.cfg", the output does not produce a line saying it detects Windows boot, but it produces:

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/athena/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-zen-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Unmount /tmp/grub-btrfs.13OPcQjSsm .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

and in "grub.cfg" there is no Windows boot entry despite the Windows UEFI partition seems to be mounted and accessible in this chroot environment:

tree /boot

/boot
├── efi
│   ├── EFI
│   │   ├── Boot
│   │   │   └── bootx64.efi
│   │   ├── GRUB
│   │   │   └── grubx64.efi
│   │   └── Microsoft
│   │       ├── Boot
│   │       │   ├── BCD
│   │       │   ├── BCD.LOG
│   │       │   ├── bg-BG
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── bootmgfw.efi
│   │       │   ├── bootmgr.efi
│   │       │   ├── BOOTSTAT.DAT
│   │       │   ├── boot.stl
│   │       │   ├── CIPolicies
│   │       │   │   └── Active
│   │       │   │       ├── {5DAC656C-21AD-4A02-AB49-649917162E70}.cip
│   │       │   │       ├── {82443e1e-8a39-4b4a-96a8-f40ddc00b9f3}.cip
│   │       │   │       └── {CDD5CB55-DB68-4D71-AA38-3DF2B6473A52}.cip
│   │       │   ├── cs-CZ
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── da-DK
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── de-DE
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── el-GR
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── en-GB
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── en-US
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── es-ES
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── es-MX
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── et-EE
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── fi-FI
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── Fonts
│   │       │   │   ├── chs_boot.ttf
│   │       │   │   ├── cht_boot.ttf
│   │       │   │   ├── jpn_boot.ttf
│   │       │   │   ├── kor_boot.ttf
│   │       │   │   ├── malgun_boot.ttf
│   │       │   │   ├── malgunn_boot.ttf
│   │       │   │   ├── meiryo_boot.ttf
│   │       │   │   ├── meiryon_boot.ttf
│   │       │   │   ├── msjh_boot.ttf
│   │       │   │   ├── msjhn_boot.ttf
│   │       │   │   ├── msyh_boot.ttf
│   │       │   │   ├── msyhn_boot.ttf
│   │       │   │   ├── segmono_boot.ttf
│   │       │   │   ├── segoen_slboot.ttf
│   │       │   │   ├── segoe_slboot.ttf
│   │       │   │   └── wgl4_boot.ttf
│   │       │   ├── fr-CA
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── fr-FR
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── hr-HR
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── hu-HU
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── it-IT
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── ja-JP
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── kd_02_10df.dll
│   │       │   ├── kd_02_10ec.dll
│   │       │   ├── kd_02_1137.dll
│   │       │   ├── kd_02_14e4.dll
│   │       │   ├── kd_02_15b3.dll
│   │       │   ├── kd_02_1969.dll
│   │       │   ├── kd_02_19a2.dll
│   │       │   ├── kd_02_1af4.dll
│   │       │   ├── kd_02_8086.dll
│   │       │   ├── kd_07_1415.dll
│   │       │   ├── kd_0C_8086.dll
│   │       │   ├── kdnet_uart16550.dll
│   │       │   ├── kdstub.dll
│   │       │   ├── ko-KR
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── lt-LT
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── lv-LV
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── memtest.efi
│   │       │   ├── nb-NO
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── nl-NL
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── pl-PL
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── pt-BR
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── pt-PT
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── qps-ploc
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── Resources
│   │       │   │   ├── bootres.dll
│   │       │   │   └── en-US
│   │       │   │       └── bootres.dll.mui
│   │       │   ├── ro-RO
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── ru-RU
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── sk-SK
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── sl-SI
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── sr-Latn-RS
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── sv-SE
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── tr-TR
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   ├── uk-UA
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   └── bootmgr.efi.mui
│   │       │   ├── winsipolicy.p7b
│   │       │   ├── zh-CN
│   │       │   │   ├── bootmgfw.efi.mui
│   │       │   │   ├── bootmgr.efi.mui
│   │       │   │   └── memtest.efi.mui
│   │       │   └── zh-TW
│   │       │       ├── bootmgfw.efi.mui
│   │       │       ├── bootmgr.efi.mui
│   │       │       └── memtest.efi.mui
│   │       └── Recovery
│   └── System Volume Information
├── grub
│   ├── fonts
│   │   └── unicode.pf2
│   ├── grub-btrfs.cfg
│   ├── grub.cfg
│   ├── grubenv
│   ├── locale
│   │   ├── ast.mo
│   │   ├── ca.mo
│   │   ├── da.mo
│   │   ├── de_CH.mo
│   │   ├── de@hebrew.mo
│   │   ├── de.mo
│   │   ├── en@arabic.mo
│   │   ├── en@cyrillic.mo
│   │   ├── en@greek.mo
│   │   ├── en@hebrew.mo
│   │   ├── en@piglatin.mo
│   │   ├── en@quot.mo
│   │   ├── eo.mo
│   │   ├── es.mo
│   │   ├── fi.mo
│   │   ├── fr.mo
│   │   ├── gl.mo
│   │   ├── hr.mo
│   │   ├── hu.mo
│   │   ├── id.mo
│   │   ├── it.mo
│   │   ├── ja.mo
│   │   ├── ka.mo
│   │   ├── ko.mo
│   │   ├── lg.mo
│   │   ├── lt.mo
│   │   ├── nb.mo
│   │   ├── nl.mo
│   │   ├── pa.mo
│   │   ├── pl.mo
│   │   ├── pt_BR.mo
│   │   ├── pt.mo
│   │   ├── ro.mo
│   │   ├── ru.mo
│   │   ├── sl.mo
│   │   ├── sr.mo
│   │   ├── sv.mo
│   │   ├── tr.mo
│   │   ├── uk.mo
│   │   ├── vi.mo
│   │   ├── zh_CN.mo
│   │   └── zh_TW.mo
│   ├── themes
│   │   └── starfield
│   │       ├── blob_w.png
│   │       ├── boot_menu_c.png
│   │       ├── boot_menu_e.png
│   │       ├── boot_menu_ne.png
│   │       ├── boot_menu_n.png
│   │       ├── boot_menu_nw.png
│   │       ├── boot_menu_se.png
│   │       ├── boot_menu_s.png
│   │       ├── boot_menu_sw.png
│   │       ├── boot_menu_w.png
│   │       ├── COPYING.CC-BY-SA-3.0
│   │       ├── dejavu_10.pf2
│   │       ├── dejavu_12.pf2
│   │       ├── dejavu_14.pf2
│   │       ├── dejavu_16.pf2
│   │       ├── dejavu_bold_14.pf2
│   │       ├── README
│   │       ├── slider_c.png
│   │       ├── slider_n.png
│   │       ├── slider_s.png
│   │       ├── starfield.png
│   │       ├── terminal_box_c.png
│   │       ├── terminal_box_e.png
│   │       ├── terminal_box_ne.png
│   │       ├── terminal_box_n.png
│   │       ├── terminal_box_nw.png
│   │       ├── terminal_box_se.png
│   │       ├── terminal_box_s.png
│   │       ├── terminal_box_sw.png
│   │       ├── terminal_box_w.png
│   │       └── theme.txt
│   └── x86_64-efi
│       ├── acpi.mod
│       ├── adler32.mod
│       ├── affs.mod
│       ├── afs.mod
│       ├── afsplitter.mod
│       ├── ahci.mod
│       ├── all_video.mod
│       ├── aout.mod
│       ├── appleldr.mod
│       ├── archelp.mod
│       ├── ata.mod
│       ├── at_keyboard.mod
│       ├── backtrace.mod
│       ├── bfs.mod
│       ├── bitmap.mod
│       ├── bitmap_scale.mod
│       ├── bli.mod
│       ├── blocklist.mod
│       ├── boot.mod
│       ├── boottime.mod
│       ├── bsd.mod
│       ├── bswap_test.mod
│       ├── btrfs.mod
│       ├── bufio.mod
│       ├── cacheinfo.mod
│       ├── cat.mod
│       ├── cbfs.mod
│       ├── cbls.mod
│       ├── cbmemc.mod
│       ├── cbtable.mod
│       ├── cbtime.mod
│       ├── chain.mod
│       ├── cmdline_cat_test.mod
│       ├── cmp.mod
│       ├── cmp_test.mod
│       ├── command.lst
│       ├── configfile.mod
│       ├── core.efi
│       ├── cpio_be.mod
│       ├── cpio.mod
│       ├── cpuid.mod
│       ├── crc64.mod
│       ├── cryptodisk.mod
│       ├── crypto.lst
│       ├── crypto.mod
│       ├── cs5536.mod
│       ├── ctz_test.mod
│       ├── datehook.mod
│       ├── date.mod
│       ├── datetime.mod
│       ├── diskfilter.mod
│       ├── disk.mod
│       ├── div.mod
│       ├── div_test.mod
│       ├── dm_nv.mod
│       ├── echo.mod
│       ├── efifwsetup.mod
│       ├── efi_gop.mod
│       ├── efinet.mod
│       ├── efitextmode.mod
│       ├── efi_uga.mod
│       ├── ehci.mod
│       ├── elf.mod
│       ├── eval.mod
│       ├── exfat.mod
│       ├── exfctest.mod
│       ├── ext2.mod
│       ├── extcmd.mod
│       ├── f2fs.mod
│       ├── fat.mod
│       ├── file.mod
│       ├── fixvideo.mod
│       ├── font.mod
│       ├── fshelp.mod
│       ├── fs.lst
│       ├── functional_test.mod
│       ├── gcry_arcfour.mod
│       ├── gcry_blowfish.mod
│       ├── gcry_camellia.mod
│       ├── gcry_cast5.mod
│       ├── gcry_crc.mod
│       ├── gcry_des.mod
│       ├── gcry_dsa.mod
│       ├── gcry_idea.mod
│       ├── gcry_md4.mod
│       ├── gcry_md5.mod
│       ├── gcry_rfc2268.mod
│       ├── gcry_rijndael.mod
│       ├── gcry_rmd160.mod
│       ├── gcry_rsa.mod
│       ├── gcry_seed.mod
│       ├── gcry_serpent.mod
│       ├── gcry_sha1.mod
│       ├── gcry_sha256.mod
│       ├── gcry_sha512.mod
│       ├── gcry_tiger.mod
│       ├── gcry_twofish.mod
│       ├── gcry_whirlpool.mod
│       ├── geli.mod
│       ├── gettext.mod
│       ├── gfxmenu.mod
│       ├── gfxterm_background.mod
│       ├── gfxterm_menu.mod
│       ├── gfxterm.mod
│       ├── gptsync.mod
│       ├── grub.efi
│       ├── gzio.mod
│       ├── halt.mod
│       ├── hashsum.mod
│       ├── hdparm.mod
│       ├── hello.mod
│       ├── help.mod
│       ├── hexdump.mod
│       ├── hfs.mod
│       ├── hfspluscomp.mod
│       ├── hfsplus.mod
│       ├── http.mod
│       ├── iorw.mod
│       ├── iso9660.mod
│       ├── jfs.mod
│       ├── jpeg.mod
│       ├── json.mod
│       ├── keylayouts.mod
│       ├── keystatus.mod
│       ├── ldm.mod
│       ├── legacycfg.mod
│       ├── legacy_password_test.mod
│       ├── linux16.mod
│       ├── linux.mod
│       ├── loadbios.mod
│       ├── load.cfg
│       ├── loadenv.mod
│       ├── loopback.mod
│       ├── lsacpi.mod
│       ├── lsefimmap.mod
│       ├── lsefi.mod
│       ├── lsefisystab.mod
│       ├── lsmmap.mod
│       ├── ls.mod
│       ├── lspci.mod
│       ├── lssal.mod
│       ├── luks2.mod
│       ├── luks.mod
│       ├── lvm.mod
│       ├── lzopio.mod
│       ├── macbless.mod
│       ├── macho.mod
│       ├── mdraid09_be.mod
│       ├── mdraid09.mod
│       ├── mdraid1x.mod
│       ├── memdisk.mod
│       ├── memrw.mod
│       ├── minicmd.mod
│       ├── minix2_be.mod
│       ├── minix2.mod
│       ├── minix3_be.mod
│       ├── minix3.mod
│       ├── minix_be.mod
│       ├── minix.mod
│       ├── mmap.mod
│       ├── moddep.lst
│       ├── modinfo.sh
│       ├── morse.mod
│       ├── mpi.mod
│       ├── msdospart.mod
│       ├── mul_test.mod
│       ├── multiboot2.mod
│       ├── multiboot.mod
│       ├── nativedisk.mod
│       ├── net.mod
│       ├── newc.mod
│       ├── nilfs2.mod
│       ├── normal.mod
│       ├── ntfscomp.mod
│       ├── ntfs.mod
│       ├── odc.mod
│       ├── offsetio.mod
│       ├── ohci.mod
│       ├── part_acorn.mod
│       ├── part_amiga.mod
│       ├── part_apple.mod
│       ├── part_bsd.mod
│       ├── part_dfly.mod
│       ├── part_dvh.mod
│       ├── part_gpt.mod
│       ├── partmap.lst
│       ├── part_msdos.mod
│       ├── part_plan.mod
│       ├── part_sun.mod
│       ├── part_sunpc.mod
│       ├── parttool.lst
│       ├── parttool.mod
│       ├── password.mod
│       ├── password_pbkdf2.mod
│       ├── pata.mod
│       ├── pbkdf2.mod
│       ├── pbkdf2_test.mod
│       ├── pcidump.mod
│       ├── pgp.mod
│       ├── plainmount.mod
│       ├── play.mod
│       ├── png.mod
│       ├── priority_queue.mod
│       ├── probe.mod
│       ├── procfs.mod
│       ├── progress.mod
│       ├── raid5rec.mod
│       ├── raid6rec.mod
│       ├── random.mod
│       ├── rdmsr.mod
│       ├── read.mod
│       ├── reboot.mod
│       ├── regexp.mod
│       ├── reiserfs.mod
│       ├── relocator.mod
│       ├── romfs.mod
│       ├── scsi.mod
│       ├── search_fs_file.mod
│       ├── search_fs_uuid.mod
│       ├── search_label.mod
│       ├── search.mod
│       ├── serial.mod
│       ├── setjmp.mod
│       ├── setjmp_test.mod
│       ├── setpci.mod
│       ├── sfs.mod
│       ├── shift_test.mod
│       ├── signature_test.mod
│       ├── sleep.mod
│       ├── sleep_test.mod
│       ├── smbios.mod
│       ├── spkmodem.mod
│       ├── squash4.mod
│       ├── strtoull_test.mod
│       ├── syslinuxcfg.mod
│       ├── tar.mod
│       ├── terminal.lst
│       ├── terminal.mod
│       ├── terminfo.mod
│       ├── test_blockarg.mod
│       ├── testload.mod
│       ├── test.mod
│       ├── testspeed.mod
│       ├── tftp.mod
│       ├── tga.mod
│       ├── time.mod
│       ├── tpm.mod
│       ├── trig.mod
│       ├── tr.mod
│       ├── true.mod
│       ├── udf.mod
│       ├── ufs1_be.mod
│       ├── ufs1.mod
│       ├── ufs2.mod
│       ├── uhci.mod
│       ├── usb_keyboard.mod
│       ├── usb.mod
│       ├── usbms.mod
│       ├── usbserial_common.mod
│       ├── usbserial_ftdi.mod
│       ├── usbserial_pl2303.mod
│       ├── usbserial_usbdebug.mod
│       ├── usbtest.mod
│       ├── video_bochs.mod
│       ├── video_cirrus.mod
│       ├── video_colors.mod
│       ├── video_fb.mod
│       ├── videoinfo.mod
│       ├── video.lst
│       ├── video.mod
│       ├── videotest_checksum.mod
│       ├── videotest.mod
│       ├── wrmsr.mod
│       ├── xfs.mod
│       ├── xnu.mod
│       ├── xnu_uuid.mod
│       ├── xnu_uuid_test.mod
│       ├── xzio.mod
│       ├── zfscrypt.mod
│       ├── zfsinfo.mod
│       ├── zfs.mod
│       └── zstd.mod
├── initramfs-linux-zen-fallback.img
├── initramfs-linux-zen.img
├── intel-ucode.img
├── memtest86+
│   └── memtest.bin
├── syslinux
│   └── syslinux.cfg
└── vmlinuz-linux-zen

58 directories, 502 files

If I launch "os-prober" I don't get any output. The content of "/etc/default/grub" is:

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch Linux"
GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 audit=0 nvme_load=yes zswap.enabled=0 fbcon=nodefer nowatchdog"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
#GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME="/usr/share/grub/themes/athena/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=false

Last edited by D3vil0p3r (2023-11-22 21:12:53)

Offline

#5 2023-11-23 04:40:07

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,956

Re: GRUB Update does not find other OS when running in mounted env

Didn't we already cover this? Stop running grub-mkconfig!

Online

#6 2023-11-23 08:50:10

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

Re: GRUB Update does not find other OS when running in mounted env

Scimmia wrote:

Didn't we already cover this? Stop running grub-mkconfig!

Please, stop to answer by this kind of answers. It is a different issue and I'm getting the Windows entry missing even if I don't use anymore the grub-mkconfig in hook files, so forget that past post. Here the question is one: in Live Env, why in arch-chroot environment os-prober/grub-mkconfig command are not able to detect the Windows entry while efibootmgr actually detects it

Last edited by D3vil0p3r (2023-11-23 08:57:43)

Offline

#7 2023-11-23 15:33:31

-thc
Member
Registered: 2017-03-15
Posts: 595

Re: GRUB Update does not find other OS when running in mounted env

D3vil0p3r wrote:

Here the question is one: in Live Env, why in arch-chroot environment os-prober/grub-mkconfig command are not able to detect the Windows entry while efibootmgr actually detects it

You obviously have one or several wrong ideas on what is going on here - which leads to your confusion.

The "efibootmgr" utility shows you the contents on the EFI Boot Manager entries on your mainboard. You can access them via EFI (BIOS) setup.
The "Windows" entry there was created by the Windows Setup routine and is inactive (look at he "BootOrder") as long as the GRUB entry works.
Those entries have nothing to do with the GRUB boot menu.

I don't use "OS prober" for my Windoze dual boot but a static boot entry in "/etc/grub.d/40_custom":

menuentry 'Windows Boot Manager' {
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root XXXX-XXXX
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

where "XXXX-XXXX" is the UUID in the output of "sudo blkid /dev/xxxxxx" of the EFI partition.

Offline

#8 2023-11-25 17:44:16

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

Re: GRUB Update does not find other OS when running in mounted env

@Scimmia, I'm noting that, despite I removed all hooks related to update-grub, I guess that "snapper" application triggers it when something is installed, maybe because it needs to generate snapshots in BTRFS, so it changes "grub-btrfs.cfg" file and I guess this is the reason the grub update is run often, and probably it is the reason Windows continues to be removed. I guess that snapper needs this grub update when arch snapshots entries are created in GRUB. Not sure if there is a good way to manage this scenario.

Offline

Board footer

Powered by FluxBB