Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Posted Jan 18, 2016 23:31 UTC (Mon) by mjg59 (subscriber, #23239)In reply to: Preparing for a merged /usr in Debian by walex
Parent article: Preparing for a merged /usr in Debian
Things that grub doesn't do. And nor does the kernel. But an initramfs does. So we use the solution that exists, and we'll continue doing so until somebody dislikes it enough to come up with an alternative that works better.
Posted Jan 19, 2016 8:53 UTC (Tue)
by walex (guest, #69836)
[Link] (9 responses)
The solution that exists and has existed for decades and has worked well for decades is to mount am ordinary '/' filesystem at first-stage boot and use that to mount '/usr' (encrypted over iSCSI using TPM if necessary) for second stage boot. If you think that is more complicated and fragile than to mount first '/boot', then "initramfs", then '/', then '/usr', and that in such a sequence the clever move is to drop '/', good luck.
Posted Jan 19, 2016 9:02 UTC (Tue)
by mjg59 (subscriber, #23239)
[Link] (3 responses)
That's certainly a thing you could do, but now you have two choices:
1) Have /var, /home and /etc be part of /, and so be unencrypted
Both of these choices are bad, and so your solution is a bad solution and has not worked well for decades.
Posted Jan 19, 2016 19:25 UTC (Tue)
by walex (guest, #69836)
[Link] (2 responses)
It seems that I need to explain again the basics of how the boot process works and how UNIX/Linux sytems wor k in repect of the mount and pivot_root system calls, I'll try to keep it short: The outline boot sequence can therefore well be: That the above, which seems to me basic system knowledge, needs explaining again and again in detail is quite frustrating; as I wrote a few times already, the first-stage boot / (or kernel) does not need to be the very same as the the second-stage / (or kernel), and indeed in the current arrangement there are another two. Plus there is mount --bind for an alternative option. Anyhow in the current practice GRUB's root (first-stage root) /boot is inside an unencrypted partition distinct from that containing / (second/third stage root) and someone could replace anyhow its contents with suitably "improved" kernel images or "initramfs" snapshot images. I know people who understand boot processes and who keep /boot (only) on a USB storage device they carry with them at all times because they reckon that an encrypted / with an unencrypted /boot is not giving them peace of mind.
Posted Jan 19, 2016 19:38 UTC (Tue)
by mjg59 (subscriber, #23239)
[Link]
Posted Jan 20, 2016 9:00 UTC (Wed)
by anselm (subscriber, #2796)
[Link]
This is essentially what happens with initramfs, except that the initramfs is loaded using the boot loader/system firmware, and can in principle come from anywhere (including a remote server). Your approach forces you to have the first-stage “/” available locally as an actual file system on a storage medium, which sucks if you want to have a diskless system.
You still need to ensure that whatever is on the first-stage “/” matches the rest of the system, just like with an initramfs. The difference is that the process of making initramfses is fairly well-understood and there are good tools for it already.
Two points:
Posted Jan 19, 2016 11:56 UTC (Tue)
by jond (subscriber, #37669)
[Link] (4 responses)
Posted Jan 19, 2016 16:54 UTC (Tue)
by paulj (subscriber, #341)
[Link] (3 responses)
Not all the world is anglo-phile.
Posted Jan 19, 2016 16:57 UTC (Tue)
by paulj (subscriber, #341)
[Link]
«This is common in France apparently»
Posted Jan 20, 2016 14:22 UTC (Wed)
by jond (subscriber, #37669)
[Link] (1 responses)
Posted Jan 20, 2016 17:27 UTC (Wed)
by apoelstra (subscriber, #75205)
[Link]
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
2) Have /var, /home and /etc be separate partitions, and introduce additional complexity (how do you know where /etc is if /etc isn't already there?)
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Linux kernel is booted mounting /dev/sda1 as /, which contains a fully functional but "vanilla" / filesystem.
Anyhow in the current practice GRUB's root (first-stage root) /boot is inside an unencrypted partition distinct from that containing / (second/third stage root) and someone could replace anyhow its contents with suitably "improved" kernel images or "initramfs" snapshot images. I know people who understand boot processes and who keep /boot (only) on a USB storage device they carry with them at all times because they reckon that an encrypted / with an unencrypted /boot is not giving them peace of mind.
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
Preparing for a merged /usr in Debian
