Commit 37e77285 authored by Michael Shigorin's avatar Michael Shigorin

stage2: tweak 99-cleanup-boot for efficiency

Thanks glebfm@ for noticing that Simply (an m-p-d product) takes no kernel inside squashfs but relies on livecd-install's 50-restore-kernel.sh hook to copy the kernel from iso9660 and regenerate initrd (which is a must anyways but requires System.map to be still around). This saves about 3 Mb in ISO size for a LiveCD using kernel-image-std-def-4.1.15-alt1.x86_64.rpm.
parent 837e6be9
#!/bin/sh
# don't cripple the image to be copied over
[ -x /usr/sbin/live-install -o -x /usr/sbin/livecd-install -o \
-x /usr/sbin/homeros-install -o -x /usr/sbin/luwrain-install ] && exit 0
# NB: livecd-install has 50-restore-kernel.sh
[ -x /usr/sbin/live-install -o \
-x /usr/sbin/homeros-install -o \
-x /usr/sbin/luwrain-install ] && exit 0
# no need for the kernel in live root otherwise: it's been booted already
rm -f /boot/*
# NB: installkernel run by that livecd-install hook needs System.map
rm -f -- /boot/{initrd,vmlinuz}*
[ -x /usr/sbin/livecd-install ] || rm -f -- /boot/*
:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment