noob question for linux experts out there: i have two systems on /dev/sda and /dev/sdb, and my boot partition is on /dev/sda. how can i make grub see both systems? now it completely ignores sdb. i tried to google it, but couldn't find anything useful

#linux #arch #archlinux #ubuntu #devops

@froufox you should be able to configure grub so it sees both systems, waits like 10-15 seconds in a boot menu to give you the option to boot into either ubuntu or arch.

If you want a next-level (or maybe just an old curmudgeon) challenge, lose dual-booting entirely, move the secondary system into a vm, container or kubernetes pod/deployment.

@kubefred not sure that i get what you mean... i am migrating from ubuntu to arch. i think i keep ubuntu as a second system on my first ssd (sda), and gonna use newly installed arch (sdb) as a primary system. i didn't create /boot on sdb, since i thought the one on sda is enough.
but i cannot understand how to make grub detect both systems. if you know exact command/link/google search query, i appreciate it a lot

@froufox the arch docs are really good, there's info in there about multiple entries and detecting other operating systems...

https://wiki.archlinux.org/title/GRUB#Configuration

Hope it helps!

GRUB - ArchWiki

@froufox grub is a bit weird, try mounting the other partition and then run the grub whatever cfg command
@angrylinus didn't help unfortunately. but i guess, i just move my boot to the second drive with arch and call it a day
@froufox I never tried with two different disks but normally grub-mkconfig with osprober installed should detect other systems. It's possible osprober is not installed or disabled in /etc/default/grub
@nicdex i used grub-mkconfig, and unfortunately it doesn't see anything on the second disk. i guess, i just create another boot partition on sdb, an set it as the first option in BIOS. i actually don't *need* dualboot. would be nice, but not necessary
@froufox my go-to for this has been running boot-repair or using a grub GUI to edit it. I normally don't run different distro side by side though
@froufox It should be enough to install the os-prober package, edit /etc/default/grub, put "GRUB_DISABLE_OS_PROBER=false" in there.
You'll also need to mount the partition somewhere, otherwise grub won't find it. Then running "grub-mkconfig -o /boot/grub/grub.cfg" should add an entry for it. Alternatively, you could also add an entry manually by editing /etc/grub.d/40_custom and running grub-mkconfig again.
@halfur thanks! i actually decided to go with one main system on a new drive and keeping the old ubuntu just in case on a separate drive with its own grub. i actually don't need them both together