MYLOCALRC=/mnt/etc/rc.local
ROOTMB=64
ROOTSECTS="`expr $ROOTMB '*' 1024 '*' 2`"
+BOOTXXSECTS=32
USRKBFILE=/.usrkb
if [ ! -f "$USRKBFILE" ]
then echo "Are you really running from CD?"
ROOTMB="`expr $ROOTSECTS / 2048`"
if [ $ROOTSECTS -ne $ROOTSECTSDEFAULT ]
then
+ # Check if we
echo "Root partition size `expr $ROOTSECTS / 2`kb differs from default `expr $ROOTSECTSDEFAULT / 2`kb."
echo "This is not a problem, but you may want to do a fresh install at some point to"
echo "be able to benefit from the new default."
fi
+ # Check if enough space for new boot (even if old used)
+ let bootspace=`devsize /dev/$primary`-`devsize /dev/$root`-`devsize /dev/$home`-`devsize /dev/$usr` >/dev/null
+ if [ $bootspace -lt $BOOTXXSECTS ]
+ then
+ echo "Root partition size will be reduced by up to 16Kb to fit new bootloader."
+ echo "This is not a problem."
+ ROOTSECTS=`expr $ROOTSECTS - $BOOTXXSECTS + $bootspace`
+ fi
+
# Recompute totals based on root size
TOTALMB="`expr 3 + $USRKB / 1024 + $ROOTMB`"
maxhome="`expr $devsizemb - $TOTALMB - 1`"
blocksize=$blockdefault
fi
+blocksizebytes="`expr $blocksize '*' 1024`"
+
usenewboot=1
-bootsectors=32
-if [ ! "$auto" = "r" ]
-then
- echo ""
+bootsectors=$BOOTXXSECTS
+echo ""
echo " --- Step 7: Select a boot scheme --------------------------------------"
- echo ""
+echo ""
- echo -n "Do you want to use new boot? [Y] "
- read ok
- if [ "$ok" != Y -a "$ok" != y -a "$ok" != "" ]
- then
- usenewboot=0
- bootsectors=1
- fi
+echo -n "Do you want to use new boot? [Y] "
+read ok
+if [ "$ok" != Y -a "$ok" != y -a "$ok" != "" ]
+then
+ usenewboot=0
+ bootsectors=1
fi
-
-blocksizebytes="`expr $blocksize '*' 1024`"
-
echo "
You have selected to (re)install MINIX 3 in the partition /dev/$primary.
The following subpartitions are now being created on /dev/$primary: