>Number: 150862 >Category: bin >Synopsis: src: usr.sbin/pc-sysinstall - Add support for SoftUpdates >Journaling >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Sep 22 18:20:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Kris Moore >Release: 9.0-Current >Organization: iXsystems >Environment: 9.0-Current >Description: The following patch enables support for the recent SoftUpdates + Journaling which is in HEAD. This patch allows pc-sysinstall users to use this as a valid file-system choice during install time. >How-To-Repeat:
>Fix: Patch attached with submission follows: diff -ruN src.o/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh src/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh --- src.o/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh 2010-09-22 08:50:07.000000000 -0400 +++ src/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh 2010-09-22 08:55:33.000000000 -0400 @@ -217,7 +217,7 @@ # Now check that these values are sane case $FS in - UFS|UFS+S|UFS+J|ZFS|SWAP) ;; + UFS|UFS+S|UFS+J||UFS+SUJ|ZFS|SWAP) ;; *) exit_err "ERROR: Invalid file system specified on $line" ;; esac @@ -261,7 +261,7 @@ check_for_mount "${MNT}" "/boot" if [ "${?}" = "0" ] ; then USINGBOOTPART="0" ; export USINGBOOTPART - if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" ] + if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" -a "${FS}" != "UFS+SUJ" ] then exit_err "/boot partition must be formatted with UFS" fi @@ -401,7 +401,7 @@ # Now check that these values are sane case $FS in - UFS|UFS+S|UFS+J|ZFS|SWAP) ;; + UFS|UFS+S|UFS+J|UFS+SUJ|ZFS|SWAP) ;; *) exit_err "ERROR: Invalid file system specified on $line" ;; esac @@ -438,7 +438,7 @@ if [ "${?}" = "0" ] ; then if [ "${CURPART}" = "2" ] ; then USINGBOOTPART="0" ; export USINGBOOTPART - if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" ] + if [ "${FS}" != "UFS" -a "${FS}" != "UFS+S" -a "${FS}" != "UFS+J" -a "${FS}" != "UFS+SUJ" ] then exit_err "/boot partition must be formatted with UFS" fi diff -ruN src.o/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh src/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh --- src.o/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh 2010-09-22 08:50:07.000000000 -0400 +++ src/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh 2010-09-22 08:58:06.000000000 -0400 @@ -124,6 +124,7 @@ case ${PARTFS} in UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; + UFS+SUJ) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;; ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;; *) exit_err "ERROR: Got unknown file-system type $PARTFS" ;; @@ -158,6 +159,7 @@ case ${PARTFS} in UFS) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; UFS+S) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; + UFS+SUJ) mount_partition ${PART}${EXT} ${PARTFS} ${PARTMNT} "noatime" ;; UFS+J) mount_partition ${PART}${EXT}.journal ${PARTFS} ${PARTMNT} "async,noatime" ;; ZFS) mount_partition ${PART} ${PARTFS} ${PARTMNT} ;; SWAP) diff -ruN src.o/usr.sbin/pc-sysinstall/backend/functions-newfs.sh src/usr.sbin/pc-sysinstall/backend/functions-newfs.sh --- src.o/usr.sbin/pc-sysinstall/backend/functions-newfs.sh 2010-09-22 08:50:07.000000000 -0400 +++ src/usr.sbin/pc-sysinstall/backend/functions-newfs.sh 2010-09-22 09:00:14.000000000 -0400 @@ -154,6 +154,25 @@ sleep 2 ;; + UFS+SUJ) + echo_log "NEWFS: /dev/${PART} - ${PARTFS}" + sleep 2 + rc_halt "newfs -U /dev/${PART}${EXT}" + sleep 2 + rc_halt "sync" + rc_halt "tunefs -j enable /dev/${PART}${EXT}" + sleep 2 + rc_halt "sync" + rc_halt "glabel label ${PARTLABEL} /dev/${PART}${EXT}" + rc_halt "sync" + # Set flag that we've found a boot partition + if [ "$PARTMNT" = "/boot" -o "${PARTMNT}" = "/" ] ; then + HAVEBOOT="YES" + fi + sleep 2 + ;; + + UFS+J) echo_log "NEWFS: /dev/${PART} - ${PARTFS}" sleep 2 diff -ruN src.o/usr.sbin/pc-sysinstall/backend/functions-unmount.sh src/usr.sbin/pc-sysinstall/backend/functions-unmount.sh --- src.o/usr.sbin/pc-sysinstall/backend/functions-unmount.sh 2010-09-22 08:50:07.000000000 -0400 +++ src/usr.sbin/pc-sysinstall/backend/functions-unmount.sh 2010-09-22 08:58:33.000000000 -0400 @@ -99,6 +99,7 @@ case ${PARTFS} in UFS) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;; UFS+S) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;; + UFS+SUJ) glabel label ${PARTLABEL} /dev/${PART}${EXT} ;; UFS+J) glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal ;; *) ;; esac @@ -113,6 +114,7 @@ case ${PARTFS} in UFS) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;; UFS+S) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;; + UFS+SUJ) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}" ;; UFS+J) ROOTRELABEL="glabel label ${PARTLABEL} /dev/${PART}${EXT}.journal" ;; *) ;; esac diff -ruN src.o/usr.sbin/pc-sysinstall/examples/README src/usr.sbin/pc-sysinstall/examples/README --- src.o/usr.sbin/pc-sysinstall/examples/README 2010-09-22 08:50:07.000000000 -0400 +++ src/usr.sbin/pc-sysinstall/examples/README 2010-09-22 09:09:28.000000000 -0400 @@ -189,13 +189,14 @@ Available FileSystems: UFS - Standard UFS2 FileSystem UFS+S - UFS2 + Softupdates enabled +UFS+SUJ - UFS2 + Soft Updates + Journaling enabled UFS+J - UFS2 + Journaling through gjournal ZFS - Z File System, pools / mounts created automatically SWAP - BSD Swap space partition, mountpoint should be set to "none" Adding the ".eli" extension to any of the above file systems will enable disk encryption via geli -(UFS.eli, UFS+S.eli, UFS+J.eli, ZFS.eli, SWAP.eli) +(UFS.eli, UFS+S.eli, UFS+SUJ.eli, UFS+J.eli, ZFS.eli, SWAP.eli) If you with to use a passphrase with this encrypted partition, on the next line the flag "encpass=" should be entered: >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"