2019-08-07 17:32:25 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
TARGET=$1
|
|
|
|
KERNEL_VERSION=$2
|
2021-07-29 12:42:53 +02:00
|
|
|
KERNEL_REPO=$3
|
2019-08-07 17:32:25 +02:00
|
|
|
LANG=C
|
|
|
|
|
2021-11-10 22:01:20 +01:00
|
|
|
APT_PARAM=''
|
|
|
|
STDOUT='/dev/stdout'
|
|
|
|
if [ !$MKRESCUE_VERBOSE ]; then
|
|
|
|
APT_PARAM='-qq -o=Dpkg::Use-Pty=0';
|
|
|
|
STDOUT='/dev/null';
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2021-07-29 12:42:53 +02:00
|
|
|
FIRMWARES1="firmware-linux-free"
|
|
|
|
FIRMWARES2="firmware-bnx2 firmware-bnx2x firmware-cavium \
|
2019-08-07 17:32:25 +02:00
|
|
|
firmware-misc-nonfree firmware-myricom firmware-netxen firmware-qlogic \
|
|
|
|
firmware-realtek"
|
|
|
|
|
|
|
|
cat << EOF > $TARGET/usr/sbin/policy-rc.d
|
|
|
|
#!/bin/sh
|
2021-11-10 22:01:20 +01:00
|
|
|
#echo "All runlevel operations denied by policy" >&2
|
2019-08-07 17:32:25 +02:00
|
|
|
exit 101
|
|
|
|
EOF
|
|
|
|
chmod a+x $TARGET/usr/sbin/policy-rc.d
|
|
|
|
|
|
|
|
chroot ${TARGET} mount -t proc proc /proc
|
2021-11-10 22:01:20 +01:00
|
|
|
chroot ${TARGET} apt-get $APT_PARAM --yes install busybox-static > $STDOUT
|
|
|
|
chroot ${TARGET} apt-get $APT_PARAM --yes install -t ${KERNEL_REPO} linux-image-${KERNEL_VERSION} linux-headers-${KERNEL_VERSION} > $STDOUT
|
|
|
|
chroot ${TARGET} apt-get $APT_PARAM --yes install -t ${KERNEL_REPO} zfs-dkms > $STDOUT
|
|
|
|
chroot ${TARGET} apt-get $APT_PARAM --yes install ${FIRMWARES1} > $STDOUT
|
|
|
|
chroot ${TARGET} apt-get $APT_PARAM --yes install -t ${KERNEL_REPO} ${FIRMWARES2} > $STDOUT
|
2019-08-07 17:32:25 +02:00
|
|
|
chroot ${TARGET} umount /proc
|