1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Make ffs2 the default for newfs; change all calls to create e.g. floppy

filesystems or ramdisks to use explicit -O 1; installer already does that.
ok sthen@
This commit is contained in:
otto 2020-05-18 06:20:43 +00:00
parent 66266c8f2a
commit 6bc807e4d8
19 changed files with 41 additions and 42 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.16 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.17 2020/05/18 06:20:43 otto Exp $
FS= miniroot${OSrev}.img
FSSIZE= 5760
@ -22,7 +22,7 @@ ${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.35 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.36 2020/05/18 06:20:43 otto Exp $
FS= install${OSrev}.img
FSSIZE= 929792
@ -40,7 +40,7 @@ ${FS}: ${BASE} ${XBASE} bsd.gz
.else
disklabel -w `cat vnd` ${FSTYPE}
.endif
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot
strip ${MOUNT_POINT}/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.9 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.10 2020/05/18 06:20:43 otto Exp $
FS= floppy${OSrev}.img
FSSIZE= 2880
@ -18,7 +18,7 @@ ${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${DESTDIR}/usr/mdec/fdboot ${.OBJDIR}/boot
strip ${.OBJDIR}/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.21 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.22 2020/05/18 06:20:43 otto Exp $
FS= miniroot${OSrev}.img
FSSIZE= 9600
@ -25,7 +25,7 @@ ${FS}: bsd.gz
mkdir -p ${MOUNT_POINT}/efi/boot
cp ${EFIBOOT} ${MOUNT_POINT}/efi/boot
umount ${MOUNT_POINT}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot
strip ${.OBJDIR}/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.19 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.20 2020/05/18 06:20:43 otto Exp $
FS= miniroot${OSrev}.img
FSSIZE= 67584
@ -64,7 +64,7 @@ ${FS}: bsd.rd
dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \
of=/dev/r`cat vnd`c bs=1024 seek=8 conv=sync
umount ${MOUNT_POINT}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd
ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.26 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile.inc,v 1.27 2020/05/18 06:20:43 otto Exp $
FS= miniroot-${BOARD}-${OSrev}.img
FSSIZE= 67584 # ffs+msdos, actually
@ -22,7 +22,7 @@ ${FS}: bsd.rd
echo 'u\ne 0\nC\nn\n${MSDOSSTART}\n${MSDOSSIZE}\ne 3\nA6\nn\n${FFSSTART}\n*\nf 0\nw\nq\n' \
| fdisk -e `cat vnd` >/dev/null
echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null
newfs -t msdos -L boot /dev/r`cat vnd`i
newfs -O 1 -t msdos -L boot /dev/r`cat vnd`i
mount -o-l /dev/`cat vnd`i ${MOUNT_POINT}
.for DTB in ${DTBS}
@ -49,7 +49,7 @@ ${FS}: bsd.rd
cp /usr/mdec/BOOTARM.EFI ${MOUNT_POINT}/efi/boot/bootarm.efi
umount ${MOUNT_POINT}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd
ln ${MOUNT_POINT}/bsd ${MOUNT_POINT}/bsd.rd

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.27 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.28 2020/05/18 06:20:43 otto Exp $
FS= install${OSrev}.img
FSSIZE= 921600
@ -25,7 +25,7 @@ ${FS}: ${BASE} ${XBASE} bsd.gz
vnconfig -v ${FS} > vnd
fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot
strip -R .comment -R .SUNW_ctf ${MOUNT_POINT}/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.8 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.9 2020/05/18 06:20:43 otto Exp $
FS= floppy${OSrev}.img
FSSIZE= 2880
@ -19,7 +19,7 @@ ${FS}: bsd.gz
fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
.endif
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${DESTDIR}/usr/mdec/fdboot ${.OBJDIR}/boot
strip ${.OBJDIR}/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.16 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.17 2020/05/18 06:20:43 otto Exp $
FS= miniroot${OSrev}.img
FSSIZE= 8064
@ -22,7 +22,7 @@ ${FS}: bsd.gz
fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
.endif
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
cp ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot
strip ${.OBJDIR}/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.31 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.32 2020/05/18 06:20:43 otto Exp $
FS= miniroot${OSrev}.img
FSSIZE= 5120
@ -21,7 +21,7 @@ ${FS}: bsd.gz
fdisk -i -y `cat vnd`
fdisk -u -y -f ${DESTDIR}/usr/mdec/mbr `cat vnd`
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
installboot -vr ${MOUNT_POINT} `cat vnd` \
${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.29 2020/05/17 17:04:27 deraadt Exp $
# $OpenBSD: Makefile,v 1.30 2020/05/18 06:20:43 otto Exp $
FS= miniroot${OSrev}.img
FSSIZE= 8192
@ -21,7 +21,7 @@ ${FS}: bsd.rd
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.29 2020/05/17 17:04:28 deraadt Exp $
# $OpenBSD: Makefile,v 1.30 2020/05/18 06:20:43 otto Exp $
FS= miniroot${OSrev}.img
CDROM= cd${OSrev}.iso
@ -20,7 +20,7 @@ ${CDROM}:
dd if=/dev/zero of=${FS} bs=1m count=${CDFSMB}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` minicdroot "OpenBSD/sgi "
newfs -m 0 -o space -i 524288 /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
mkdir -p ${MOUNT_POINT}/${OSrev}/sgi
.for IP in ${ALLIP}

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.37 2019/05/05 15:59:19 deraadt Exp $
# $OpenBSD: Makefile,v 1.38 2020/05/18 06:20:43 otto Exp $
CDROM= install${OSrev}.iso
RELXDIR?= /home/relx-${MACHINE}
@ -69,7 +69,7 @@ ${CDROM}:
vnconfig -v -t cdroot ${CDROM} > vnd
disklabel -w `cat vnd` cdroot "OpenBSD/sgi "
newfs -m 0 -o space -i 524288 /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${.OBJDIR}/cd-dir
mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.22 2020/05/17 17:04:28 deraadt Exp $
# $OpenBSD: Makefile,v 1.23 2020/05/18 06:20:44 otto Exp $
FS= miniroot${OSrev}.img
FSSIZE= 6400
@ -22,7 +22,7 @@ ${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}/ofwboot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.50 2020/05/17 17:04:28 deraadt Exp $
# $OpenBSD: Makefile,v 1.51 2020/05/18 06:20:44 otto Exp $
FS= floppy${OSrev}.img
FSSIZE= 2880
@ -19,7 +19,7 @@ ${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}/ofwboot

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.45 2020/05/17 17:04:28 deraadt Exp $
# $OpenBSD: Makefile,v 1.46 2020/05/18 06:20:44 otto Exp $
FS= floppyB${OSrev}.img
FSSIZE= 2880
@ -19,7 +19,7 @@ ${FS}: bsd.gz
dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE}
vnconfig -v ${FS} > vnd
disklabel -w `cat vnd` ${FSDISKTYPE}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
install -c -m 555 -o root -g wheel \
${DESTDIR}/usr/mdec/ofwboot ${MOUNT_POINT}/ofwboot

View File

@ -1,5 +1,5 @@
#!/bin/ksh
# $OpenBSD: checknewfs,v 1.7 2019/02/13 11:50:43 bluhm Exp $
# $OpenBSD: checknewfs,v 1.8 2020/05/18 06:20:44 otto Exp $
# Written by Otto Moerbeek, 2007, Public domain
@ -20,7 +20,7 @@ dotest() {
dd if=/dev/random of=$image bs=512 count=$1 2>/dev/null &&
vnconfig vnd0 $image &&
disklabel -w vnd0 $2 &&
newfs $3 /dev/rvnd0a
newfs -O 1 $3 /dev/rvnd0a
if [ $? != 0 ]; then
ret=$(($ret + 1))
echo TEST $1 $2 \"$3\" failed

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: newfs.8,v 1.76 2020/01/16 16:46:46 schwarze Exp $
.\" $OpenBSD: newfs.8,v 1.77 2020/05/18 06:20:44 otto Exp $
.\" $NetBSD: newfs.8,v 1.12 1995/03/18 14:58:41 cgd Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993, 1994
@ -30,7 +30,7 @@
.\"
.\" @(#)newfs.8 8.3 (Berkeley) 3/27/94
.\"
.Dd $Mdocdate: January 16 2020 $
.Dd $Mdocdate: May 18 2020 $
.Dt NEWFS 8
.Os
.Sh NAME
@ -190,10 +190,9 @@ format file system.
This option is primarily used to build root file systems that can
be understood by older boot ROMs.
.It 1
Fast File System (FFS), the default for file systems smaller than 1 TB.
Fast File System (FFS).
.It 2
Enhanced Fast File System (FFS2), the default for file systems larger than
1 TB.
Enhanced Fast File System (FFS2), the default.
.El
.It Fl o Ar optimization
.Ar space

View File

@ -1,4 +1,4 @@
/* $OpenBSD: newfs.c,v 1.112 2019/06/28 13:32:45 deraadt Exp $ */
/* $OpenBSD: newfs.c,v 1.113 2020/05/18 06:20:44 otto Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@ -121,7 +121,7 @@ u_short dkcksum(struct disklabel *);
int mfs; /* run as the memory based filesystem */
int Nflag; /* run without writing file system */
int Oflag = 1; /* 0 = 4.3BSD ffs, 1 = 4.4BSD ffs, 2 = ffs2 */
int Oflag = 2; /* 0 = 4.3BSD ffs, 1 = 4.4BSD ffs, 2 = ffs2 */
daddr_t fssize; /* file system size in 512-byte blocks */
long long sectorsize; /* bytes/sector */
int fsize = 0; /* fragment size */