[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#191594: lilo-installer should offer to make the partition it installs to active



Package: lilo-installer
Version: 0.0.11; reported 2003-05-01
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When lilo-installer is asked to install lilo into a partition, as
opposed to the master boot record (MBR) of the disc, it should offer to
make that partition active -- so that when the installer reboots, the
system loads the copy of lilo that was installed.

The following (untested) patch fixes this.  I don't know much about
debconf, so feel free to modify this as needed.

Thanks,

Joe Nahmias, DD wannabe


- --- debian/lilo-installer.postinst.orig	2003-02-22 11:54:18.000000000 -0500
+++ debian/lilo-installer.postinst	2003-05-01 20:59:59.000000000 -0400
@@ -41,6 +41,19 @@ fi
 bootdev=`mapdevfs $bootdev`
 rootfs=`mapdevfs $rootfs`
 
+# If installing to a partition (not MBR), offer to make it active
+if echo "${bootdev}" | grep -q '[0-9]$'; then
+    echo "You have selected to install to a partition instead of the MBR."
+    read "Would you like to set this partition to active? [N/y] " choice
+    if echo ${choice} | grep -q -i '^y'; then
+        pnum=$(echo ${bootdev} | sed 's/^.*\([0-9]\+\)$/\1/')
+        disc=$(echo ${bootdev} | sed 's/part[0-9]\+$/disc/')
+        echo -n "Setting partition to active..."
+        sfdisk -A${pnum} ${disc}
+	echo "done."
+    fi
+fi
+
 # serial support
 
 if grep -q console=ttyS /proc/cmdline; then


- -- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux a750.nahmias.net 2.4.20 #1 Thu Jan 9 11:22:09 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+scWDKl23+OYWEqURAs/ZAJkBiRFjd5e3h9n0k8z6sxGMGBk42gCeJm7D
F41P1sl9bneNXacviyC35Ek=
=fbtX
-----END PGP SIGNATURE-----



Reply to: