[PC-BSD Commits] r2426 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts

svn at pcbsd.org svn at pcbsd.org
Wed Jul 23 13:33:07 PDT 2008


Author: kris
Date: 2008-07-23 13:33:07 -0700 (Wed, 23 Jul 2008)
New Revision: 2426

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.NewFS.sh
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh
Log:

Another slew of fixes which should get us close to a bootable ZFS drive



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh	2008-07-23 20:24:51 UTC (rev 2425)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh	2008-07-23 20:33:07 UTC (rev 2426)
@@ -42,8 +42,8 @@
 
   # Get the raw ZFSROOTPART name, and mount it
   ZFSROOTPART="`echo $ROOTPART | cut -d "/" -f 3`"
-  zfs set mountpoint=/mnt ${ZFSROOTPART}e 
-  zfs mount -o rw ${ZFSROOTPART}e${EXTENSION}
+  zfs create ${ZFSROOTPART}e/root
+  zfs set mountpoint=/mnt ${ZFSROOTPART}e/root
 
   echo "legacy" > /uzip/zfsmnts/${ZFSROOTPART}e
 
@@ -54,9 +54,6 @@
   # Mount partition "a" which is UFS to our mount /bootdir
   mount -o rw${MNTOPTS} ${ROOTPART}a${EXTENSION} ${FSMNT}/bootdir
 
-  # MOVE THIS TO UNMOUNT SCRIPT
-  #zfs set mountpoint=legacy ${ZFSROOTPART}e 
-
   # Create the FSTAB file
   echo "# Device                Mountpoint      FStype  Options         Dump    Pass#
 ${ROOTPART}b${ENC}          	none            swap    sw              0       0
@@ -102,11 +99,11 @@
    then
 
       # Mount our next partition with ZFS
-      zfs set mountpoint=/mnt/${cur_part} ${ZFSROOTPART}${lpart}
-      zfs mount -o rw ${ZFSROOTPART}${lpart}
+      zfs create ${ZFSROOTPART}${lpart}/${cur_part}
+      zfs set mountpoint=/mnt/${cur_part} ${ZFSROOTPART}${lpart}/${cur_part}
 
       # Save the real mount point for this partition for usage after install
-      echo "${cut_part}" > /uzip/zfsmnts/${ZFSROOTPART}${lpart}
+      echo "${cur_part}" > /uzip/zfsmnts/${ZFSROOTPART}${lpart}
 
    fi
   fi

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.NewFS.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.NewFS.sh	2008-07-23 20:24:51 UTC (rev 2425)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.NewFS.sh	2008-07-23 20:33:07 UTC (rev 2426)
@@ -37,11 +37,13 @@
   # Setup UFS on our /bootdir partition for ZFS
   newfs ${1}a >/dev/null 2>/dev/null
 
+
   for DevName in `ls -1 ${1}[e-h]`
   do
     echo "Running Newfs on ${DevName}"
     BASENAME="`echo $DevName | cut -d '/' -f 3`"
     zpool create ${BASENAME} ${DevName}
+    zfs set mountpoint=none ${BASENAME}
   done
 
   echo "${1}e" > /uzip/ZFS-root

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh	2008-07-23 20:24:51 UTC (rev 2425)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh	2008-07-23 20:33:07 UTC (rev 2426)
@@ -151,10 +151,9 @@
   echo "vfs.root.mountfrom=\"zfs:${ZFSROOT}\"" >> ${FSMNT}/boot/loader.conf
 
   # Move the kernel to /bootdir so we can bootup properly
-  mv -f ${FSMNT}/boot/* ${FSMNT}/bootdir/
-  rmdir ${FSMNT}/boot
+  mv -f ${FSMNT}/boot ${FSMNT}/bootdir/
   # Create our link to /boot on the ZFS partition
-  ln -s /bootdir ${FSMNT}/boot
+  ln -s /bootdir/boot ${FSMNT}/boot
 
   # Unmount the /bootdir directory
   umount ${FSMNT}/bootdir



More information about the Commits mailing list