Score:0

GRUB, Multiple Ubuntus and Installing

la flag

I have the following multi-boot setup at present:

/dev/sda: a small SSD containing only GRUB. It has a custom menu with prompts to boot to the OS on either /dev/sdb or /dev/sdc. It's working fine and I can't risk it being changed.

/dev/sdb: a 1TB SSD with Ubuntu 18.04. I need it for work -- it is working fine and I can't risk it being changed either.

/dev/sdc: a 1TB SSD with a previous install of Ubuntu 22.04. Something got broken at one point (no longer relevant) and is no longer booting up.

I need to reinstall Ubuntu 22.04 on /dev/sdc but without risking anything on /dev/sda or /dev/sdb. I'm really hesitant about simply installing 22.04 onto it -- particularly regarding the risk to /dev/sda and the boot loader. In the future I'd like to alternately reformat /dev/sdb and /dev/sdc, putting more advance (fresh) installs on the computer -- but never modifying the boot loader on /dev/sda.

(Note: I also have /dev/sde which is a 2TB HDD used for data shared between the OS's).

guiverc avatar
cn flag
I don't see your issue, I re-install systems *weekly* for QA-testing purposes (ie. instead of upgrading packages I re-install non-destructively using the current *daily* to achieve upgraded packages without impacting my user files or additional (*manually installed*) packages which are auto-reinstalled... I do it this way as it accomplishes a QA-test & upgrades my packages. At worst the re-installed system will own the boot (ie. *be default*) as occurs with my re-installs, but I change this to what I prefer after I've confirmed all my systems are correct.
guiverc avatar
cn flag
You've not said what product you're asking about, as 22.04 has ISOs that use `ubiquity`, `subiquity` and for some *flavors* its also `calamares`. I can't speak to a `subiquity` installer if that's what you're asking about (you didn't specify!) but just tell the installer what you want & read the summary screen. If you didn't make partition changes, you can backout if the summary screen isn't exactly what you wanted. Also ensure you write the ISO to thumb-drive correctly; as reformats of the ISO can alter how the installer sees drive/partitions!
guiverc avatar
cn flag
Does this answer your question? [How to reinstall Ubuntu in the easiest way?](https://askubuntu.com/questions/446102/how-to-reinstall-ubuntu-in-the-easiest-way)
guiverc avatar
cn flag
FYI: Your mention of sda for Grub makes little sense to me... GRUB is installed in the `/boot/grub` directory of whatever drive you tell it to install. There is also a grub stage 0 which is written to the MBR of a drive (per drive standards; ie. in the reserved sector 0 of the drive which is **outside** of partitioned space as per standard* OR to the ESP (uEFI System Partition; again as per standards; though this partition is inside partitioned space) but both those are not on the drive SDA you specify (sector 0 could be if you're talking about MBR - but machine BIOS settings will dictate)
bcwilson60 avatar
la flag
Hi guiverc. I'm unfamiliar with ubiquity/subiquity/calamares. Regarding /dev/sda and Grub, the idea is to have Grub separate from any OS and still determine the target(s) (drives/OS's) to which the computer boots (negating the need to go into BIOS every time the computer starts. If each physical SSD had its own Grub the effect would be lost. And if (with only 2 drives) Grub is installed on drive 1 (with OS #1) while OS #2 is on drive 2 then Grub would be lost when drive 1 would eventually be wiped for the purpose of replacing OS #1 with OS #3.
guiverc avatar
cn flag
Ubuntu offers many products with various ISO choices. Ubuntu Server uses the `subiquity` installer by default, Ubuntu Desktop used `ubiquity` as the primary installer up to 22.10 (ie. 22.04 you mention) with an *alternate* ISO using a *canary* installer (now named `ubuntu-desktop-installer` which is the default for 23.04 & later). The ISO you download dictates which installer will be used, and you gave only release details (22.04; with ISOs using all I mentioned including *canary* though that would be hard to find I bet thus my lack of mention*).
guiverc avatar
cn flag
Grub stage 0 only uses 512 bytes and is written to a drive, in the *boot partition* of the drive reserved for that purpose on any drive made after 1982 (*which it became a standard for the IBM PC & DOS 2.0; grub follows that standard*). The actual grub code goes in your `/boot/grub/` directory which exists on your `/` drive normally as it's not used in the boot directly (grub stage 0 handles boot as per the old standard that still applies today) so a whole drive seems a waste for 512 bytes. uEFI replaced that standard, with the ***E***FI **S**ystem **P**artition* you can control
oldfred avatar
cn flag
Whether UEFI or BIOS, grub install defaults to first drive. Really need to know if UEFI or BIOS. With BIOS you can specify which drive to install boot loader into. With UEFI it shows choice with Ubiquity, but choice does not work. Supposed fixed in Subiquity with new Ubuntu. Check UEFI boot mode `[ -d /sys/firmware/efi ] && echo EFI || echo Legacy`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.