On Tue, Feb 25, 2003 at 09:52:02PM +0200, Ruslan Ermilov wrote: > On Tue, Feb 25, 2003 at 08:02:19PM +0200, John Hay wrote: [...] > > Ok, with the patches below I can get to where it tries to build the > > fixit floppy in release.10. It breaks because the floppy is too small. > > I must still check to make sure it is true. > > > We'll know this in less than 1:30 -- I've just launched the > snapshot build for 4.x/i386 on my fast -stable box. > > While I was writing it, it's already finished (successfully). > > ftp://ftp.sunbay.net/pub/FreeBSD/snapshots/i386/4.x-20030225-STABLE/ > OK, I've tracked it down to the differences in newfs(8) between 4.x and 5.x. In 4.x, newfs'ing a 1.44MB floppy results in a single cylinder group, but in 5.x there's a thing called MINCYLGRPS, which results in fewer free space on a floppy:
: # uname -r : 4.7-STABLE : # ./x : Warning: Block size restricts cylinders per group to 6. : Warning: 1216 sector(s) in last cylinder unallocated : /dev/vn0c: 2880 sectors in 1 cylinders of 1 tracks, 4096 sectors : 1.4MB in 1 cyl groups (6 c/g, 12.00MB/g, 384 i/g) : super-block backups (for fsck -b #) at: : 32 : Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on : /dev/vn0 1363 0 1363 0% 1 381 0% : # uname -r : 5.0-CURRENT : # ./x : /dev/md0c: 1.4MB (2880 sectors) block size 4096, fragment size 512 : using 4 cylinder groups of 0.36MB, 91 blks, 128 inodes. : super-block backups (for fsck -b #) at: : 32, 760, 1488, 2216 : Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on : /dev/md0 1311 0 1311 0% 1 509 0% With this patch to newfs(8), : Index: mkfs.c : =================================================================== : RCS file: /home/ncvs/src/sbin/newfs/mkfs.c,v : retrieving revision 1.74 : diff -u -p -r1.74 mkfs.c : --- mkfs.c 22 Feb 2003 23:26:11 -0000 1.74 : +++ mkfs.c 26 Feb 2003 11:20:57 -0000 : @@ -317,7 +317,7 @@ mkfs(struct partition *pp, char *fsys) : for ( ; sblock.fs_fpg < maxblkspercg; sblock.fs_fpg += sblock.fs_frag) { : sblock.fs_ipg = roundup(howmany(sblock.fs_fpg, fragsperinode), : INOPB(&sblock)); : - if (sblock.fs_size / sblock.fs_fpg < MINCYLGRPS) : + if (sblock.fs_size / sblock.fs_fpg < (Oflag == 2 ? MINCYLGRPS : 1)) : break; : if (CGSIZE(&sblock) < (unsigned long)sblock.fs_bsize) : continue; I still don't get the same picture as on 4.x, but it's now at least sufficient to make release.10 happy. : # ./x : /dev/md0c: 1.4MB (2880 sectors) block size 4096, fragment size 512 : using 1 cylinder groups of 1.41MB, 361 blks, 416 inodes. : super-block backups (for fsck -b #) at: : 32 : Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on : /dev/md0 1359 0 1359 0% 1 413 0% John, I'm sending you the complete patchset in another email. Cheers, -- Ruslan Ermilov Sysadmin and DBA, [EMAIL PROTECTED] Sunbay Software AG, [EMAIL PROTECTED] FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age
FSIMG=fixit.flp FSSIZE=1440 FSLABEL=fd1440 FSINODE=4000 dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null case `uname -r` in 4.*) DEVICE=vn0 vnconfig -s labels -c /dev/${DEVICE} ${FSIMG} ;; 5.*) DEVICE=`mdconfig -a -t vnode -f ${FSIMG}` ;; esac disklabel -w -B ${DEVICE} ${FSLABEL} newfs -i ${FSINODE} -o space -m 0 /dev/${DEVICE}c #disklabel ${DEVICE} df -i /dev/${DEVICE} case `uname -r` in 4.*) vnconfig -u ${DEVICE} ;; 5.*) mdconfig -d -u ${DEVICE} ;; esac
pgp00000.pgp
Description: PGP signature