OS upgrades using alternate boot environments
#1
On thing I have been doing on my Linux computers at home for more than 8 years, is use ABEs, (aka Alternate Boot Environments).

Let's say you have a perfectly functional OS load. A few weeks later you want to update. Do you over-write the working OS load? (Even if you have backups...) Or would you prefer to keep your cake, (aka OS load), and eat it too, (update to an alternate location)?

Here is a description of the ABEs possible with Linux. I've actualy used 1, 3 & 4, and tested that 2 works.

 - Separate root partitions. Copy the existing one to the off-line one before update. Boot off the new copy to make sure it's botable, then update. Keep your home partition, (and anything else un-related to the OS), separate from root partition to reduce the amount of duplicated storage. Dis-advantage is that you have to have 2 full root partitions, (like 20GB per root).

 - Use Linux LVM with 2 root partitions. Same as above, but you can also perform R/O snapshots if you leave free space in the volume group.

 - Use BTRFS. Have a separate tree for root. Make R/W snapshots when updating. Still keep non-root / OS data out of the root / OS tree. Each extra BE takes up only as much as had been changed, (it's copy on write).

 - Use ZFS. Have separate tree for root. Make snapshot & clones when updating. Still keep non-root / OS data out of the root / OS tree. Each extra BE takes up only as much as had been changed, (it's copy on write).

This methodology is also good for a new kernel. You may have to update drivers and support software, which if it goes badly, that BE, (aka Boot environment), may become un-bootable. Having an ABE with the old funtional kernel can save you from headaches.

My Grub entries become a bit more complex. Basically at least 1 per BE, and 1 per kernel update. Plus, I have little incentive to delete too many. I generally keep perhaps 5 or 6 BEs. They also act as on-line backup.

If there is interest, I can describe them in more detail. I am most familar with 1 & 4. But have used 3, just not recently.
--
Arwen Evenstar
Princess of Rivendale
#2
There is at least one more: transactional state snapshotting/rollbacks by functional distros like Guix and NixOS.
https://guix.gnu.org/blog/2018/multi-dim...cks-oh-my/


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Help Recovering Manjaro /boot Contents on Pinebook Pro calinb 6 2,161 12-11-2023, 03:47 AM
Last Post: calinb
  Boot Order in Pinebook Pro food 8 1,177 11-23-2023, 07:37 AM
Last Post: KC9UDX
  [Manjaro] u-boot won't boot from eMMC with (unbootable) SD card present zackw 1 1,948 08-21-2023, 09:08 PM
Last Post: vanessadonald
  Emergency Mode Boot Hotkey? jiacovelli 20 4,285 06-02-2023, 01:32 PM
Last Post: wdt
  Tow Boot install help Paulie420 7 3,716 11-24-2022, 10:24 AM
Last Post: myself600
  Resume from suspend not working after flashing Tow-Boot to SPI xp19375 3 1,938 10-31-2022, 10:14 AM
Last Post: wdt
  Bootloader: SD card boot quirks crazyquark 1 1,049 10-04-2022, 12:27 PM
Last Post: elitegamercody
  Fresh Manjaro does not boot from eMMC pentamassiv 7 4,474 08-18-2022, 11:47 AM
Last Post: Bemo
  PBP won’t boot from eMMC after Debian update / Tow-Boot installer won’t boot from SD Pino64 21 10,191 05-12-2022, 05:00 AM
Last Post: Pino64
  Broken eMMC boot annahellrothsparent 3 2,421 04-28-2022, 07:31 AM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 1 Guest(s)