Port-atari archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
atari sysinst.fs overflow again
http://mail-index.netbsd.org/source-changes/2017/11/15/msg089733.html
> Module Name: src
> Committed By: tsutsui
> Date: Wed Nov 15 16:37:00 UTC 2017
>
> Modified Files:
> src/distrib/atari/floppies/install: list
>
> Log Message:
> Put back /bin/cp and /sbin/sysctl to installation binaries.
>
> - cp(1) is explicitly required by sysinst(8), cp_to_target() in
> src/usr.sbin/sysinst/target.c, to copy bootloader to targetroot
> - sysctl(8) is required by src/distrib/atari/floppies/common/dot.profile
> to detect the root device (fd or md)
>
> This might cause floppy overflow on HEAD again, but works on 8.0_BETA.
>
> Should be pulled up to netbsd-8.
As I was afraid, this change causes -current sysinst.fs overflow again:
https://releng.netbsd.org/builds/HEAD/201711180030Z/atari.build.failed
---
Calculated size of `sysinst.fs.tmp': 1474560 bytes, 320 inodes
Extent size set to 4096
sysinst.fs.tmp: 1.4MB (2880 sectors) block size 4096, fragment size 512
using 1 cylinder groups of 1.41MB, 360 blks, 384 inodes.
super-block backups (for fsck -b #) at:
32,nbmakefs: Writing inode 306 (work/./usr/mdec/milan/bootxx), bytes 4096 + 2560: No space left on device
Populating `sysinst.fs.tmp'
---
Removing /bin/df (MAKEDEV(8) has no longer required it) is not enough,
so I'm trying to remove sysctl(8) next since it's used only to get
root device, as noted in the commit log.
With @s_mitu's help, I've managed to get root device from dmesg output
with sed(1):
---
Index: floppies/common/dot.profile
===================================================================
RCS file: /cvsroot/src/distrib/atari/floppies/common/dot.profile,v
retrieving revision 1.6
diff -u -p -d -r1.6 dot.profile
--- floppies/common/dot.profile 15 Nov 2017 16:19:19 -0000 1.6
+++ floppies/common/dot.profile 18 Nov 2017 16:38:39 -0000
@@ -49,8 +49,8 @@ umask 022
mount_gemdos() mount_msdos -G "$@"
makerootwritable() {
- # note, only handles up to partition 'j'
- rootdev=/dev/$(sysctl -n kern.root_device)$(sysctl -n kern.root_partition | sed y/0123456789/abcdefghij/)
+ # check most recent 'root on [dev] dumps on [dev]' line in dmesg
+ rootdev=/dev/$(dmesg | sed -n '/^root on/h;${;g;s/^root on //g;s/ dumps.*//g;p;}')
if ! mount -u $rootdev / ; then
echo "Unable to mount $rootdev read-write"
exit 1
Index: floppies/install/list
===================================================================
RCS file: /cvsroot/src/distrib/atari/floppies/install/list,v
retrieving revision 1.21
diff -u -p -d -r1.21 list
--- floppies/install/list 15 Nov 2017 16:37:00 -0000 1.21
+++ floppies/install/list 18 Nov 2017 16:38:39 -0000
@@ -31,7 +31,7 @@ PROG sbin/newfs sbin/mount_mfs
PROG sbin/ping
PROG sbin/reboot sbin/halt
PROG sbin/route
-PROG sbin/sysctl
+#PROG sbin/sysctl
PROG sbin/umount
PROG usr/bin/ftp
---
I would like to have review comments from script guru before commit.
Thanks,
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index