Cannot boot Windows 10 from second hard drive

Hi all,
i had dual boot on my notebook with Linux Mint and Windows 10 installed, in my configuration there are two hard drives: SSD 120 Gb with Windows 10, and HDD 1 Tb with several partitions for my data and linux installation.
HDD listed as sda, SSD listed as sdb if i type "fdisk -l" command in terminal.
My problem is:
today i installed last Manjaro KDE release (on my HDD), during installation i formated boot partition (probably i shouldn't have done that) and then installed Manjaro from bootable usb instead of Mint. Now i can't boot in Windows because there is no option for it in grub menu and also my SSD disappear from boot options in BIOS-menu (however it listed in hard drives section).
Can anyone please explain me how to make ssd visible in boot options and win10 listed in grub menu again?

What i tried so far:

  • update-grub
  • i tried to set bootable flag on Windows recovery partition with fdsik /dev/sdb (with A command), also i tried "parted /dev/sdb set 2 boot on" (2 is windows recovery partition)
  • also tried reinstall manjaro

Nothing helped me and now i don't know what to do.
Need to say that i can open SSD from Dolphin (named here as "Basic data partition") and look at Windows directory.

Here is my partitioning:
3

Sorry for my english if there are any mistakes.

Looks like you've wiped out window boot files when you formatted 'boot' (should be /boot/efi - - important to use right terms in Linux). Reinstall windows boot first then reinstall manjaro boot.

I assume and you know windows is also in uefi.
Otherwise find out first.

1 Like

So, eventually i figured out how to fix it all, there is what helped me:

  1. Make bootable usb stick with Windows 10
  2. Boot from usb and open command prompt (shift+F10 on first screen from installation menu)
  3. Using commands "diskpart" and "list volume" list all available volumes
  4. Now we need to select volume with /boot/efi (for me it was 62 Mb volume with FAT16 because my disk is GPT, for MBR disks it will be ~500 Mb NTFS volume) using command (where N is volume number):
    select volume N
  5. Format this volume:
    format fs=fat32 (or format fs=ntfs if disk is MBR)
  6. assign letter=Z
  7. exit
  8. bcdboot D:\Windows /s Z: /f ALL
    (where D is letter of Windows volume listed in "list volume" command, it may be any other letter and Z is letter i assigned above)
  9. And now just remove letter from boot volume with commands:
    diskpart
    list volume
    select volume N (N - boot volume number)
    remove letter=Z
    exit

Then i successfully rebooted in windows and now i am going to reinstall manjaro without such mistakes. Thanks a lot for advice.

I found solution in article on russian site (second method there): https://remontka.pro/windows-10-bootloader-fix/

2 Likes

So now i have another problem, i reinstalled Manjaro from usb mounting /boot/efi and without formating it, but now i can't boot in Manjaro, grub menu doesn't show up and computer starts booting directly into Windows 10. However i can boot installed manjaro with bootable media -> detect efi files and choosing efi file of installed system.

Also my /boot/efi/EFI folder includes three folders: Boot, Manjaro, Microsoft. I made backup of whole /boot directory and tried replace ../Microsoft/Boot/bootmgfw.efi file with ../Manjaro/grubx64.efi (i also renamed it to bootmgfw.efi), then computer boots in grub menu with several options: two for manjaro and one for windows manager (but since i replaced windows .efi file choosing this option simply reopens grub menu).

I tried to add menu entry in grub with editing /etc/grub.d/40_custom :
menuentry "Win10" {
insmod part_gpt
insmod chain
set root='(hd1,gpt1)'
chainloader /EFI/Microsoft/bootmgfw.efi
}
(i copied original bootmgfw.efi in this folder, and (hd1,gpt1) is proper partition - checked with grub ls command)
but this didn't work and prints following error message when i am trying to select it from grub menu:
Invalid EFI file path

So now i don't know how to properly set up grub with windows and manjaro, do you have another advice, please?

I do not feel qualified to offer advice on grub boot issues. All I can suggest is to search the forum for related posts. There is no shortage of info on this issue as it is a regular topic on the forum lately. Hopefully, someone competent to offer advice will stop by to help you before too long.

Seems like i found out how to solve this problem, after some time trying to set up grub as main (first?) boot manager (instead of windows boot) i end up installing rEFind from octopi (refind-efi package) and running "refind-install" script in terminal.
Now i am able to change boot order in UEFI menu - i set up rEFind as first priority and it detects all other installed bootmanagers including windows boot and grub, also i can boot directly in Manjaro without grub.

1 Like

Very nicely done. You managed to straighten this out all on your own. Most people take up a ton of forum time to fix this type of issue. Very nice to see someone who likes to get the job done themself. Kudo's to you.

2 Likes

Thanks, i am relatively new to Linux and i think it was kinda interesting experience for me.

2 Likes

Morning, Good to hear.
Can you print out from terminal, whats

efibootmgr -v
findmnt -s
sudo parted -l
sudo blkid

Thanks.

1 Like

You should really provide the outputs gohlip requested. He is the resident expert on these issues. He will know if you have made a misstep in your configuration, and how to correct it. Please mark your thread "solved" when you're satisfied it is working correctly.

1 Like

Sorry for my late reply. There is what you requested:

efibootmgr -v output:

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001,2001,2002,2003
Boot0001* Windows Boot Manager  HD(1,GPT,17000707-370b-4a23-8f71-e1d110e43695,0x800,0x1f000)/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.}....................
Boot0002* rEFInd Boot Manager   HD(1,GPT,17000707-370b-4a23-8f71-e1d110e43695,0x800,0x1f000)/File(\EFI\refind\refind_x64.efi)
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

findmnt -s output:

TARGET     SOURCE                                    FSTYPE OPTIONS
/boot/efi  UUID=0604-11A2                            vfat   defaults,noatime
/home/wind UUID=FCB2D3E4B2D3A186                     ntfs   defaults,noatime
/          UUID=96814df6-dca5-48b2-9d39-bebee780d05e ext4   defaults,noatime
swap       UUID=36a871a3-76db-44b0-b036-e683bb010700 swap   defaults,noatime
/home      UUID=472122c2-a69a-46dd-a138-e3230305a1e8 ext4   defaults,noatime

sudo parted -l output:

Model: ATA WDC WD10SPZX-21Z (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                  Flags
 1      1049kB  66,1MB  65,0MB  fat32                                 boot, esp
 2      66,1MB  527GB   527GB   ntfs            Basic data partition  msftdata
 3      527GB   632GB   105GB   ext4
 4      632GB   646GB   13,6GB  linux-swap(v1)
 5      646GB   992GB   346GB   ext4


Model: ATA KINGSTON RBUSNS8 (scsi)
Disk /dev/sdb: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name                  Flags
 1      1049kB  128GB  128GB  ntfs         Basic data partition  msftdata
 2      128GB   128GB  514MB  ntfs                               boot, hidden, esp

sudo blkid:

/dev/sda1: UUID="0604-11A2" TYPE="vfat" PARTUUID="17000707-370b-4a23-8f71-e1d110e43695"
/dev/sda2: LABEL="HDD" UUID="FCB2D3E4B2D3A186" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6674013a-1fbb-47d7-a1fe-d6efeeb857d0"
/dev/sda3: UUID="96814df6-dca5-48b2-9d39-bebee780d05e" TYPE="ext4" PARTUUID="c09913f3-4e4a-4821-9538-8078a1127fcb"
/dev/sda4: UUID="36a871a3-76db-44b0-b036-e683bb010700" TYPE="swap" PARTUUID="8bfa6bba-bfa9-47dd-9c4c-515dc1d4bda5"
/dev/sda5: UUID="472122c2-a69a-46dd-a138-e3230305a1e8" TYPE="ext4" PARTUUID="473e8300-94fe-4535-80d8-70a9484e55db"
/dev/sdb1: UUID="E632A0A032A076E9" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="11d14c38-4991-4ebc-9d25-d4b3abb552db"
/dev/sdb2: UUID="F0CCFCE9CCFCAACC" TYPE="ntfs" PARTUUID="fd465e01-e881-4972-a73a-592e89ed07c4"

Okay, you've got everything in place. That's good.
As said (elsewhere), recent installations and grub-installs have problems making efi bootentries.
And as mentioned here, if you want to have Manjaro grub when you boot up (instead of rEFInd), you can at Manjaro terminal, do

sudo grub-install
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/sda -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi

If you're happy with rEFInd, the way you're booting now, that's fine.
But note if you boot Manjaro directly with rEFInd and not through its grub, intel-ucode will not be called up. You can check the differences in the 2 boots (direct and through grub) with

dmesg | grep microcode

Cheers.

[1] - without intel-ucode, you won't get this output.
microcode updated early to revision

2 Likes

Thanks for the tip, i feel comfortable with booting through rEFind for now, with dmesg | grep microcode i got:

[    0.595873] microcode: sig=0x806ea, pf=0x80, revision=0x64
[    0.596225] microcode: Microcode Update Driver: v2.2.

Is it crucial to call intel-ucode during boot or it affects only this output?

Each of us have different 'perspectives' on it. Generally with the spectre and meltdown flaws, it is best to have intel-ucode booted up. I've seen developers calling for the removal of intel-ucode (to facilitate non-boots) and some distro's (Antergos and previous Net-runner) do not have intel-ucode as default. But other than the above, all other distros have built in intel-ucode that boot up early.

Hope this answers (to some - tactfully). Cheers

2 Likes

Thank you for explanation, i will set up booting through grub bootloader.

1 Like

Before you begin,
There are ways to have refind boot up intel-ucode.

See this.
And I think there's one script written by openminded that will handle that.

But both are quite convoluted.
Read them first before deciding.

1 Like

You can also fine tune you rEFInd configuration with something like initrd=/EFI/manjaro/intel-ucode.img initrd=/EFI/manjaro/initramfs-%v.img added to the refind-linux.conf in /boot/efi/EFI/manjaro directory. GRUB is great but there's no need in it if you already boot using EFISTUB (direct kernel booting). rEFInd also looks better (IMO).
Here is my post with even more details: Secure Boot with rEFInd

Hi, openminded (hope monkeber don't mind this segue)
Have you tried systemd-boot?

I can't recommend it for monkeber because he has his $esp as /boot/efi
systemd-boot requires $esp as /boot.

Like rEFInd, it is using efistub.
But I personally find it simpler, direct and straightforward.
Though without the eye-candy.
You may like it.
And it boots intel-ucode (in Manjaro - with double initrd lines)

1 Like

Hi!
I tried it, but that was a special case: it was installed as a part of Solus while Manjaro's rEFInd was still the default option, and I had not time to play with it much, because, you know, Solus does not support SecureBoot by default, and it creates quite a mess in EFI - 3 folders named com.solusproject, goofyboot, systemd-boot (I don't remember exactly and it doesn't matter anyway). When I saw all these in rEFInd listing I just decided to hide unnecessary items, so I signed goofyboot and disabled scanning the other two directories. And I still don't want to mess with anything related to boot process just because I was tired of reboots those days :slight_smile:
I also have Windows on another drive, so pure systemd boot would not be a good decision I guess.
Just a thought: I don't see any problems with mounting ESP to /boot. Maybe I'm wrong just because I used rEFInd to execute Solus' systemd-boot, idk.
Okay I will look into it tomorrow, it's a late night in my place, I can hardly type my phone's keyboard :sleeping:
Have a good day/night guys.

In Manjaro, installing systemd-boot needs manual input.
Read this topic. It may be slightly outdated but I think generally it's still valid.

The issues with bootctl (I prefer to call it that - most will call it systemd-boot) are valid with rEFInd too. Just that rEFInd is more versatile in picking up efi files (and boot them) when bootctl does not. Oh grub can do that too (pick and boot efi files) but need to input ... stanza?

I have all grub, rEFInd, and bootctl in my system. :stuck_out_tongue_closed_eyes:
But preferences, being personal, can be subjective. Features though, are not.

Cheers.

2 Likes

Forum kindly sponsored by