/boot contains unused initrd.img

Bug #1464859 reported by Simon Eisenmann on 2015-06-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Status tracked in Trunk
15.04
Undecided
Unassigned
Trunk
High
Unassigned

Bug Description

When building an snappy image with

sudo ubuntu-device-flash core 15.04 --channel edge --oem odroidc_0.2_all.snap --device-part device-odroidc.tar.xz --developer-mode -s 3 -o odroidc.img

the booted image contains obsolete stuff in /boot

-rw-r--r-- 1 root root 179K May 29 14:21 config-3.19.0-20-generic
drwxr-xr-x 2 root root 4.0K Jun 9 13:43 efi
-rw-r--r-- 1 root root 13M Jun 13 05:11 initrd.img
drwxr-xr-x 4 root root 512 Jan 1 1970 uboot
lrwxrwxrwx 1 root root 25 Jun 13 05:08 vmlinuz -> vmlinuz-3.19.0-20-generic

initrd.img is 13M and not required but it is so large that i care. The config-xx and vmlinuz are also not required but of small size.

When building an image with own Kernel, and own Initrd the default? ones should not be added to /boot.

Michael Vogt (mvo) on 2015-06-16
Changed in snappy:
status: New → Triaged
importance: Undecided → High
Simon Eisenmann (longsleep) wrote :

It seems that the extra stuff is no longer added when creating an image. Though when ubuntu-core is updated it always adds kernel, initrd and dtbs files to /boot/uboot/[a|b|/... even if a device tarball is in use providing this stuff. This is dangerous as it might override the files provided/needed to boot on this particular hardware.

Workaround like i implemented in for the ODROIDC is to use custom names for initrd, kernel and dtbs file to avoid them getting overwritten by the ones provided when upgrading.

Ubuntu core updates should not add Kernel, Initrd and DTBS if a device tarball was used.

Leo Arias (elopio) wrote :

Now with the all-snaps architectur these files: vmlinux, initrd and dtbs will come from the kernel snap. Then an update of ubuntu-core will not affect them. And they will be updated when you get a kernel snap update. Does that solve your problems?

Thanks for your report.

Michael Vogt (mvo) wrote :

This is fixed in snappy 16.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers