0

I can understand needing a boot manager when you have seperate os on the same drive.

But what I have is 2 drives with Ubuntu on both, I wanted to boot them independent of each other, using the bios to set boot.

But thanks to GRUB, it jumps in and takes control making one drive the master and the other a slave to where if the master drive goes bad the slave is unbootable and useless?????

What I would like to do is get rid of GRUB completely, and use the BIOS to set boot. Is that possible?

Thanks!

UPDATE When I disconnect the drive GRUB has made the master and try and boot with the slave I get this,

error: no such device:
error: unknown filesystem.
Entering rescue mode...
grub rescue>

How can I fix that? I do not mean to make post sound like ranting and raving, it's just I am mad how GRUB screwed this up! Thanks for your help!

Cougar
  • 119
  • 1
    This question is rather close to an off-topic "rant in disguise" (https://askubuntu.com/help/dont-ask) Yes you can have grub do whatever you want; I have a system with 3 drives and I set it up as I want it; but I'd keep grub and have each system's own grub on it's own drive in your case (BIOS selecting which will boot, as is conventional). You didn't provide specifics as to your version; but to your specific question - Yes it's possible. – guiverc Jan 14 '20 at 02:15
  • 2
    If you have a problem with a kernel upgrade, grub allows you to boot using older kernels, ie. it's useful even if you only have a single OS installed. – guiverc Jan 14 '20 at 02:16

2 Answers2

0

If you remove all other drives during Ubuntu installation, then Grub should only be able to install itself to the one drive that it can see. You can then use the BIOS to choose which drive to boot from.

Be careful about upgrading from one version of Ubuntu to another with this setup.

Matthew
  • 515
0

The main program grub exists in /boot/grub/ ; though the MBR or master boot record (first 512 bytes of a drive; your BIOS config will dictate which drive's MBR is used) contains a pointer to this location. The error message you have "no such device" is because you've probably removed the driver which contains /boot/grub/ or where the pointer points to.

It sounds like you want each drive's MBR to point to it's own drive's first sector. So do that, using grub-install

Refer https://help.ubuntu.com/community/Grub2/Installing ("Reinstalling GRUB 2 from a Working System" section)

sudo grub-install /dev/sdX  # Example: sudo grub-install /dev/sda

where sdX will be replaced by your drive details (eg. sda). As the MBR relates to a drive, you don't use partition but drive (thus it's sda/sdb/..) Do this for each drive if necessary.

You can use blkid to get details of what sdX should be if necessary.

Note: Even if you only have a single OS installed on a single drive, grub is still useful. If something goes wrong with a kernel upgrade or change you made; you can use grub to boot an older kernel, boot to runlevel 1 or add kernel parameters to solve issues. It's really useful to fix things

guiverc
  • 30,396
  • Just to make sure.

    sudo grub-install /dev/sdb1

    That is the backup drive that will not boot without the other drive connected. Run that command and then reboot? I can understand GRUB is a useful tool, I did not like how it seem to take control of my drives. Do I need to boot to the other drive and run that command? Sorry for asking so much, I'm new to linux. What can I expect to see on reboot? Will GRUB come asking me which drive to boot to? I am trying to be safe here, better safe than sorry! THANKS! You got me going in the right direction!

    – Cougar Jan 14 '20 at 03:33
  • Grub stage 0 goes on the first 512 bytes (first sector) of the disk, sdb1 may not be the first sector of the disk - so it'll be sudo grub-install /dev/sdb (ie. you install the MBR on a drive and not a partition) There is only 1 first sector on a drive regardless of how many partitions exist on the drive. – guiverc Jan 14 '20 at 04:11
  • I gave up watching/thinking what grub does ages ago, and I always install using 'something else' & setup what I want. Yes I'm aware some installers/options (Ubuntu currently has 4 main installers in use) don't let you select where to put grub; where in I just let it do whatever it wants; and put back whatever I want afterwards. Usually that's booting the OS I want to own the MBR (ie. BIOS selected drive), and then use sudo grub-install /dev/sdX so it takes ownership of the MBR (arresting control over whatever was last installed usually). – guiverc Jan 14 '20 at 04:15
  • I am hesitant about doing anything at this time. It boots/works, albeit, the boot time sucks (see my other post https://askubuntu.com/questions/1200741/ubuntu-18-04-both-drives-hang-at-boot-on-raid ) and GRUB has taken control over booting. If the main drive goes bad, I believe I can use the Ubuntu install CD to boot from and recover that 2nd drive, is that correct??? – Cougar Jan 14 '20 at 11:28
  • Yes you can use a 'live' system (eg. Ubuntu install media) to re-install grub, or if you boot to 'grub rescue' you can boot an OS already installed on your system (eg. a Ubuntu system, or other GNU/Linux or windows system using commands). Grub rescue is pretty useful; but it's commands are somewhat cryptic & output very minimal as it's code had to fit within the 512 bytes of the MBR – guiverc Jan 14 '20 at 11:40
  • ok Installed GRUB,

    sudo grub-install /dev/sdb [sudo] password for cougarxr7: Installing for i386-pc platform. Installation finished. No error reported.

    Rebooting, hope all goes well!!

    – Cougar Jan 14 '20 at 19:58
  • You have me working correctly now! I can select which drive to boot from in the BIOS and GRUB does its part!!! thank you! Each drive is independent from each other! – Cougar Jan 14 '20 at 20:36