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'm not going to merge this as-is, it needs a lot of work.
Please rebase this on top of master
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.
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
Drop the extranous changes (fi/done at the end of defaults/linuxrc)
Fix the formatting of the commit message, and include a signoff.
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.