layered images result in not rebuilding initrd with uuid set from lb_chroot_hacks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
live-build (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Copying the description from Dimitri wrote via email about the issue
'Here is analysis of the canary image build log
$ grep -e lb_chroot_hacks -e 'skipping chroot_hacks' -e 'installing'
-e 'update-initramfs: Genera' *.txt
P: Begin installing packages (minimal pass)...
update-initramfs: Generating /boot/initrd.
Do minimal pass and generate initrd.
[2019-06-07 08:03:30] lb_chroot_hacks
update-initramfs: Generating /boot/initrd.
lb_chroot_hacks has a lot of code, most of which is not executed as
far as i can tell.
The bits that are executed are ->
1) regenerate initrd with CASPER_UUID set => but at this point casper
is not installed yet!
(with UPDATE_
Chroot chroot "${UPDATE_
2) do some cleanups of files
find chroot/boot -name 'initrd*' -print0 | xargs -r -0 chmod go+r
# Remove cruft
rm -f chroot/
rm -f chroot/
rm -f chroot/etc/group- chroot/etc/passwd-
rm -f chroot/etc/gshadow- chroot/etc/shadow-
rm -f chroot/
rm -f chroot/
rm -f chroot/
rm -f chroot/etc/adjtime
...
Now after this, you can see that lb_chroot_hacks are not executed on
any further layers!
P: Begin installing packages (minimal.
[2019-06-07 08:03:52] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:04:01] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:04:10] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:04:19] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:04:28] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:04:37] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:04:47] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:04:55] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages
(minimal.
[2019-06-07 08:05:04] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.standard pass)...
[2019-06-07 08:05:58] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:06:14] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:06:28] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:06:43] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:06:58] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:07:13] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:07:29] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:07:44] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
[2019-06-07 08:07:59] lb_chroot_hacks
W: skipping chroot_hacks, already done
P: Begin installing packages (minimal.
update-initramfs: Generating /boot/initrd.
Here in live layer casper is installed and initrd is regenerated without a uuid!
[2019-06-07 08:08:38] lb_chroot_hacks
W: skipping chroot_hacks, already done
And lb_chroot_hacks is not executed here.
P: Begin installing packages
(minimal.
[2019-06-07 08:08:54] lb_chroot_hacks
W: skipping chroot_hacks, already done''
description: | updated |
Changed in live-build (Ubuntu): | |
assignee: | Will Cooke (willcooke) → nobody |
Dimitri also wrote that post the hangout discussing the issue
'We should make kernel/linux install be done in the is_live_layer only. Including regenerating the initrd as done in hacks, and rip it out.
However, we also need to run chroot_hacks in every layer, to ensure they are squeaky clean:
- empty /var/log
- empty /run/*
- empty /dev/*
- no mlocate database'