hdemu_root_changes()
{
- $RELEASEDIR/usr/bin/installboot -d $RAM \
+ $RELEASEDIR/usr/bin/installboot -d $TMPDISK3 \
$RELEASEDIR/usr/mdec/bootblock boot/boot
echo \
'label=BIOS
disable=inet
bios_remap_first=1
ramimagedev=c0d7p0s0
-save' | $RELEASEDIR/usr/bin/edparams $RAM
+save' | $RELEASEDIR/usr/bin/edparams $TMPDISK3
echo \
'root=/dev/c0d7p0s0
version_pretty=`sed 's/[" ]//g;/^$/d' </tmp/rel.$$`
version=`sed 's/[" ]//g;/^$/d' </tmp/rel.$$ | tr . _`
ISO=minix${version}_`date +%Y%m%d-%H%M%S`
-RAM=/dev/ram
BS=4096
HDEMU=0
TD1=.td1
TD2=.td2
+TD3=.td3
-echo " * Warning: I'm going to mkfs $RAM!"
if [ -f $TD1 ]
then TMPDISK="`cat $TD1`"
echo " * Warning: I'm going to overwrite $TMPDISK!"
else
- echo "It has to be at least $ROOTKB KB."
- echo ""
echo "Temporary (sub)partition to use to make the /usr FS image? "
echo "I need $USRMB MB. It will be mkfsed!"
echo -n "Device: /dev/"
echo $TMPDISK2 >$TD2
+if [ -f $TD3 ]
+then TMPDISK3="`cat $TD3`"
+ echo " * Warning: I'm going to overwrite $TMPDISK3!"
+else
+ echo "It has to be at least $ROOTKB KB."
+ echo ""
+ echo "Temporary (sub)partition to use to make the root FS image? "
+ echo "It will be mkfsed!"
+ echo -n "Device: /dev/"
+ read dev || exit 1
+ TMPDISK3=/dev/$dev
+fi
+
+if [ -b $TMPDISK3 ]
+then :
+else echo "$TMPDISK3 is not a block device.."
+ exit 1
+fi
+
+echo $TMPDISK3 >$TD3
+
umount $TMPDISK
umount $TMPDISK2
-umount $RAM
+umount $TMPDISK3
-if [ $TMPDISK = $TMPDISK2 ]
+if [ $TMPDISK = $TMPDISK2 -o $TMPDISK = $TMPDISK3 -o $TMPDISK2 = $TMPDISK3 ]
then
echo "Temporary devices can't be equal."
exit
rm -rf $RELEASEDIR $ISO $IMAGE $ROOTIMAGE $ISOBZ $CDFILES image*
mkdir -p $CDFILES || exit
mkdir -p $RELEASEDIR
-mkfs -B $BS -b $ROOTBLOCKS $RAM || exit
+mkfs -B $BS -b $ROOTBLOCKS $TMPDISK3 || exit
mkfs $TMPDISK2 || exit
-echo " * mounting $RAM as $RELEASEDIR"
-mount $RAM $RELEASEDIR || exit
+echo " * mounting $TMPDISK3 as $RELEASEDIR"
+mount $TMPDISK3 $RELEASEDIR || exit
mkdir -m 755 $RELEASEDIR/usr
mkdir -m 1777 $RELEASEDIR/tmp
mount $TMPDISK2 $RELEASEDIR/tmp
find $RELEASEDIR -xdev | wc -l >$RELEASEDIR/.rootfiles
echo " * Zeroing remainder of temporary areas"
df $TMPDISK
-df $RAM
+df $TMPDISK3
cp /dev/zero $RELEASEDIR/usr/.x
rm $RELEASEDIR/usr/.x
cp /dev/zero $RELEASEDIR/.x
umount $TMPDISK || exit
umount $TMPDISK2 || exit
-umount $RAM || exit
+umount $TMPDISK3 || exit
(cd ../boot && make)
(cd .. && make depend)
make clean
cp image image_big
make clean
make image_small || exit 1
-dd if=$RAM of=$ROOTIMAGE bs=$BS count=$ROOTBLOCKS
+dd if=$TMPDISK3 of=$ROOTIMAGE bs=$BS count=$ROOTBLOCKS
# Prepare image and image_small for cdfdboot
cp image_big image
-sh mkboot cdfdboot
+sh mkboot cdfdboot $TMPDISK3
cp $IMAGE $CDFILES/bootflop.img
cp release/cd/* $CDFILES