summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/newfs/newfs.82
-rw-r--r--sbin/newfs/newfs.c2
-rw-r--r--usr.sbin/sade/help/partition.hlp24
-rw-r--r--usr.sbin/sade/install.c2
-rw-r--r--usr.sbin/sade/label.c28
-rw-r--r--usr.sbin/sade/sade.h2
-rw-r--r--usr.sbin/sysinstall/help/partition.hlp24
-rw-r--r--usr.sbin/sysinstall/install.c2
-rw-r--r--usr.sbin/sysinstall/label.c28
-rw-r--r--usr.sbin/sysinstall/sysinstall.h2
10 files changed, 76 insertions, 40 deletions
diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8
index 57dc0b2..25d269d 100644
--- a/sbin/newfs/newfs.8
+++ b/sbin/newfs/newfs.8
@@ -89,7 +89,7 @@ without really creating the file system.
.It Fl O Ar filesystem-type
Use 1 to specify that a UFS1 format file system be built;
use 2 to specify that a UFS2 format file system be built.
-The default is UFS1 format, but will eventually be changed to UFS2.
+The default format is UFS2.
.It Fl T Ar disktype
For backward compatibility.
.It Fl U
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index bf544f5..33493c8 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -116,7 +116,7 @@ static const char rcsid[] =
int Lflag; /* add a volume label */
int Nflag; /* run without writing file system */
-int Oflag = 1; /* file system format (1 => UFS1, 2 => UFS2) */
+int Oflag = 2; /* file system format (1 => UFS1, 2 => UFS2) */
int Rflag; /* regression test */
int Uflag; /* enable soft updates for file system */
quad_t fssize; /* file system size */
diff --git a/usr.sbin/sade/help/partition.hlp b/usr.sbin/sade/help/partition.hlp
index a6de29e..9b5a822 100644
--- a/usr.sbin/sade/help/partition.hlp
+++ b/usr.sbin/sade/help/partition.hlp
@@ -126,16 +126,20 @@ with significant activity can temporarily overflow if the soft updates
policy results in free'd blocks not being "garbage collected" as fast
as they're being requested.
-To make use of UFS2, press '2' on a UFS file system to toggle the
-on-disk format revision. UFS2 provides native support for extended
-attributes, larger disk sizes, and forward compatibility with new
-on-disk high performance directory layout and storage extents.
-However, UFS2 is unsupported on versions of FreeBSD prior to 5.0,
-so it is not recommended for environments requiring backward
-compatibility. Also, UFS2 is not currently recommended as a root
-file system format for non-64-bit platforms due to increased size
-of the boot loader; special local configuration is required to boot
-UFS2 as a root file system on i386 and PC98.
+The UNIX File System (UFS) on FreeBSD supports two different on-disk
+layouts: UFS1 and UFS2. UFS1 was the default file system in use
+through FreeBSD 5.0-RELEASE; as of FreeBSD 5.1-RELEASE, the default
+is now UFS2. UFS2 provides sparse inode allocation (faster
+fsck), 64-bit storage pointers (larger maximum size), and native
+extended attributes (required for ACLs, MAC, and other advanced
+security and file system services). The selection of UFS1 or
+UFS2 must be made when the file system is created--later conversion
+is not currently possible. UFS2 is the recommended file system, but
+if disks are to be used on older FreeBSD systems, UFS1 improves
+portability. When dual-booting between FreeBSD 4.x or earlier and
+FreeBSD 5.x, UFS1 file systems will be accessible from both.
+To toggle a file system to UFS1, press '1'. To restore it to UFS2,
+press '2'.
To add additional flags to the newfs command line for UFS file
systems, press 'N'. These options will be specified before the
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 59dc6ea..366edb2 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -879,7 +879,7 @@ performNewfs(PartInfo *pi, char *dname, int queue)
snprintf(buffer, LINE_MAX, "%s %s %s %s %s",
NEWFS_UFS_CMD,
pi->newfs_data.newfs_ufs.softupdates ? "-U" : "",
- pi->newfs_data.newfs_ufs.ufs2 ? "-O2" : "-O1",
+ pi->newfs_data.newfs_ufs.ufs1 ? "-O1" : "-O2",
pi->newfs_data.newfs_ufs.user_options,
dname);
break;
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index 24d438f..e2ff08c 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -337,7 +337,7 @@ new_part(char *mpoint, Boolean newfs)
pi->newfs_data.newfs_ufs.acls = FALSE;
pi->newfs_data.newfs_ufs.multilabel = FALSE;
pi->newfs_data.newfs_ufs.softupdates = strcmp(mpoint, "/");
- pi->newfs_data.newfs_ufs.ufs2 = FALSE;
+ pi->newfs_data.newfs_ufs.ufs1 = FALSE;
return pi;
}
@@ -461,7 +461,7 @@ getNewfsCmd(PartInfo *p)
case NEWFS_UFS:
snprintf(buffer, NEWFS_CMD_ARGS_MAX, "%s %s %s %s",
NEWFS_UFS_CMD, p->newfs_data.newfs_ufs.softupdates ? "-U" : "",
- p->newfs_data.newfs_ufs.ufs2 ? "-O2" : "-O1",
+ p->newfs_data.newfs_ufs.ufs1 ? "-O1" : "-O2",
p->newfs_data.newfs_ufs.user_options);
break;
case NEWFS_MSDOS:
@@ -686,10 +686,10 @@ print_label_chunks(void)
switch (pi->newfs_type) {
case NEWFS_UFS:
strcpy(newfs, NEWFS_UFS_STRING);
- if (pi->newfs_data.newfs_ufs.ufs2)
- strcat(newfs, "2");
- else
+ if (pi->newfs_data.newfs_ufs.ufs1)
strcat(newfs, "1");
+ else
+ strcat(newfs, "2");
if (pi->newfs_data.newfs_ufs.softupdates)
strcat(newfs, "+S");
else
@@ -872,6 +872,21 @@ diskLabel(Device *dev)
clear_wins();
break;
+ case '1':
+ if (label_chunk_info[here].type == PART_FILESYSTEM) {
+ PartInfo *pi =
+ ((PartInfo *)label_chunk_info[here].c->private_data);
+
+ if ((pi != NULL) &&
+ (pi->newfs_type == NEWFS_UFS)) {
+ pi->newfs_data.newfs_ufs.ufs1 = true;
+ } else
+ msg = MSG_NOT_APPLICABLE;
+ } else
+ msg = MSG_NOT_APPLICABLE;
+ break;
+ break;
+
case '2':
if (label_chunk_info[here].type == PART_FILESYSTEM) {
PartInfo *pi =
@@ -879,8 +894,7 @@ diskLabel(Device *dev)
if ((pi != NULL) &&
(pi->newfs_type == NEWFS_UFS)) {
- pi->newfs_data.newfs_ufs.ufs2 =
- !pi->newfs_data.newfs_ufs.ufs2;
+ pi->newfs_data.newfs_ufs.ufs1 = false;
} else
msg = MSG_NOT_APPLICABLE;
} else
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index d26ef8a..cf53575 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -334,7 +334,7 @@ typedef struct _part_info {
Boolean acls; /* unused */
Boolean multilabel; /* unused */
Boolean softupdates;
- Boolean ufs2;
+ Boolean ufs1;
} newfs_ufs;
struct {
/* unused */
diff --git a/usr.sbin/sysinstall/help/partition.hlp b/usr.sbin/sysinstall/help/partition.hlp
index a6de29e..9b5a822 100644
--- a/usr.sbin/sysinstall/help/partition.hlp
+++ b/usr.sbin/sysinstall/help/partition.hlp
@@ -126,16 +126,20 @@ with significant activity can temporarily overflow if the soft updates
policy results in free'd blocks not being "garbage collected" as fast
as they're being requested.
-To make use of UFS2, press '2' on a UFS file system to toggle the
-on-disk format revision. UFS2 provides native support for extended
-attributes, larger disk sizes, and forward compatibility with new
-on-disk high performance directory layout and storage extents.
-However, UFS2 is unsupported on versions of FreeBSD prior to 5.0,
-so it is not recommended for environments requiring backward
-compatibility. Also, UFS2 is not currently recommended as a root
-file system format for non-64-bit platforms due to increased size
-of the boot loader; special local configuration is required to boot
-UFS2 as a root file system on i386 and PC98.
+The UNIX File System (UFS) on FreeBSD supports two different on-disk
+layouts: UFS1 and UFS2. UFS1 was the default file system in use
+through FreeBSD 5.0-RELEASE; as of FreeBSD 5.1-RELEASE, the default
+is now UFS2. UFS2 provides sparse inode allocation (faster
+fsck), 64-bit storage pointers (larger maximum size), and native
+extended attributes (required for ACLs, MAC, and other advanced
+security and file system services). The selection of UFS1 or
+UFS2 must be made when the file system is created--later conversion
+is not currently possible. UFS2 is the recommended file system, but
+if disks are to be used on older FreeBSD systems, UFS1 improves
+portability. When dual-booting between FreeBSD 4.x or earlier and
+FreeBSD 5.x, UFS1 file systems will be accessible from both.
+To toggle a file system to UFS1, press '1'. To restore it to UFS2,
+press '2'.
To add additional flags to the newfs command line for UFS file
systems, press 'N'. These options will be specified before the
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 59dc6ea..366edb2 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -879,7 +879,7 @@ performNewfs(PartInfo *pi, char *dname, int queue)
snprintf(buffer, LINE_MAX, "%s %s %s %s %s",
NEWFS_UFS_CMD,
pi->newfs_data.newfs_ufs.softupdates ? "-U" : "",
- pi->newfs_data.newfs_ufs.ufs2 ? "-O2" : "-O1",
+ pi->newfs_data.newfs_ufs.ufs1 ? "-O1" : "-O2",
pi->newfs_data.newfs_ufs.user_options,
dname);
break;
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index 24d438f..e2ff08c 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -337,7 +337,7 @@ new_part(char *mpoint, Boolean newfs)
pi->newfs_data.newfs_ufs.acls = FALSE;
pi->newfs_data.newfs_ufs.multilabel = FALSE;
pi->newfs_data.newfs_ufs.softupdates = strcmp(mpoint, "/");
- pi->newfs_data.newfs_ufs.ufs2 = FALSE;
+ pi->newfs_data.newfs_ufs.ufs1 = FALSE;
return pi;
}
@@ -461,7 +461,7 @@ getNewfsCmd(PartInfo *p)
case NEWFS_UFS:
snprintf(buffer, NEWFS_CMD_ARGS_MAX, "%s %s %s %s",
NEWFS_UFS_CMD, p->newfs_data.newfs_ufs.softupdates ? "-U" : "",
- p->newfs_data.newfs_ufs.ufs2 ? "-O2" : "-O1",
+ p->newfs_data.newfs_ufs.ufs1 ? "-O1" : "-O2",
p->newfs_data.newfs_ufs.user_options);
break;
case NEWFS_MSDOS:
@@ -686,10 +686,10 @@ print_label_chunks(void)
switch (pi->newfs_type) {
case NEWFS_UFS:
strcpy(newfs, NEWFS_UFS_STRING);
- if (pi->newfs_data.newfs_ufs.ufs2)
- strcat(newfs, "2");
- else
+ if (pi->newfs_data.newfs_ufs.ufs1)
strcat(newfs, "1");
+ else
+ strcat(newfs, "2");
if (pi->newfs_data.newfs_ufs.softupdates)
strcat(newfs, "+S");
else
@@ -872,6 +872,21 @@ diskLabel(Device *dev)
clear_wins();
break;
+ case '1':
+ if (label_chunk_info[here].type == PART_FILESYSTEM) {
+ PartInfo *pi =
+ ((PartInfo *)label_chunk_info[here].c->private_data);
+
+ if ((pi != NULL) &&
+ (pi->newfs_type == NEWFS_UFS)) {
+ pi->newfs_data.newfs_ufs.ufs1 = true;
+ } else
+ msg = MSG_NOT_APPLICABLE;
+ } else
+ msg = MSG_NOT_APPLICABLE;
+ break;
+ break;
+
case '2':
if (label_chunk_info[here].type == PART_FILESYSTEM) {
PartInfo *pi =
@@ -879,8 +894,7 @@ diskLabel(Device *dev)
if ((pi != NULL) &&
(pi->newfs_type == NEWFS_UFS)) {
- pi->newfs_data.newfs_ufs.ufs2 =
- !pi->newfs_data.newfs_ufs.ufs2;
+ pi->newfs_data.newfs_ufs.ufs1 = false;
} else
msg = MSG_NOT_APPLICABLE;
} else
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index d26ef8a..cf53575 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -334,7 +334,7 @@ typedef struct _part_info {
Boolean acls; /* unused */
Boolean multilabel; /* unused */
Boolean softupdates;
- Boolean ufs2;
+ Boolean ufs1;
} newfs_ufs;
struct {
/* unused */
OpenPOWER on IntegriCloud