#[SOLVED] How can I add my secondary OS to the GRUB bootloader?

123 messages · Page 1 of 1 (latest)

cunning tundra
#

I'm currently dualbooting both Windows 10 and Arch (Out of necessity), and the GRUB isn't loading the Windows option when I first start the machine
Documentation, tutorial or whatever is fine

wind bear
#

did you have os-prober installed and the windows boot partition mounted when running grub-install?

snow jay
wind bear
#

well, of course; it is the relevant archwiki page (:

snow jay
#

Here's a question to actually start: UEFI or BIOS boot?

gloomy moat
#

after reading it, it sucks

#

looks about right

#

most firmware will auto detect windows so u can probably still boot to windows from ur firmware (uefi/bios) boot menu

#

edit due to cannot london

cunning tundra
#

I uncommented the OS-prober and installed it, but it didn't seem to work for some obscure reason

wind bear
#

Try this:

For Windows installed in BIOS mode, mount the Windows system partition (its file system label should be System Reserved or SYSTEM). Run os-prober as root to detect and generate an entry for it.

cunning tundra
#

Icic, I'll try it

#

Just one second

wind bear
cunning tundra
#

Done and rebooting

#

Aaand it isn't detected

#

Windows is already installed on the the correct partition, but it just seems to not recognize it

wind bear
#

might need to do grub-mkconfig after that

cunning tundra
#

Perhaps I did something wrong

wind bear
#

does running sudo os-prober do anything though?

cunning tundra
#

It did run but didn't return anything, nor add Windows to the bootloader

#

And I was running as sudo

#

Root*

wind bear
#

:(

cunning tundra
#

I would be mildly annoyed if I lost all my Windows files

wind bear
#

why would you? unless you deleted them
not booting is something else.

cunning tundra
#

Rebooted adt

#

After running mkconfig, still no Windows

snow jay
#

ls /sys/firmware/efi check if this exists if you're not entirely sure which boot mode you're in, if it exists, then UEFI mode.

cunning tundra
#

No such file, it's BIOS

snow jay
#

ah cool

wind bear
#

lsblk -f to check your disk and OS setup.
to make sure you are mounting correctly before grub-mkconfig

cunning tundra
#

Lemme take a pic, since I can't really copy it

#

sda2 is where windows is supposed to be in

#

Sda1 being system reserved

wind bear
#

uhmm, where is your Arch? :D

#

oh sda3

#

and is sdb1 the boot partition??

cunning tundra
#

I presume so

wind bear
#

so how are you running grub-mkconfig?

cunning tundra
#

Oh no

#

It's my USB stick

wind bear
#

yeah

cunning tundra
#

Mb

wind bear
#

i see no boot partition at all on your system

cunning tundra
#

Guess I skipped something on the wiki by accident then

#

So, back to wiki and reinstall grub like normal?

wind bear
#

how are you booting into Arch?

cunning tundra
#

It boots like normal, just doesn't detect Windows

wind bear
#

as apparent, you were able to boot

cunning tundra
#

Well, any ideas? I'm still quite clueless about how this works in general

wind bear
#

can you boot without your usb plugged in?

cunning tundra
#

NTFS partitions may not always be detected when mounted with the default Linux drivers. If GRUB is not detecting it, try installing NTFS-3G and remounting.

cunning tundra
#

Yeah, I can

#

For Windows installed in BIOS mode, mount the Windows system partition (its file system label should be System Reserved or SYSTEM). Run os-prober as root to detect and generate an entry for it.

#

Perhaps this?

wind bear
#

well yes, you said you tried that

cunning tundra
#

I did

#

I'll retry

wind bear
#

but where the hell is your grub (boot partition) ??

#

without the boot partition mounted to /boot, it won't do anything

cunning tundra
#

I did as the guide stated and mounted it in sda(?)

#

On the disk, that is

#

OH?

#

I think I know what happened?

spark hedge
#

Probably using windows' efi system partition

#

Which is the right way

#

Oh wait

cunning tundra
#

I might have built it inside sda3, perhaps? I did it on arch-chroot

#

Dunno if that's a hint of what might have happened

spark hedge
#

Where tf is the windows efi partition

#

im confused

wind bear
#

i am too :D

wind bear
#

it is bios / mbr i think

cunning tundra
#

It is BIOS

spark hedge
#

Ah

wind bear
#

which is foreign to me but seems fine

#

now that i checked it

cunning tundra
#

Soo, bad sign?

wind bear
#

not necessarily

cunning tundra
#

Yeah I can fly with that, what should I do from now on?

wind bear
#

can you do ls -alt /boot

cunning tundra
#

Is it readable?

kind cradle
#

yes

wind bear
#

ok, can you mount sda1 somewhere, anywhere

#

to /mnt maybe

cunning tundra
#

I don't quite follow, can you be more explicit?

wind bear
#

ls /mnt
does it exist?

cunning tundra
#

No output

#

So I presume not?

wind bear
#

mount /dev/sda1 /mnt

#

no output with plain ls means it exists and it's empty

#

what exact command do you use for grub-mkconfig?

cunning tundra
#

mount: /mnt: unknown filesystem type 'ntfs'

cunning tundra
spark hedge
#

You need to specify the type for ntfs

cunning tundra
#

Fetching it, just a second

wind bear
#

mount -t ntfs3 -o force /dev/sda1 /mnt

cunning tundra
#

Mounted

wind bear
#

ok

#

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

#

any output about detecting windows?

cunning tundra
#

Rebooting

#

Yeee it worked

wind bear
#

don't hurry :d

#

haha nice

cunning tundra
#

Thanks for holding my hand through this one

#

🫂

#

Is there any thanks system on this server or smth?

wind bear
#

it doesn't mean anything, but replying to someone's message with "thanks" in the reply gives some cookies

#

... solved

blissful knotBOT
#

#9742 📣 If there is nothing else that we can do for you, please close this thread by adding "[SOLVED]" to the title.

  • You can do this on desktop by clicking the three dots on the top right of the page, and pressing "Edit Post".
  • You can also do this on Android / iOS by long tapping your post in the text channel list, and tapping "Edit Post".

Your title should be like so: https://cdn.discordapp.com/attachments/503224329191030787/1039841700417384498/image.png
Thank you

cunning tundra
#

[SOLVED] How can I add my secondary OS to the GRUB bootloader?

scarlet bison