You are not logged in.

#1 2021-07-20 08:16:12

33
Member
Registered: 2021-07-20
Posts: 9

Dual-boot problem

I used to dual boot Gentoo with Windows 10 with EFISTUBs on seperate drives. I wanted to switch over to Arch with GRUB and I formatted the entire drive, my mistake. Now after installing Arch, I am unable to detect the Windows bootloader through os-prober ("GRUB_DISABLE_OS_PROBER=false" was set) or Super Grub2 Disk.

NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda         8:0    0 931.5G  0 disk
sda1        8:1    0    16M  0 part
sda2        8:2    0 833.8G  0 part
sda3        8:3    0  97.7G  0 part
nvme0n1   259:0    0   1.8T  0 disk
nvme0n1p1 259:1    0   550M  0 part
nvme0n1p2 259:2    0    15G  0 part [SWAP]
nvme0n1p3 259:3    0   1.8T  0 part /

Arch is installed on nvme0n1 and Windows is on sda. How do I go about repairing my Windows boot?

Last edited by 33 (2021-07-20 08:17:10)

Offline

#2 2021-07-20 08:24:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Dual-boot problem


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2021-07-20 08:26:35

Alataw
Member
Registered: 2021-01-27
Posts: 20

Re: Dual-boot problem

33 wrote:

"GRUB_DISABLE_OS_PROBER=false" was set

and update grub:

sudo grub-mkconfig -o /boot/grub/grub.cfg

reboot

Offline

#4 2021-07-20 08:43:00

33
Member
Registered: 2021-07-20
Posts: 9

Re: Dual-boot problem

Alataw wrote:

snipped

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-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 ...
done

Windows not found.

Last edited by 33 (2021-07-20 08:44:21)

Offline

#5 2021-07-20 08:52:00

33
Member
Registered: 2021-07-20
Posts: 9

Re: Dual-boot problem

Which MBR do I use for Windows 10? It only mentioned 2000, XP, 2003, 98, ME, Vista, and 7.

Last edited by 33 (2021-07-20 08:55:43)

Offline

#6 2021-07-20 10:14:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,432

Re: Dual-boot problem

Jason's link wrote:

Microsoft includes a boot sector fix utility FIXBOOT and an MBR fix utility called FIXMBR on their recovery discs, or sometimes on their install discs. Using this method, you can fix the reference on the boot sector of the first partition to the bootloader file and fix the reference on the MBR to the first partition, respectively. After doing this you will have to reinstall GRUB to the MBR as was originally intended (that is, the GRUB bootloader can be assigned to chainload the Windows bootloader).

However, before you mess up stuff more:

I formatted the entire drive

Which "drive"?

Output of

lsblk -f
file -s /dev/sda
fdisk -l /dev/sda
pacman -Qs ntfs

Offline

#7 2021-07-20 11:03:56

33
Member
Registered: 2021-07-20
Posts: 9

Re: Dual-boot problem

seth wrote:

Which "drive"?

I formatted the nvme0n1 drive that Gentoo was installed on before installing Arch.

$ lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                         
├─sda1
│                                                                           
├─sda2
│    ntfs               12A422DEA422C457                                    
└─sda3
     ntfs         backup
                        161A63EE1A63C8F7                                    
nvme0n1
│                                                                           
├─nvme0n1p1
│    vfat   FAT32       B834-B846                                           
├─nvme0n1p2
│    swap   1           1b0b6b8d-4aea-470c-bb3b-932e2c6b8cea                [SWAP]
└─nvme0n1p3
     ext4   1.0         1adc318f-91df-47a3-87a0-7097200257c6    1.7T     0% /

$ file -s /dev/sda
/dev/sda: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x30,254,63), startsector 1, 4294967295 sectors, extended partition table (last)

$ fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: HGST HTS721010A9
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 1C5D23A6-E780-4248-A516-C327D35832D1

Device          Start        End    Sectors   Size Type
/dev/sda1        2048      34815      32768    16M Microsoft reserved
/dev/sda2       34816 1748721663 1748686848 833.8G Microsoft basic data
/dev/sda3  1748721664 1953521663  204800000  97.7G Microsoft basic data

Offline

#8 2021-07-20 11:05:41

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,432

Re: Dual-boot problem

I formatted the nvme0n1 drive that Gentoo was installed on before installing Arch.

So you didn't touch /dev/sda at all?

seth wrote:

pacman -Qs ntfs

Offline

#9 2021-07-20 11:19:46

33
Member
Registered: 2021-07-20
Posts: 9

Re: Dual-boot problem

seth wrote:

So you didn't touch /dev/sda at all?

no I did not

seth wrote:

pacman -Qs ntfs

"pacman -Qs ntfs" returned nothing.

Offline

#10 2021-07-20 11:21:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,432

Offline

#11 2021-07-20 13:18:12

33
Member
Registered: 2021-07-20
Posts: 9

Re: Dual-boot problem

$ pacman -Qs ntfs
local/ntfs-3g 2017.3.23-5
    NTFS filesystem driver and utilities

Got it.

Offline

#12 2021-07-20 13:20:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,432

Re: Dual-boot problem

And… is os-prober more cooperative now?

Offline

#13 2021-07-20 14:30:22

33
Member
Registered: 2021-07-20
Posts: 9

Re: Dual-boot problem

seth wrote:

And… is os-prober more cooperative now?

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-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 ...
done

Still nothing found.

Offline

#14 2021-07-20 14:41:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,432

Re: Dual-boot problem

Can you mount the ntfs partitions?
Try using FIXMBR, though (assuming you still touched sda somehow)

Offline

#15 2021-07-21 15:19:57

33
Member
Registered: 2021-07-20
Posts: 9

Re: Dual-boot problem

Apologies for the late reply.

seth wrote:

Can you mount the ntfs partitions?

Yes I could mount, but the output was no different.

seth wrote:

Try using FIXMBR, though (assuming you still touched sda somehow)

The "BOOTREC /FIXMBR" command from the Windows command prompt right? It ran successfully but os-prober was still unable to detect Windows.

Last edited by 33 (2021-07-21 15:20:13)

Offline

#16 2021-07-21 15:54:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,432

Re: Dual-boot problem

The interesting question would rather be what you can find on that ntfs partitions.
We don't know what you did during the installation, but os-prober might not find a windows installation because there's none…
Alternatively the partition is bitlocker'd

Ultimately, you can still add windows via 40-custom, https://wiki.archlinux.org/title/GRUB#W … I/GPT_mode

Offline

#17 2021-07-21 17:29:55

33
Member
Registered: 2021-07-20
Posts: 9

Re: Dual-boot problem

Previously I installed Gentoo first then Windows 10 on another drive. I presume Windows installed the bootloader on FAT32 partition on the first drive and got removed when I formatted the first drive to install Arch.

40-custom looks complicated but I will give it a try, after I can sort of understand it.

Offline

Board footer

Powered by FluxBB