Windows boot option missing after MX21 install  [Solved]

When you run into problems installing MX Linux XFCE
Message
Author
User avatar
ramblinreub
Posts: 4
Joined: Sat Sep 30, 2006 10:54 pm

Windows boot option missing after MX21 install

#1 Post by ramblinreub »

A while ago I upgraded to MX21 from a previous MX by doing a clean install on my HP laptop. I wanted to retain my dual boot setup (Windows 10). When I did the MX install, the option to boot into Windows 10 disappeared from GRUB. I didn't care at the time because I don't use Windows much and I assumed I could fix it anytime. Well, I recently have been given a reason to care and was completely unsuccessful at adding Windows to the GRUB options. After doing much reading on this forum and other forums, I have tried changing the BIOS option to turn off Legacy support which failed. I got an error message instead of a GRUB screen the next time I booted it up. I know linux's boot mode is UEFI, and I assumed the Windows one is, too, but I'm not sure how to confirm that. I then changed the boot option in BIOS to try the Windows boot loader. That yielded the following error when I turned on the computer, "Error: symbol 'grub_disk_nature_sectors' not found". I used a live USB and selected the Windows bootloader option from that GRUB. It tried very briefly and returned, "Windows bootloader not found". I tried using the MX Boot Repair tool from that same live usb stick. I switched it to MBR, then to Root, then ESP. After changing the boot location each time, I booted up the computer MX (not the live usb MX) and ran 'update-grub'. At no time did the Windows option appear. Inside of MX I opened up the MX Boot Options tool and clicked on the Manage UEFI Boot Options button. The following screen actually lists the Windows Boot Manager, but has it greyed-out as inactive. I highlighted it and clicked on the 'Activate' button, but that did not seem to work, either. I was hoping this was an easy fix I could do in either the BIOS setup or the Boot Repair tool, but nothing I've tried works. I'm willing to re-install MX21 (now 21.2). I wonder if anyone knows how to A) diagnose and fix this problem without reinstalling, or B) tell me what options to set in a clean/re-install because I'm not confident I did that correctly originally. There were more options than in past MX versions and I'm afraid I don't recall all the options I chose. I prefer to keep up a practice I was taught years ago in keeping my root, home, and swap partitions all separate while maintaining (but resizing) whatever Windows partitions are already there.

Here are the specs of my machine:

Code: Select all

System:    Kernel: 5.10.0-18-amd64 [5.10.140-1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.0-18-amd64 
           root=UUID=<filter> ro quiet splash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.2_x64 Wildflower October 20  2021 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: HP product: HP Laptop 15-ef0xxx v: N/A serial: <filter> Chassis: 
           type: 10 serial: <filter> 
           Mobo: HP model: 86FD v: 99.37 serial: <filter> UEFI: AMI v: F.18 date: 06/12/2020 
Battery:   ID-1: BAT0 charge: 36.3 Wh (100.0%) condition: 36.3/36.3 Wh (100.0%) volts: 12.7 
           min: 11.3 model: Hewlett-Packard Primary type: Li-ion serial: N/A status: Full 
           cycles: 326 
CPU:       Info: Quad Core model: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx bits: 64 
           type: MT MCP arch: Zen family: 17 (23) model-id: 18 (24) stepping: 1 microcode: 8108109 
           cache: L2: 2 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 33534 
           Speed: 1265 MHz min/max: 1400/2100 MHz boost: enabled Core speeds (MHz): 1: 1265 
           2: 1226 3: 1223 4: 1366 5: 1227 6: 1315 7: 1314 8: 1351 
           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 mitigation: untrained return thunk; SMT vulnerable 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP: disabled, RSB 
           filling, PBRSB-eIBRS: Not affected 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: AMD Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] 
           vendor: Hewlett-Packard driver: amdgpu v: kernel bus-ID: 04:00.0 chip-ID: 1002:15d8 
           class-ID: 0300 
           Device-2: Quanta HP TrueVision HD Camera type: USB driver: uvcvideo bus-ID: 3-1.2:3 
           chip-ID: 0408:5365 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.16.1 driver: 
           loaded: amdgpu,ati 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: eDP res: 1366x768 hz: 60 dpi: 101 size: 344x193mm (13.5x7.6") 
           diag: 394mm (15.5") 
           OpenGL: 
           renderer: AMD Radeon Vega 8 Graphics (RAVEN DRM 3.40.0 5.10.0-18-amd64 LLVM 11.0.1) 
           v: 4.6 Mesa 20.3.5 direct render: Yes 
Audio:     Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio vendor: Hewlett-Packard 
           driver: snd_hda_intel v: kernel bus-ID: 04:00.1 chip-ID: 1002:15de class-ID: 0403 
           Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor 
           vendor: Hewlett-Packard Raven/Raven2/FireFlight/Renoir Processor driver: N/A 
           alternate: snd_pci_acp3x, snd_rn_pci_acp3x bus-ID: 04:00.5 chip-ID: 1022:15e2 
           class-ID: 0480 
           Device-3: AMD Family 17h/19h HD Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus-ID: 04:00.6 chip-ID: 1022:15e3 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-18-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter 
           vendor: Hewlett-Packard driver: rtl8821ce v: v5.5.2.1_35598.20191029 
           modules: rtw88_8821ce,wl port: f000 bus-ID: 02:00.0 chip-ID: 10ec:c821 class-ID: 0280 
           IF: wlan0 state: up mac: <filter> 
Bluetooth: Device-1: Realtek Realtek Bluetooth 4.2 Adapter type: USB driver: btusb v: 0.8 
           bus-ID: 1-4:2 chip-ID: 0bda:b00a class-ID: e001 serial: <filter> 
           Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2 
           sub-v: 7644 hci-v: 4.2 rev: 829a 
           Info: acl-mtu: 1021:8 sco-mtu: 255:12 link-policy: rswitch hold sniff park 
           link-mode: slave accept service-classes: rendering, capturing, object transfer, audio 
Drives:    Local Storage: total: 238.47 GiB used: 63.84 GiB (26.8%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital 
           model: PC SN520 SDAPNUW-256G-1006 size: 238.47 GiB block-size: physical: 512 B 
           logical: 512 B speed: 15.8 Gb/s lanes: 2 type: SSD serial: <filter> rev: 20120006 
           temp: 35.9 C scheme: GPT 
Partition: ID-1: / raw-size: 24.67 GiB size: 24.12 GiB (97.75%) used: 15.66 GiB (64.9%) fs: ext4 
           dev: /dev/nvme0n1p5 maj-min: 259:5 
           ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat 
           dev: /dev/nvme0n1p1 maj-min: 259:1 
           ID-3: /home raw-size: 100.91 GiB size: 98.77 GiB (97.88%) used: 48.18 GiB (48.8%) 
           fs: ext4 dev: /dev/nvme0n1p7 maj-min: 259:7 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 10.03 GiB used: 0 KiB (0.0%) priority: -2 
           dev: /dev/nvme0n1p6 maj-min: 259:6 
Sensors:   System Temperatures: cpu: 48.6 C mobo: 40.0 C gpu: amdgpu temp: 48.0 C 
           Fan Speeds (RPM): N/A 
Repos:     Packages: note: see --pkg apt: 2589 lib: 1405 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/google-chrome.list 
           1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list 
           1: deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://la.mxrepo.com/mx/repo/ bullseye main non-free
           Active apt repos in: /etc/apt/sources.list.d/opera-stable.list 
           1: deb https://deb.opera.com/opera-stable/ stable non-free
           Active apt repos in: /etc/apt/sources.list.d/skype-stable.list 
           1: deb [arch=amd64] https://repo.skype.com/deb stable main
           Active apt repos in: /etc/apt/sources.list.d/surfshark.list 
           1: deb https://ocean.surfshark.com/debian/ stretch main
           Active apt repos in: /etc/apt/sources.list.d/teams.list 
           1: deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams/ stable main
Info:      Processes: 256 Uptime: 8m wakeups: 3 Memory: 9.7 GiB used: 1.17 GiB (12.0%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI
Here is what Gparted says my partition set up is:
partition setup.png
Here is what the installer says my current partition setup is.
mx installer setupc.png
Thanks for listening.
You do not have the required permissions to view the files attached to this post.

Huckleberry Finn

Re: Windows boot option missing after MX21 install

#2 Post by Huckleberry Finn »

You can try to remove the msftdata flag on p3 . This can be done indirectly: only replacing with a competing flag like boot.

So: First flag it as boot (meanwhile let the other boot flag stay there on ESP p1) then remove the boot flag and let p3 have no flags.

Then sudo update-grub on MX.

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

Re: Windows boot option missing after MX21 install

#3 Post by fehlix »

ramblinreub wrote: Sat Sep 17, 2022 7:06 pm A while ago I upgraded to MX21 from a previous MX by doing a clean install on my HP laptop. I wanted to retain my dual boot setup (Windows 10). When I did the MX install, the option to boot into Windows 10 disappeared from GRUB. ...
Your long winded not structured text is hard to read (for me) .. but anyway some comments.

Windows can either be installed and booted with UEFI or BIOS boot mode, not in both ( that's different to MX Linux).
Also Widows can only be installed in UEFI mode on GPT partition table.
So the WIndows on this system was originally installed in UEFI mode.

Now, you would only be able to boot into Windows using a Windows provided efi-boot loader.
I think they call it Windows Boot Manager.

The easiest to find out may be this:

Get MX21x ISO create a MX LiveUSB, and boot this within UEFI boot mode.

On the MX LiveBoot menu -> Select Boot Rescue Menu
Select EFI Boot Loader or Windows EFI loader , where it would search also for Windows EFI bootloader.
In case it will not find a Windows EFI boot loader, you may have wiped/removed WINdows own efi boot loader

If the Rescue search will not find a Windows EFI-Bootmanger,
neither would normal GRUB on the installed system.
ttfn
.^.

User avatar
pbear
Posts: 311
Joined: Tue Aug 09, 2022 9:24 pm

Re: Windows boot option missing after MX21 install

#4 Post by pbear »

On its face, there's nothing wrong with the partition table, except the legacy_boot flag on p1 is superfluous at best. In GParted, right-click the partition and uncheck the box, leaving boot and esp ticked. Don't fuss with the msftdata flag on p3, that's normal (not guessing, I have three dual boot machines). Meanwhile, I notice it's a GPT partition table, so Windows is installed in UEFI mode, same as MX.

Which leaves the question of why Windows won't boot. As fehlix suggests, might be a problem with the Windows boot loader. To get a handle on that, please report the output of:

Code: Select all

sudo ls -l /boot/efi/EFI
sudo ls /boot/efi/EFI/Microsoft/Boot
sudo os-prober
efibootmgr
Please report the output of each command in a separate code box and include the command itself with the output (makes everything easier to follow).

Bear in mind, if the Windows boot loader is the problem, you'll need to fix it from the Windows side. Do you have a Windows Recovery USB and/or Windows Installation USB?

User avatar
ramblinreub
Posts: 4
Joined: Sat Sep 30, 2006 10:54 pm

Re: Windows boot option missing after MX21 install

#5 Post by ramblinreub »

Oh, man. My last reply to Huckleberry and fehlix did not post! I just wanted to tell Huckleberry that I was unsuccessful at clearing the p3 flag, even after switching it to "boot". It would not accept an empty flag. pbear's information appears to make that a moot point, though.

fehlix: I selected EFI bootloader and Windows bootloader from the Rescue menu of the live USB. Neither one found Windows. As pbear states, you may be right about the wiped out/corrupted Windows bootloader.

pbear: I removed the legacy_boot flag from p1. So at least that's cleaned up.

sudo ls -l /boot/efi/EFI

Code: Select all

$ sudo ls -l /boot/efi/EFI
[sudo] password for benedick: 
ls: cannot access '/boot/efi/EFI': No such file or directory
sudo ls /boot/efi/EFI/Microsoft/Boot

Code: Select all

$ sudo ls /boot/efi/EFI/Microsoft/Boot
ls: cannot access '/boot/efi/EFI/Microsoft/Boot': No such file or directory
sudo os-prober (this returned nothing and sent me back to the prompt)

Code: Select all

$ sudo os-prober
benedick@benedick:~

efibootmgr

Code: Select all

$ efibootmgr
BootNext: 0001
BootCurrent: 0003
Timeout: 10 seconds
BootOrder: 0003,0001,0006,0002,9999,0000
Boot0000  MX19
Boot0001* Windows Boot Manager
Boot0002* Internal Hard Disk
Boot0003* MX21.2
Boot0006* MX21
Boot9999* USB Drive (UEFI)
Incidentally, I believe the reason that the 'Boot0001* Windows Boot Manager' listing includes the asterisk is because there was an option in the MX Boot Options program to activate it (it was originally without an asterisk and greyed-out indicating it was inactive). I chose the option, but all it did was give the listing an asterisk. It didn't actually cause it to show up in GRUB. All other listings that include an asterisk except that one show up in GRUB. I don't know if that means anything or not.

Also, I took a look at repairing the Windows bootloader from the Windows side. I do not have any recovery media; HP did not include any. It's entirely possible there was an option to create a recovery USB back when Windows was working, but I missed it if there was. I can look around for some free Windows boot repair software, and see if I can mess things up even further.

User avatar
pbear
Posts: 311
Joined: Tue Aug 09, 2022 9:24 pm

Re: Windows boot option missing after MX21 install  [Solved]

#6 Post by pbear »

Don't understand why the first three commands didn't work. I tested on a dual boot machine (Linux but not MX) before suggesting them. If you run lsblk, do you have the /boot/efi mount point?

Windows being inactive until you ran MX Boot Options is baffling. Linux installers don't usually do that and I'd be surprised if MX does. In any event, shouldn't have any effect on os-prober. On the contrary, I have an old HP laptop where I had to deactivate the Windows boot manager in NVRAM (while leaving it nominally first) to get Linux to boot (a known bug with older HP firmware), but that laptop finds Windows fine with os-prober (and Windows boots no problem).

If you don't have a Windows recovery USB, you can burn one on the computer of any friend with a Window machine (see Control Panel). One of the options will be whether to include the recovery partition. Don't bother, as it won't work on your computer anyway. What you'll end up with is just the recovery tools - takes less than 1 GB - most importantly, the ability to open a Command Prompt.

ETA: D'oh!, forgot to give the command to run at the prompt. The simplest, and usually effective, is bcdboot C:\Windows. Copies the Windows boot loader from a backup location in the system folder (more info).
Last edited by pbear on Tue Sep 20, 2022 12:17 pm, edited 1 time in total.

User avatar
linexer2016
Posts: 733
Joined: Thu Dec 15, 2016 8:15 pm

Re: Windows boot option missing after MX21 install

#7 Post by linexer2016 »

Let me just throw into the mix (no guarantee it will solve your issues) but sometimes I've tried grub customizer which has been effective in finding the various dual boot options I have employed. You can grab grub customizer from the repos. A cautionary tale may be worth repeating even if GC has never caused me any real issues is that some forum contributors have expressed reservations about GC so your mileage may vary. Good luck.

User avatar
FullScale4Me
Posts: 1162
Joined: Fri Jan 08, 2021 11:30 pm

Re: Windows boot option missing after MX21 install

#8 Post by FullScale4Me »

ramblinreub wrote: Mon Sep 19, 2022 10:55 pm Also, I took a look at repairing the Windows bootloader from the Windows side. I do not have any recovery media; HP did not include any. It's entirely possible there was an option to create a recovery USB back when Windows was working, but I missed it if there was. I can look around for some free Windows boot repair software, and see if I can mess things up even further.
MUCH easier to boot an MX Linux USB and run MX Boot Repair, taking the 2nd option.

Skip the free online stuff and go to the source https://www.microsoft.com/en-us/softwar ... ndows10ISO Once done type 'recovery' in search and create a recovery media taking the full option. Beware some Windows PC (HP?) are set up to only allow you to run this utility twice. You can run this on a similar model PC. The result is a bootable USB most times, some machines allow you to make a DVD or USB, and other PCs have it locked out.

You will need to burn the USB on a Windows 7/8/10/11 PC as the ability to burn a Windows ISO while booted into Linux is a bit beyond the newbie tech level. I do have a 'How to create a Windows bootable USB on Linux' how-to written if you're curious.

Editing the Windows Bootloader can be done with the command line utilities MS supplies. Break out to a command prompt when booted from a Windows install media. They only work part of the time in my experience. Chris Titus on YouTube has an excellent video on this. FWIW my semi-retirement job was as a retail PC tech.
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

Huckleberry Finn

Re: Windows boot option missing after MX21 install

#9 Post by Huckleberry Finn »

In the meantime, my first thought was also Windows boot loader might need repairing. I just didn't know what would an MX installation do to that (delete it etc) when I ask it to myself. Anyway, nothing to lose to repair it via a Windows installation media etc..

User avatar
ramblinreub
Posts: 4
Joined: Sat Sep 30, 2006 10:54 pm

Re: Windows boot option missing after MX21 install

#10 Post by ramblinreub »

Thank you all. You made it work.
  • I used the Live USB Maker found in MX Tools to create live USB with that Windows image.
  • Booting from that USB gave me a Windows screen to start the Windows install. However, there was also a link at the bottom of that screen for "Repair your computer"
  • Clicking on that link sent me to some advanced options. None of them seemed to help me much until I later found pbear's dos command: bcdboot C:\Windows.
  • Therefore, in the Advanced Options I selected the Command Prompt button which sent me to a c: prompt.
  • I typed in pbear's command and it quickly returned that it worked.
  • I rebooted and it booted into Windows. That was the first time I've seen Windows since installing MX21 months ago.
  • I rebooted again with the MX Live USB. In the grub menu I went the Rescue option and had it look for the Windows bootloader and it did!
  • Once in MX (still with Live USB), I ran the boot repair application. It also showed that Windows was found.
  • i rebooted with no USB. It initially went straight to Windows, so i had to get into the BIOS options and switch the boot order back to MX.
It boots now into the GRUB menu with both MX Linux and Windows showing up as options. I will sleep much better tonight. This continues to be one of the best linux forums I know of.

Post Reply

Return to “Installation”