Computer boots into Windows instead of Manjaro

Hi,

After updating Manjaro about a week ago, my computer statrted booting into Windows by default - I’d forgotten it was even installed!

I can still manually boot into Linux through BIOS, although it wont let me change default boot device to the linux harddrive for some reason, so I have to do this every boot which is a PITA.

How can I go back to booting into linux? I’m guessing it’s something to do with GRUB but I never seem to have much luck tinkering with that.

Output of inxi -SCDP:

System:
  Host: mark-g1sniperb7 Kernel: 6.6.7-1-MANJARO arch: x86_64 bits: 64
    Desktop: Xfce v: 4.18.1 Distro: Manjaro Linux
CPU:
  Info: quad core model: Intel Core i5-6500 bits: 64 type: MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 800 min/max: 800/3600 cores: 1: 800 2: 800 3: 800 4: 800
Drives:
  Local Storage: total: 931.53 GiB used: 96.43 GiB (10.4%)
  ID-1: /dev/sda vendor: Samsung model: SSD 840 Series size: 232.89 GiB
  ID-2: /dev/sdb vendor: Samsung model: SSD 850 EVO M.2 250GB
    size: 232.89 GiB
  ID-3: /dev/sdc vendor: Samsung model: SSD 870 EVO 500GB size: 465.76 GiB
    type: USB
Partition:
  ID-1: / size: 228.17 GiB used: 67.85 GiB (29.7%) fs: ext4 dev: /dev/sda1

Bye!
Mark

For some unknown reasons the boot order must have been changed probably.

efibootmgr
sudo efibootmgr --bootorder 0001,0002,0003,0004

That changes the boot order. Use the correct numbers.

The inxi info is incomplete. Ideally, you should use: inxi -Fz.

Anyway, boot into Linux (via your BIOS) then post output of sudo parted -l.

Hi,

Here’s output of inxi -Fz

System:
  Kernel: 6.6.7-4-MANJARO arch: x86_64 bits: 64 Desktop: Xfce v: 4.18.1
    Distro: Manjaro Linux
Machine:
  Type: Desktop System: Gigabyte product: G1.SNIPER B7 v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: G1.SNIPER B7-CF v: x.x serial: <superuser required>
    UEFI-[Legacy]: American Megatrends v: F21 date: 05/23/2017
CPU:
  Info: quad core model: Intel Core i5-6500 bits: 64 type: MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 1452 min/max: 800/3600 cores: 1: 800 2: 3410 3: 800
    4: 800
Graphics:
  Device-1: NVIDIA GM204 [GeForce GTX 970] driver: nvidia v: 545.29.06
  Display: x11 server: X.Org v: 21.1.10 driver: X: loaded: nvidia
    gpu: nvidia resolution: 1920x1080~60Hz
  API: OpenGL Message: Unable to show GL data. glxinfo is missing.
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio driver: snd_hda_intel
  Device-2: NVIDIA GM204 High Definition Audio driver: snd_hda_intel
  API: ALSA v: k6.6.7-4-MANJARO status: kernel-api
  Server-1: PulseAudio v: 16.1 status: active
Network:
  Device-1: Intel Ethernet I219-V driver: e1000e
  IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Qualcomm Atheros AR9287 Wireless Network Adapter driver: ath9k
  IF: wlp2s0 state: down mac: <filter>
Drives:
  Local Storage: total: 931.53 GiB used: 96.85 GiB (10.4%)
  ID-1: /dev/sda vendor: Samsung model: SSD 840 Series size: 232.89 GiB
  ID-2: /dev/sdb vendor: Samsung model: SSD 850 EVO M.2 250GB
    size: 232.89 GiB
  ID-3: /dev/sdc vendor: Samsung model: SSD 870 EVO 500GB size: 465.76 GiB
    type: USB
Partition:
  ID-1: / size: 228.17 GiB used: 68.27 GiB (29.9%) fs: ext4 dev: /dev/sda1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 39.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 210 Uptime: 49m Memory: total: 24 GiB available: 23.43 GiB
  used: 2.8 GiB (12.0%) Shell: Bash inxi: 3.3.31

…and sudo parted -l

Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  250GB  250GB  primary  ext4         boot


Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      2097kB  275MB  273MB   fat32                                      boot, esp
 2      275MB   292MB  16.8MB  btrfs        Microsoft reserved partition  msftres, no_automount
 3      292MB   250GB  250GB   ntfs         Basic data partition          msftdata


Model: Samsung SSD 870 EVO 500G (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      4194kB  273MB  268MB  primary  fat32        lba
 2      273MB   500GB  500GB  primary  ext4

Bye!
Mark

@marksibly Looks like Windows was installed in EFI mode and Manjaro in UEFI Legacy mode. Both modes are not compatible. Anyway, you need to change boot order in your UEFI and set Manjaro SSD first. Note that Manjaro grub, when installed with UEFI Legacy, it cannot boot a pure UEFI Installation, e.g. Windows here, so in that case you would need to choose between Windows and Manjaro in the UEFI Bootloader manually.

Install both in the same mode and it shouldn’t have problems.

1 Like

The analysis from @megavolt is correct. In fact, you seem to have two disks installed as Legacy, and one fully qualified UEFI (Windows)

These are Legacy (using an MBR partition table):

Model: ATA Samsung SSD 840 (scsi)
Partition Table: msdos

Model: Samsung SSD 870 EVO 500G (scsi)
Partition Table: msdos

This is a UEFI install (using a GPT partition table):

Model: ATA Samsung SSD 850 (scsi)
Partition Table: gpt

It is (obviously) possible to have both Legacy and UEFI booting on the same machine, however, with the issues you’ve already discovered. The easiest way to overcome this, and have all booting as UEFI, requires setting only EFI booting in BIOS (check your mainboard manual), and a full reinstall of Linux, while ensuring the SSDs are repartitioned as GPT. It’s advised to completely remove the Windows SSD while you’re setting this up (replace it when finished).

That was a brief overview; I hope it’s helpful. Cheers.

Your machine’s bios has/was switched from ‘Legacy’ to ‘Uefi’ boot.

If you’re sure that you didn’t make that change yourself and it ‘just happened magically’ the reason for this is likely a depleted cmos battery, usually a little button battery on your mainboard (check manual).

If they are down and you leave your computer disconnected from mains for longer periods of time it can/will affect bios settings like hardware time and the uefi/legacy setting. Try it, you should be able to replicate the ‘magic switch to uefi’.

Obviously, how a depleted cmos battery affects a bios can not be generalised as it depends on many factors but a loss of power at this level leads to a drop to certain bios-specific defaults and ‘Uefi boot’ seems to be one of them. In my particular case, bios dropped to ‘Uefi’ and hardware time lagged excessively but my customised boot order was not affected.

And what the heck is this?
btrfs for a windows partition?

Yeah, this is a mess.

Also:

Gigabyte + Microsoft = :heart:
“Gigabyte and Microsoft, sitting in a tree… K, I, S, S, I, N, G…”
They are figuratively a married couple…

This means you should not be surprised if windows changes the boot order in your bios when you update windows. For me with a gigabyte mobo, it’s more of a rule than an exception that I have to enter bios and move the order back like I want it after every single windows update. I also quite frequently have to enter chroot and fix my grub. (my solution would be to remove/never boot windows. xD)

This also means you do NOT want to share boot partition with windows, you want manjaro to have it’s own.

As identified in posts above, it seems there is a bit of a mess, old boot vs efi boot.