Subject: Re: NetBSD 3.1 on a Powerbook 180
To: None <port-mac68k@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-mac68k
Date: 05/27/2007 18:49:37
I wrote:
> and then "exec /sbin/init: error 8" also happens.
> I'll check how files are extracted.
It seems recent kernels no longer support too old filesystems.
---
NetBSD 4.99.20 (VERISA) #32: Sun May 27 18:15:09 JST 2007
tsutsui@mirage:/usr/src/sys/arch/mac68k/compile/VERISA
Apple Macintosh Quadra 630 (68040)
cpu: delay factor 1058
fpu: emulator
total memory = 36864 KB
avail memory = 31412 KB
mrg: 'Quadra630 ROMs' ROM glue, tracing off, debug off, silent traps
mrg: I/O map kludge for ROMs that use hardware addresses directly.
mainbus0 (root)
:
boot device: sd0
root device (default sd0a): sn0
dump device:
file system (default generic):
root on sn0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 192.168.20.1
nfs_boot: my_domain=
nfs_boot: my_addr=192.168.20.35
nfs_boot: my_mask=255.255.255.0
nfs_boot: gateway=192.168.20.1
root on mirage:/r/export/NetBSD/mac68k/root
root file system type: nfs
init path (default /sbin/init):
init: trying /sbin/init
Enter pathname of shell or RETURN for /bin/sh:
Terminal type? [unknown] kterm
Terminal type is kterm.
We recommend creating a non-root account and using su(1) for root access.
# mount /dev/sd0a /mnt
# /mnt/bin/ls /mnt/bin/ls
-sh: Cannot execute ELF binary /mnt/bin/ls
# cp /mnt/bin/ls /tmp
# /tmp/ls /mnt/bin/ls
/mnt/bin/ls
# tar cf - mnt/bin/ls > /dev/null
tar: Read fault on mnt/bin/ls (File too large)
# hexdump -Cv /mnt/bin/ls
00000000 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 00 02 00 04 00 00 00 01 00 00 2f 68 00 00 00 34 |........../h...4|
00000020 00 00 4d 48 00 00 00 00 00 34 00 20 00 06 00 28 |..MH.....4. ...(|
:
00001fe0 48 78 00 15 2f 0a 61 ff ff ff ec 60 2f 0a 61 ff |Hx../.a....`/.a.|
00001ff0 ff ff ef 00 2d 40 ff ec 4f ef 00 18 60 00 ff 16 |....-@..O...`...|
hexdump: /mnt/bin/ls: File too large
00002000
#
---
It looks read(2) system call more than blocksize against
files on fs created by the Mkfs tool returns EFBIG.
I have not tracked it yet, but
sys/ufs/ffs_vfsnops:ffs_oldfscompat_read() has
the following a comment:
>> /*
>> * Sanity checks for loading old filesystem superblocks.
>> * See ffs_oldfscompat_write below for unwound actions.
>> *
>> * XXX - Parts get retired eventually.
>> * Unfortunately new bits get added.
>> */
So I guess it's better to update the Mkfs tool for MacOS
rather than adding complicated hacks to our ffs code.
(or is there any ffs guru around there?)
---
Izumi Tsutsui