robbat2 / genkernel

Working copy of genkernel tree: OBSOLETE, please see https://github.com/gentoo/genkernel
9 stars 65 forks source link

Boot partimage #3

Closed psihozefir closed 2 years ago

psihozefir commented 9 years ago

Hello!

I found that upgrading and downgrading Gentoo in situ is a bit risky on production systems. Either have a local backup of the portage tree and distfiles used, or have two root partitions to use them alternatively, like CoreOS is doing. In 2012 I came up with the idea of having the system installed on a partition image file that can be swaped out and in as needed, and upgrades and testing can then be performed out-of-band on a development machine. Using a partition image file for physical hosts enables us to atomically perform up- and downgrades, just like a firmware update on a router.

Also, as a result of this patch, LVM and multiple partitions become a kind of obsolete and the rest of the image file host partition can be used for various data organized in folders.

I hope you'll find this patch useful.

robbat2 commented 8 years ago

I'm not going to merge this as-is, it needs a lot of work.

  1. Please rebase this on top of master
  2. Look at how REAL_ROOT is handled in gen_initramfs.sh, to inject the values from the genkernel.conf into the config for the initramfs.
  3. Fix the variables in linuxrc: 3.1. it's not possible to override HOSTPART, also maybe rename it to say it's the mountpoint rather than the partition. 3.2. allow override of HOSTDEVFSTYPE 3.3. REAL_ROOTFLAGS is added but not used
  4. Drop the extranous changes (fi/done at the end of defaults/linuxrc)
  5. Fix the formatting of the commit message, and include a signoff.
  6. Drop trailing whitespace on lines
  7. Add documentation of the revert/upgrade process
robbat2 commented 6 years ago

@psihozefir reping

robbat2 commented 2 years ago

No response