Report forwarded to Bernd Eckenfels <ecki@debian.org>:
Bug#6195; Package mkrboot.   Bernd Eckenfels  Subject: Bug#6195: mkrboot: floppy image support, and minor fixes Reply-To: Sven Rudolph , 6195-maintonly@bugs.debian.org Resent-From: Sven Rudolph Resent-To: Bernd Eckenfels Resent-Date: Sat, 28 Dec 1996 01:33:05 GMT Resent-Message-ID: Resent-Sender: iwj@debian.org X-Debian-PR-Package: mkrboot X-Debian-PR-Keywords: X-Loop: owner@bugs.debian.org Received: via spool by maintonly@bugs.debian.org id=M.8517362011055 (code M ref -1); Sat, 28 Dec 1996 01:33:05 GMT Date: Sat, 28 Dec 1996 02:22:28 +0100 Message-Id: <199612280122.CAA06951@os.inf.tu-dresden.de> From: Sven Rudolph To: maintonly@bugs.debian.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Package: mkrboot Version: 0.6 I taught mkrboot to work on floppy images instead of real disks. When the device is not a block device, it is mounted using '-o loop'. I tested this only for syslinux. I found a bug in the procedure for getting the remaining disk space: old: FREE=`df /mnt|awk '/mnt/ { print $4; }'` This fails on multiline mount output,hence: new: FREE=`df /mnt|awk '/mnt/ { print $(NF-2); }'` And there was still a place where you used img${SIZE}.gz instead of img${SIZE}k.gz ... The diff contains everything. Sven -- Sven Rudolph ; WWW : http://www.sax.de/~sr1/ *** mkrboot-0.6.old/mkrboot Thu Dec 12 22:42:48 1996 --- mkrboot-0.6/mkrboot Sat Dec 28 02:13:02 1996 *************** *** 60,69 **** --- 60,103 ---- exit 1 fi + if [ ! -b $DEV ]; then + if [ ! -e $DEV -o -f $DEV -a -w $DEV ]; then + echo "mkrboot: trying to use floppy image $DEV" + if [ "$1" != "syslinux" ]; then + echo "mkrboot: this isn't tested yet for this method" + exit 1 + fi + if [ ! -e $DEV ]; then + if touch $DEV 2>/dev/null ; then + echo -n + else + echo "mkrboot: Cannot write floppy image $DEV" + exit 1 + fi + fi + MOUNTOPT="-o loop" + else + echo "mkrboot: Target Device $DEV is no block device" + exit 1 + fi + fi + KERNEL_SIZE=`du $KERNEL |awk '{ print $1; }'` ROOT_SIZE=`du $ROOTIMAGE |awk '{ print $1; }'` echo "Kernel Size=$KERNEL_SIZE k, Root System Size=$ROOT_SIZE k" + + function pad_disk + { + + if [ -f $1 ]; then + FILLLENGTH=`wc -c <$1` + FILLSIZE=`expr $2 + $2 - $FILLLENGTH / 512` + dd if=/dev/zero bs=512 count=$FILLSIZE >>$1 + fi + } + + if [ "$1" = "loadlin" ]; then if [ ! -d /usr/lib/loadlin ]; then echo "mkrboot: ERROR: no loadlin found!" *************** *** 120,126 **** fi echo "Setting up a bootable disk with FreeDOS ..." zcat /usr/fdos/boot-fdos${SIZE}.gz >$DEV ! mount -tmsdos $DEV /mnt echo "Copying files ..." cp $LIB/fdos/* /mnt unix2dos /mnt/*.bat --- 154,160 ---- fi echo "Setting up a bootable disk with FreeDOS ..." zcat /usr/fdos/boot-fdos${SIZE}.gz >$DEV ! mount -tmsdos $MOUNTOPT $DEV /mnt echo "Copying files ..." cp $LIB/fdos/* /mnt unix2dos /mnt/*.bat *************** *** 129,135 **** cp $ROOTIMAGE /mnt/ROOT.BIN /usr/sbin/rdev /mnt/LINUX /dev/ram0 /usr/sbin/ramsize /mnt/LINUX 0 ! FREE=`df /mnt|awk '/mnt/ { print $4; }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available" exit 0 --- 163,169 ---- cp $ROOTIMAGE /mnt/ROOT.BIN /usr/sbin/rdev /mnt/LINUX /dev/ram0 /usr/sbin/ramsize /mnt/LINUX 0 ! FREE=`df /mnt|awk '/mnt/ { print $(NF-2); }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available" exit 0 *************** *** 143,149 **** set -e echo "Making Minix FS ..." mkfs.minix -n14 $DEV $SIZE >/dev/null ! mount -tminix $DEV /mnt echo "Copying files ..." cp $KERNEL /mnt/linux cp $ROOTIMAGE /mnt/root.bin --- 177,183 ---- set -e echo "Making Minix FS ..." mkfs.minix -n14 $DEV $SIZE >/dev/null ! mount -tminix $MOUNTOPT $DEV /mnt echo "Copying files ..." cp $KERNEL /mnt/linux cp $ROOTIMAGE /mnt/root.bin *************** *** 152,158 **** rdev /mnt/linux /dev/ram0 ramsize /mnt/linux 0 lilo -C - -b $DEV -i /mnt/boot.b -c -m /mnt/map <$LIB/lilo/lilo.conf >/dev/null ! FREE=`df /mnt|awk '/mnt/ { print $4; }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available." exit 0 --- 186,192 ---- rdev /mnt/linux /dev/ram0 ramsize /mnt/linux 0 lilo -C - -b $DEV -i /mnt/boot.b -c -m /mnt/map <$LIB/lilo/lilo.conf >/dev/null ! FREE=`df /mnt|awk '/mnt/ { print $(NF-2); }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available." exit 0 *************** *** 160,175 **** if [ "$1" = "syslinux" ]; then if [ ! -d /usr/lib/syslinux ]; then ! echo mkrboot: ERROR: no syslinux package found! exit 1 fi if [ ! -r /usr/lib/syslinux/img${SIZE}k.gz ]; then echo mkrboot: ERROR: no syslinux image for size $SIZE found! exit 1 fi ! zcat /usr/lib/syslinux/img${SIZE}.gz >$DEV sync ! mount -tmsdos $DEV /mnt echo "Copying files ..." cp -v $LIB/syslinux/* /mnt cp /usr/lib/syslinux/syslinux.exe /mnt --- 194,212 ---- if [ "$1" = "syslinux" ]; then if [ ! -d /usr/lib/syslinux ]; then ! echo "mkrboot: ERROR: no syslinux package found!" exit 1 fi if [ ! -r /usr/lib/syslinux/img${SIZE}k.gz ]; then echo mkrboot: ERROR: no syslinux image for size $SIZE found! exit 1 fi ! zcat /usr/lib/syslinux/img${SIZE}k.gz >$DEV ! if [ -f $DEV ]; then ! pad_disk $DEV $SIZE ! fi sync ! mount -tmsdos $MOUNTOPT $DEV /mnt echo "Copying files ..." cp -v $LIB/syslinux/* /mnt cp /usr/lib/syslinux/syslinux.exe /mnt *************** *** 178,184 **** cp $ROOTIMAGE /mnt/ROOT.BIN /usr/sbin/rdev /mnt/LINUX /dev/ram0 /usr/sbin/ramsize /mnt/LINUX 0 ! FREE=`df /mnt|awk '/mnt/ { print $4; }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available" exit 0 --- 215,221 ---- cp $ROOTIMAGE /mnt/ROOT.BIN /usr/sbin/rdev /mnt/LINUX /dev/ram0 /usr/sbin/ramsize /mnt/LINUX 0 ! FREE=`df /mnt|awk '/mnt/ { print $(NF-2); }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available" exit 0   Acknowledgement sent to Sven Rudolph <sr1@os.inf.tu-dresden.de>:
New bug report received and forwarded. Copy sent to Bernd Eckenfels <ecki@debian.org>.   -t  From: owner@bugs.debian.org (Ian Jackson) To: Sven Rudolph Subject: Bug#6195: Acknowledgement of maintainer-only report (was: mkrboot: floppy image support, and minor fixes) Message-ID: In-Reply-To: <199612280122.CAA06951@os.inf.tu-dresden.de> References: <199612280122.CAA06951@os.inf.tu-dresden.de> Thank you for the problem report you have sent regarding Debian Linux. This is an automatically generated reply, to let you know your message has been received. It is being forwarded to the developers (but not the mailing list, as you requested) for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): Bernd Eckenfels If you wish to submit further information on your problem, please send it to 6195-maintonly@bugs.debian.org (and *not* to maintonly@bugs.debian.org). Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Ian Jackson (maintainer, Debian bug tracking system)   Received: (at maintonly) by bugs.debian.org; 28 Dec 1996 01:23:21 +0000 Received: (qmail 1053 invoked from network); 28 Dec 1996 01:23:18 -0000 Received: from os.inf.tu-dresden.de (141.76.1.46) by master.debian.org with SMTP; 28 Dec 1996 01:23:11 -0000 Received: (from sr1@localhost) by os.inf.tu-dresden.de (8.7.6/8.7.3) id CAA06951; Sat, 28 Dec 1996 02:22:28 +0100 Date: Sat, 28 Dec 1996 02:22:28 +0100 Message-Id: <199612280122.CAA06951@os.inf.tu-dresden.de> From: Sven Rudolph To: maintonly@bugs.debian.org Subject: mkrboot: floppy image support, and minor fixes Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Package: mkrboot Version: 0.6 I taught mkrboot to work on floppy images instead of real disks. When the device is not a block device, it is mounted using '-o loop'. I tested this only for syslinux. I found a bug in the procedure for getting the remaining disk space: old: FREE=`df /mnt|awk '/mnt/ { print $4; }'` This fails on multiline mount output,hence: new: FREE=`df /mnt|awk '/mnt/ { print $(NF-2); }'` And there was still a place where you used img${SIZE}.gz instead of img${SIZE}k.gz ... The diff contains everything. Sven -- Sven Rudolph ; WWW : http://www.sax.de/~sr1/ *** mkrboot-0.6.old/mkrboot Thu Dec 12 22:42:48 1996 --- mkrboot-0.6/mkrboot Sat Dec 28 02:13:02 1996 *************** *** 60,69 **** --- 60,103 ---- exit 1 fi + if [ ! -b $DEV ]; then + if [ ! -e $DEV -o -f $DEV -a -w $DEV ]; then + echo "mkrboot: trying to use floppy image $DEV" + if [ "$1" != "syslinux" ]; then + echo "mkrboot: this isn't tested yet for this method" + exit 1 + fi + if [ ! -e $DEV ]; then + if touch $DEV 2>/dev/null ; then + echo -n + else + echo "mkrboot: Cannot write floppy image $DEV" + exit 1 + fi + fi + MOUNTOPT="-o loop" + else + echo "mkrboot: Target Device $DEV is no block device" + exit 1 + fi + fi + KERNEL_SIZE=`du $KERNEL |awk '{ print $1; }'` ROOT_SIZE=`du $ROOTIMAGE |awk '{ print $1; }'` echo "Kernel Size=$KERNEL_SIZE k, Root System Size=$ROOT_SIZE k" + + function pad_disk + { + + if [ -f $1 ]; then + FILLLENGTH=`wc -c <$1` + FILLSIZE=`expr $2 + $2 - $FILLLENGTH / 512` + dd if=/dev/zero bs=512 count=$FILLSIZE >>$1 + fi + } + + if [ "$1" = "loadlin" ]; then if [ ! -d /usr/lib/loadlin ]; then echo "mkrboot: ERROR: no loadlin found!" *************** *** 120,126 **** fi echo "Setting up a bootable disk with FreeDOS ..." zcat /usr/fdos/boot-fdos${SIZE}.gz >$DEV ! mount -tmsdos $DEV /mnt echo "Copying files ..." cp $LIB/fdos/* /mnt unix2dos /mnt/*.bat --- 154,160 ---- fi echo "Setting up a bootable disk with FreeDOS ..." zcat /usr/fdos/boot-fdos${SIZE}.gz >$DEV ! mount -tmsdos $MOUNTOPT $DEV /mnt echo "Copying files ..." cp $LIB/fdos/* /mnt unix2dos /mnt/*.bat *************** *** 129,135 **** cp $ROOTIMAGE /mnt/ROOT.BIN /usr/sbin/rdev /mnt/LINUX /dev/ram0 /usr/sbin/ramsize /mnt/LINUX 0 ! FREE=`df /mnt|awk '/mnt/ { print $4; }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available" exit 0 --- 163,169 ---- cp $ROOTIMAGE /mnt/ROOT.BIN /usr/sbin/rdev /mnt/LINUX /dev/ram0 /usr/sbin/ramsize /mnt/LINUX 0 ! FREE=`df /mnt|awk '/mnt/ { print $(NF-2); }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available" exit 0 *************** *** 143,149 **** set -e echo "Making Minix FS ..." mkfs.minix -n14 $DEV $SIZE >/dev/null ! mount -tminix $DEV /mnt echo "Copying files ..." cp $KERNEL /mnt/linux cp $ROOTIMAGE /mnt/root.bin --- 177,183 ---- set -e echo "Making Minix FS ..." mkfs.minix -n14 $DEV $SIZE >/dev/null ! mount -tminix $MOUNTOPT $DEV /mnt echo "Copying files ..." cp $KERNEL /mnt/linux cp $ROOTIMAGE /mnt/root.bin *************** *** 152,158 **** rdev /mnt/linux /dev/ram0 ramsize /mnt/linux 0 lilo -C - -b $DEV -i /mnt/boot.b -c -m /mnt/map <$LIB/lilo/lilo.conf >/dev/null ! FREE=`df /mnt|awk '/mnt/ { print $4; }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available." exit 0 --- 186,192 ---- rdev /mnt/linux /dev/ram0 ramsize /mnt/linux 0 lilo -C - -b $DEV -i /mnt/boot.b -c -m /mnt/map <$LIB/lilo/lilo.conf >/dev/null ! FREE=`df /mnt|awk '/mnt/ { print $(NF-2); }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available." exit 0 *************** *** 160,175 **** if [ "$1" = "syslinux" ]; then if [ ! -d /usr/lib/syslinux ]; then ! echo mkrboot: ERROR: no syslinux package found! exit 1 fi if [ ! -r /usr/lib/syslinux/img${SIZE}k.gz ]; then echo mkrboot: ERROR: no syslinux image for size $SIZE found! exit 1 fi ! zcat /usr/lib/syslinux/img${SIZE}.gz >$DEV sync ! mount -tmsdos $DEV /mnt echo "Copying files ..." cp -v $LIB/syslinux/* /mnt cp /usr/lib/syslinux/syslinux.exe /mnt --- 194,212 ---- if [ "$1" = "syslinux" ]; then if [ ! -d /usr/lib/syslinux ]; then ! echo "mkrboot: ERROR: no syslinux package found!" exit 1 fi if [ ! -r /usr/lib/syslinux/img${SIZE}k.gz ]; then echo mkrboot: ERROR: no syslinux image for size $SIZE found! exit 1 fi ! zcat /usr/lib/syslinux/img${SIZE}k.gz >$DEV ! if [ -f $DEV ]; then ! pad_disk $DEV $SIZE ! fi sync ! mount -tmsdos $MOUNTOPT $DEV /mnt echo "Copying files ..." cp -v $LIB/syslinux/* /mnt cp /usr/lib/syslinux/syslinux.exe /mnt *************** *** 178,184 **** cp $ROOTIMAGE /mnt/ROOT.BIN /usr/sbin/rdev /mnt/LINUX /dev/ram0 /usr/sbin/ramsize /mnt/LINUX 0 ! FREE=`df /mnt|awk '/mnt/ { print $4; }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available" exit 0 --- 215,221 ---- cp $ROOTIMAGE /mnt/ROOT.BIN /usr/sbin/rdev /mnt/LINUX /dev/ram0 /usr/sbin/ramsize /mnt/LINUX 0 ! FREE=`df /mnt|awk '/mnt/ { print $(NF-2); }'` umount /mnt echo "Bootdisk preparation finished. $FREE k still available" exit 0   Information forwarded to Bernd Eckenfels <ecki@debian.org>:
Bug#6195; Package mkrboot.   Bernd Eckenfels  Subject: Bug#6195: mkrboot: floppy image support, and minor fixes Reply-To: Sven Rudolph , 6195-maintonly@bugs.debian.org Resent-From: Sven Rudolph Resent-To: Bernd Eckenfels Resent-Date: Wed, 01 Oct 1997 22:18:05 GMT Resent-Message-ID: Resent-Sender: iwj@debian.org X-Debian-PR-Message: report 6195 X-Debian-PR-Package: mkrboot X-Debian-PR-Keywords: X-Loop: owner@bugs.debian.org Received: via spool by 6195-maintonly@bugs.debian.org id=M6195.8757439851786 (code M ref 6195); Wed, 01 Oct 1997 22:18:05 GMT To: 6195-maintonly@bugs.debian.org Mime-Version: 1.0 (generated by tm-edit 7.105) Content-Type: text/plain; charset=US-ASCII From: Sven Rudolph Date: 02 Oct 1997 00:14:48 +0200 Message-ID: <8767rh6sh2.fsf@os.inf.tu-dresden.de> Lines: 9 You can drop the floppy image support. I changed my scripts to run on a loop-mounted file. But please apply the other changes. Sven -- Sven Rudolph http://www.sax.de/~sr1/   Acknowledgement sent to Sven Rudolph <sr1@os.inf.tu-dresden.de>:
Extra info received and forwarded to maintainer. Copy sent to Bernd Eckenfels <ecki@debian.org>.   -t  From: owner@bugs.debian.org (Ian Jackson) To: Sven Rudolph Subject: Bug#6195: Info received for maintainer only (was mkrboot: floppy image support, and minor fixes) Message-ID: In-Reply-To: <8767rh6sh2.fsf@os.inf.tu-dresden.de> References: <8767rh6sh2.fsf@os.inf.tu-dresden.de> X-Debian-PR-Message: ack-info 6195 Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) (but not to the mailing list) to accompany the original report. Your message has been sent to the package maintainer(s): Bernd Eckenfels If you wish to continue to submit further information on your problem, please send it to 6195-maintonly@bugs.debian.org, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Ian Jackson (maintainer, Debian bug tracking system)   Received: (at 6195-maintonly) by bugs.debian.org; 1 Oct 1997 22:13:05 +0000 Received: (qmail 1783 invoked from network); 1 Oct 1997 22:13:01 -0000 Received: from os.inf.tu-dresden.de (os.inf.tu-dresden.de@141.76.1.46) by 205.229.104.5 with SMTP; 1 Oct 1997 22:13:01 -0000 Received: (from sr1@localhost) by os.inf.tu-dresden.de (8.8.5/8.8.5) id AAA19608; Thu, 2 Oct 1997 00:14:49 +0200 To: 6195-maintonly@bugs.debian.org Subject: Re: mkrboot: floppy image support, and minor fixes Mime-Version: 1.0 (generated by tm-edit 7.105) Content-Type: text/plain; charset=US-ASCII From: Sven Rudolph Date: 02 Oct 1997 00:14:48 +0200 Message-ID: <8767rh6sh2.fsf@os.inf.tu-dresden.de> Lines: 9 You can drop the floppy image support. I changed my scripts to run on a loop-mounted file. But please apply the other changes. Sven -- Sven Rudolph http://www.sax.de/~sr1/   Information forwarded to Bernd Eckenfels <ecki@debian.org>:
Bug#6195; Package mkrboot.   Bernd Eckenfels  Subject: Bug#6195: (no subject) Reply-To: remco@blaakmeer.student.utwente.nl (Remco Blaakmeer), 6195-maintonly@bugs.debian.org Resent-From: remco@blaakmeer.student.utwente.nl (Remco Blaakmeer) Resent-To: Bernd Eckenfels Resent-Date: Sun, 01 Feb 1998 11:09:17 GMT Resent-Message-ID: Resent-Sender: iwj@debian.org X-Debian-PR-Message: report 6195 X-Debian-PR-Package: mkrboot X-Debian-PR-Keywords: X-Loop: owner@bugs.debian.org Received: via spool by 6195-maintonly@bugs.debian.org id=M6195.88633119331295 (code M ref 6195); Sun, 01 Feb 1998 11:09:17 GMT Message-Id: Date: Sun, 1 Feb 1998 12:01:39 +0100 (CET) From: remco@blaakmeer.student.utwente.nl (Remco Blaakmeer) To: 6195-maintonly@bugs.debian.org This is an automated message sent to all bugs older than one year. This bug is very old. Please take a look at it and see if you can fix it. If it has already been fixed, please close it. If you have problems fixing it or if you don't have the time to fix it, please ask the people on debian-devel@lists.debian.org for help, so that at least the oldest bugs can be solved before Debian 2.0 is released. Remco Blaakmeer   Acknowledgement sent to remco@blaakmeer.student.utwente.nl (Remco Blaakmeer):
Extra info received and forwarded to maintainer. Copy sent to Bernd Eckenfels <ecki@debian.org>.

Your message did not contain a Subject field. This is broken, I'm afraid - the Subject: line is a Required Header according to RFC822. Please remember to include a Subject field in your messages in future. If you did so the fact that it got lost probably indicates a poorly configured mail system at your site or an intervening one.

  -t  From: owner@bugs.debian.org (Ian Jackson) To: remco@blaakmeer.student.utwente.nl (Remco Blaakmeer) Subject: Bug#6195: Info received for maintainer only (was (no subject)) Message-ID: In-Reply-To: References: X-Debian-PR-Message: ack-info 6195 Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developer(s) (but not to the mailing list) to accompany the original report. Your message has been sent to the package maintainer(s): Bernd Eckenfels If you wish to continue to submit further information on your problem, please send it to 6195-maintonly@bugs.debian.org, as before. Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Your message did not contain a Subject field. This is broken, I'm afraid - the Subject: line is a Required Header according to RFC822. Please remember to include a Subject field in your messages in future. If you did so the fact that it got lost probably indicates a poorly configured mail system at your site or an intervening one. Ian Jackson (administrator, Debian bugs database)   Received: (at 6195-maintonly) by bugs.debian.org; 1 Feb 1998 11:06:33 +0000 Received: (qmail 31292 invoked by uid 71); 1 Feb 1998 11:06:33 -0000 Received: from cal011205.student.utwente.nl (HELO blaakmeer.student.utwente.nl) (root@130.89.222.95) by debian.novare.net with SMTP; 1 Feb 1998 11:06:33 -0000 Received: by blaakmeer.student.utwente.nl id m0xyx9f-0013yYC (Debian Smail-3.2.0.100 1997-Dec-8 #2); Sun, 1 Feb 1998 12:01:39 +0100 (CET) Message-Id: Date: Sun, 1 Feb 1998 12:01:39 +0100 (CET) From: remco@blaakmeer.student.utwente.nl (Remco Blaakmeer) To: 6195-maintonly@bugs.debian.org This is an automated message sent to all bugs older than one year. This bug is very old. Please take a look at it and see if you can fix it. If it has already been fixed, please close it. If you have problems fixing it or if you don't have the time to fix it, please ask the people on debian-devel@lists.debian.org for help, so that at least the oldest bugs can be solved before Debian 2.0 is released. Remco Blaakmeer