5 if [ -f /usr/share/debconf/confmodule ]; then
6 . /usr/share/debconf/confmodule
11 configure|reconfigure)
13 # if a new install then we create the link and exit
14 if grep -q "^# UNCONFIGURED FSTAB FOR BASE SYSTEM" /etc/fstab ; then
18 # Check whether /boot is on another partition and mount it. See Bug#216250
20 if grep "[[:space:]]/boot[[:space:]]" /etc/fstab | grep -vq ^#; then
21 if ! grep -q "[[:space:]]/boot[[:space:]]" /etc/mtab ; then
22 mount /boot 2>&1 > /dev/null
26 echo "WARNING: /boot is in another partition but could not be mounted."
27 echo "LILO may fail in the next steps."
32 cp /usr/share/lilo/*.bmp /boot
34 if [ -L /boot/debian.bmp ]; then
35 if [ x`readlink /boot/debian.bmp | cut -d/ -f 2` != x"boot" ]; then
36 ln -sf /boot/sid.bmp /boot/debian.bmp
40 if [ ! -e /boot/debian.bmp ]; then
41 ln -sf /boot/sarge.bmp /boot/debian.bmp
44 # Nasty part to create network block devices if needed. Bug#235805.
45 if [ `uname -r | sed -e 's/-.*//g' -ne 's/\(^[0-9]\{1\}\.[0-9]\{1,2\}\).*/\1/p'` = "2.6" ] && \
46 [ `uname -r | sed -e 's/-.*//g' -ne 's/.*\.\([0-9]\{1,3\}\).*/\1/p'` -ge "3" ]; then
48 garbage=$(cat /proc/partitions | sed -ne 's/^[ \t]*//pg' | sed -ne '/^43/p')
50 if [ x"$garbage" != "x" ]; then
52 # Create the missing devices
53 echo -n "Creating network block devices... "
54 (cd /dev; ./MAKEDEV nb) > /dev/null
59 db_get lilo/add_large_memory || true;
60 if [ x"$RET" = x"true" -a -e /etc/lilo.conf ]; then
61 if ! grep -q "^[[:space:]]*large-memory" /etc/lilo.conf; then
62 sed -i -e '1i\# Automatically added by lilo postinst script\nlarge-memory\n' /etc/lilo.conf
63 echo "WARNING: Added large-memory option, please run lilo before you reboot"
65 elif [ -e /vmlinuz -a -e /initrd.img -a -e /etc/lilo.conf ]; then
66 kernel_size=$(stat -L -c %s /vmlinuz)
67 initrd_size=$(stat -L -c %s /initrd.img)
68 size=$(($kernel_size+$initrd_size))
69 large_mem=$(grep -c "^[[:space:]]*large-memory" /etc/lilo.conf) || true
70 if [ $large_mem -eq 0 -a $size -ge 8388608 ]; then
72 echo "WARNING: You have a large kernel+initrd and large-memory is not set in lilo.conf."
73 echo "WARNING: Do NOT reboot or LILO may fail to boot."
74 echo "WARNING: Please read /usr/share/doc/lilo/README.Debian"
79 echo "WARNING: kernel & initrd not found in the root directory (/vmlinuz & /initrd.img)"
80 echo "WARNING: Do NOT reboot or LILO may fail to boot if your kernel+initrd is large."
81 echo "WARNING: Please read /usr/share/doc/lilo/README.Debian"
85 db_get lilo/runme || true;
86 if [ x"$RET" = x"true" ]; then
87 echo "Running lilo..."
92 abort-upgrade|abort-remove|abort-deconfigure)
97 echo "postinst called with unknown argument \`$1'" >&2