Third-oldest image is thrown away instead of oldest, if there are at least 4
images. (Oldest is kept.) Various cd message updates.
This commit is contained in:
parent
12618851ad
commit
71e6680b80
1 changed files with 6 additions and 8 deletions
14
tools/mkboot
14
tools/mkboot
|
@ -86,15 +86,14 @@ hdboot)
|
|||
set -- `ls -t $rootdir/boot/image`
|
||||
|
||||
case $# in
|
||||
0|1)
|
||||
0|1|2|3)
|
||||
# Not much there, do not remove a thing.
|
||||
;;
|
||||
*)
|
||||
# Remove the newest image in /boot/image. This seems strange,
|
||||
# but the old image is normally the "stable" image.
|
||||
|
||||
echo "rm $root:/boot/image/$1"
|
||||
rm -f "$rootdir/boot/image/$1"
|
||||
# Remove the third-newest image in /boot/image, but
|
||||
# only if there's an older one (which is kept).
|
||||
echo "rm $root:/boot/image/$3"
|
||||
rm -f "$rootdir/boot/image/$3"
|
||||
esac
|
||||
|
||||
# Install the new image.
|
||||
|
@ -175,8 +174,7 @@ cdfdboot)
|
|||
cp -p ../boot/boot /mnt/boot/boot || exit 1
|
||||
umount $dev || exit 1
|
||||
installboot -d $dev ../boot/bootblock boot/boot || exit 1
|
||||
edparams $dev 'unset bootopts; unset servers; unset image; ramimagedev=c0d2p1; unset rootdev; unset leader; leader() { echo If the system cannot find root, please hit ESC and set your\nramimagedev to the CD device, partition 1. e.g.\nramimagedev=c0d2p1 .. then boot to start.\n\nOtherwise I will boot with my defaults in 10 seconds.\n\n }; bootcd=1; main(){delay 10000;boot}; save' || exit
|
||||
# edparams $dev 'unset bootopts; unset servers; unset image; ramimagedev=c0d2p1; unset rootdev; unset leader; bootcd=1; main(){delay 10000;boot}; save' || exit
|
||||
edparams $dev 'unset bootopts; unset servers; unset image; cdproberoot=1; unset rootdev; unset leader; leader() { echo \n--- Welcome to MINIX3 ---\n\nPress ESC if you need to do any special configuration\nOtherwise I will boot with my defaults in 10 seconds\n\n }; bootcd=1; main(){delay 10000;boot}; save' || exit
|
||||
|
||||
# copy image
|
||||
dd if=$dev of=cdfdimage bs=8192 count=180
|
||||
|
|
Loading…
Reference in a new issue