live-build/ubuntu-core/hooks/25-create-generic-initrd.chroot create a generic initrd inside the snappy os-snap
parent
2d5afc7dc7
commit
4d25373897
@ -0,0 +1,22 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
IVER="$(dpkg -s initramfs-tools-ubuntu-core | \
|
||||||
|
sed -n '/^Version:/{s/^[^: ]*: \([^: ]*\).*/\1/;p;}')"
|
||||||
|
|
||||||
|
# force lzma
|
||||||
|
mkdir -p /etc/initramfs-tools/conf.d
|
||||||
|
echo "COMPRESS=lzma" >/etc/initramfs-tools/conf.d/snappy-generic-initrd.conf
|
||||||
|
|
||||||
|
update-initramfs.REAL -c -kcore-$IVER -v
|
||||||
|
|
||||||
|
cd /boot
|
||||||
|
ln -s initrd.img-core-$IVER initrd.img-core
|
||||||
|
cd -
|
||||||
|
|
||||||
|
sha1sum /boot/initrd.img-core >/var/lib/initramfs-tools/core
|
||||||
|
|
||||||
|
# for snapcraft backwards compatibility
|
||||||
|
mkdir -p /usr/lib/ubuntu-core-generic-initrd
|
||||||
|
cp -a /boot/initrd.img-core* /usr/lib/ubuntu-core-generic-initrd/
|
Loading…
Reference in new issue