fix(deploy): dropbear at boot on initramfs-tools, with dracut's image as the way back (ADR 0039, D20)
Ubuntu 26.04 builds its boot images with dracut, and dropbear-initramfs needs initramfs-tools, which replaces it. The host's step 2 now installs initramfs-tools with cryptsetup-initramfs beside dropbear, sets the boot image's address in a conf.d file of its own, and checks every new image for what opens the disk, dropbear, its key and the adapter's driver before any reboot. Before switching, dracut's image of the running kernel is kept as an entry in GRUB's menu (shown 5 s, the boot in text), so a failed image is undone at the iMac without a USB stick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
f3f4863c6d
commit
0144cea380
1 changed files with 119 additions and 9 deletions
|
|
@ -270,8 +270,40 @@ void main() {
|
|||
expect(options, containsAll(['-c', 'cryptroot-unlock']));
|
||||
});
|
||||
|
||||
test("loads the USB network adapter's driver at boot", () {
|
||||
test("loads the USB network adapter's driver at boot, and takes its "
|
||||
'address by DHCP there', () {
|
||||
expect(lines(read('deploy/host/initramfs-modules')), contains('cdc_ncm'));
|
||||
expect(lines(read('deploy/host/initramfs-ip')), [
|
||||
'IP=::::balthasar:enx0050b6bffcff:dhcp',
|
||||
]);
|
||||
});
|
||||
|
||||
group("keeps a way back to dracut's image, which initramfs-tools "
|
||||
'replaces', () {
|
||||
final fallback = read('deploy/host/grub-dracut-fallback');
|
||||
|
||||
test("as GRUB's entry for each kernel that has a copy of it", () {
|
||||
expect(
|
||||
fallback,
|
||||
contains('for image in /boot/initrd.img-*.dracut; do'),
|
||||
);
|
||||
expect(
|
||||
fallback,
|
||||
contains(r'[ -e "/boot/vmlinuz-$version" ] || continue'),
|
||||
);
|
||||
expect(fallback, contains(r'initrd /initrd.img-$version.dracut'));
|
||||
expect(
|
||||
File('deploy/host/grub-dracut-fallback').statSync().mode & 0x49,
|
||||
0x49,
|
||||
reason: 'executable, as update-grub runs it',
|
||||
);
|
||||
});
|
||||
|
||||
test("in GRUB's menu, shown long enough to choose it at the iMac", () {
|
||||
final grub = lines(read('deploy/host/grub-halkyon.cfg'));
|
||||
expect(grub, contains('GRUB_TIMEOUT_STYLE=menu'));
|
||||
expect(grub, contains('GRUB_TIMEOUT=5'));
|
||||
});
|
||||
});
|
||||
|
||||
test("keeps Docker's data on the HDD, which Docker waits for", () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue