Skip to content

Comments

hooks: restore link to built initrd#134

Merged
ernestl merged 1 commit intocanonical:masterfrom
alfonsosanchezbeato:fix-initrd-build
Jan 17, 2024
Merged

hooks: restore link to built initrd#134
ernestl merged 1 commit intocanonical:masterfrom
alfonsosanchezbeato:fix-initrd-build

Conversation

@alfonsosanchezbeato
Copy link
Member

Recent changes in xenial livebuild include the fuse package when creating the chroot - this was not until very recently. When it gets removed by hook 600-no-debian.binary, the initrd gets re-built and the symlink created by 25-create-generic-initrd.chroot is replaced by a real file. Put things back to normal by making it point back to the initrd generated by the latter.

Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change and explanation looks good. I have not test-built this myself.

(cd $PREFIX
chroot . dpkg --purge --force-depends apt libapt-inst2.0 libapt-pkg5.0 lsb-release fuse
# The removal of fuse triggers a call to update-initramfs and a
# new initrd is created, remove it restore the link to the initrd

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the remove step of the new initrd?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the -f of ln -sf...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, so just the symlink

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually removes regular files as well

Copy link
Member

@ernestl ernestl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one comment/question

Recent changes in xenial livebuild include the fuse package when
creating the chroot - this was not until very recently. When it gets
removed by hook 600-no-debian.binary, the initrd gets re-built and the
symlink created by 25-create-generic-initrd.chroot is replaced by a
real file. Put things back to normal by making it point back to the
initrd generated by the latter.
Copy link

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ernestl ernestl merged commit 519870a into canonical:master Jan 17, 2024
@alfonsosanchezbeato alfonsosanchezbeato deleted the fix-initrd-build branch September 30, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants