ZFS boot on root setup for a USB SSD

ZFS boot on root  setup for  a USB SSD

http://ghostbsdarm64.hopto.org/packages/  Where to find files ? Here use this link.
 
http://ghostbsdarm64.hopto.org/packages/gh14_Dec30_arm64_create_disk.tar.gz
Download this file to a working directory on your GhostBSD live media or a working FreeBSD machine. xz --decompress --keep gh14_Dec30_arm64_create_disk.tar.gz
  1. Use the file dd_ghost14.sh  shell script to 'dd' write the image file:
    http://ghostbsdarm64.hopto.org/packages/Ghost14_5g_selfbuilt_raspi4b_Jan22_0.img.xz  
    Ghost14_5g_selfbuilt_raspi4b_Jan22_0.img file into a USB flash drive /dev/da1
Shell scripts to create the USB SSD, and the captured output listings
It is hard to remember the details of creating a partition without a tested script.
Also look at a PuppyLinux_or_PCBSD blog post on reading about ZFS create:
 
 check what partitions presently exist on the daX, drive
gpart status
gpart show -lp da1
 
copying the ESP partition from a USB Flash drive to a USB SSD ESP EFI FAT32 partition.
newfs_msdos -F 32 -c 1 /dev/da1p1
mkdir  /mnt/esp  /mnt/msdos_ESP
mount -t msdosfs /dev/da0p1  /mnt/esp
mount -t /msdosfs /dev/da1p1  /mnt/msdos_ESP
cp -pr /mnt/esp/  /mnt/msdos_ESP/

./GhostBSD_Arm64_ZPOOL_ZFS_create_2A.sh
 

cd  /  ;  ls -lh COPY*  #check that FreeBSD  COPYRIGHT file is there, indicating a FREEBSD base install directory
chmod +x GhostBSD_Arm64_ZPOOL_ZFS_create.sh
./GhostBSD_Arm64_ZPOOL_ZFS_create.sh 
 
Image to 'dd' write into a USB Flash drive to boot GhostBSD14 Arm64 on your Raspberry Pi 4B,3B,400.  Boot up and then try installing XFCE4.18
 
pkg install xorg xfce xfce4-goodies lightdm (or use slim, gui login, if you prefer)
 

 

Problems Encountered with using a USB Flash drive.

  1. Something slow with taking 10 seconds to ':wq' from vi editor with a 400 - 600 character file to finish writing the file and display the prompt.

  2. less than 2 minutes to download 497 packages over a 1Gbit ethernet wire.  19+ hours to install to this USB flash drive. Something slow, yet NO ERRORS are reported.

    Did not have the slow, wait times when installing GhostBSD-Arm64 to a Western Digital Blue SSD 2.5" inch SATA drive;  running, executing, copying happened very fast there, compared with this USB 3.0 128Gbyte Flash Drive Stick.

    How does the ZFS creation file script work?


    1. Look for shell script file name:  GhostBSD_AK_Aunby_Arm64_create_shell_script.sh 
        This will create several new partitions.  December 29, 2023 That script has been replaced with GhostBSD_AK_Aunby_Arm64_ZPOOL_ZFS_create_shell_script.sh
       

      # gh14_arm64_create_disk.sh file
      echo " $DISK1 <--- This is the DISK1 environmental variable to set, \n  example DISK1=/dev/da1 ; export DISK1 "
      sleep 6
      gpart list $DISK1
      gpart status $DISK1
      gpart show -lp $DISK1
      echo "  first create a GPT scheme on $DISK1 hit ctrl-C to exit. "
      sleep 6
      gpart create -s GPT $DISK1   # set scheme to use GPT disk format
      gpart add -t efi                 -a1M -s3G   -l msdos_ESP $DISK1
      gpart add -t freebsd-swap -a1M -s4G -l swapfs $DISK1
      gpart add -t freebsd-zfs    -a1M -s750G -l rootfs $DISK1
      gpart add -t linux-swap     -a1M -s2G   -l linux-swap $DISK1
      gpart add -t linux-data      -a1M -s70G -l linux-data $DISK1
      gpart add -t linux-data      -a1M -s70G -l linux-data2 $DISK1
      gpart add -t linux-data      -a1M            -l linux-data3 $DISK1
      newfs_msdos -F 32 -c 1 $DISK1"p1"


    2. http://ghostbsdarm64.hopto.org/packages/GhostBSD_Arm64_ZPOOL_ZFS_create.sh

      See full file at bottom of this blog post.
      Has been replaced with : GhostBSD_AK_Aunby_Arm64_create_shell_script.sh

    Check if file 'COPYRIGHT' is there in  '/'  root directory

    destroy zpi || true   # Destroy existing disk scheme, leave blank

    zpool create -O compress=lz4 -O atime=off -o altroot=/zpialt -m none zpi /dev/da1p3   or $DISK1"p3"  # zpool create from one vdev /dev/da1p3

    copy  by  tar -cf  - . the input directory and then pipe compressed file stream to output directory represented by the alternate root mount point of  /zpialt

    | cd  /zpialt && tar -xvf -

    tar cf - . | ( cd /zpialt && tar xvf - )

    This above "tar cf - . " command 'compress into file standard input ' piped into "( cd /zpialt && tar xvf - ) " command 'for extract verbose standard input', seemed to work very fast and quick for copying from a USB Flash Drive Stick device to the USB 3.0 SSD device. 
    December 17, 2023


    https://ghostbsd-arm64.blogspot.com/2023/12/otter-browser-very-slow-display-files.html   Look at using DTrace or DWatch for finding out what is making the system so slow, for reading from a USB 3.2 Flash Drive Stick!


Comments

Popular posts from this blog

HDMI Audio sound patches into GhostBSD source code /usr/ghost14/ghostbsd-src SOLVED Jan20 2024

How to install GhostBSD-Arm64 into a USB Flash Drive stick April 24, 2024 update edition.

January 19, 2024 Howto Download a Raspberry Pi 4B bootable image from http://ghostbsdarm64.hopto.org/packages/