Skip to content

A set of scripts intended for a guaranteed installation of the FreeBSD OS.

License

Notifications You must be signed in to change notification settings

click0/FreeBSD-install-scripts

Repository files navigation

A set of scripts for installing FreeBSD

Here is a set of scripts intended for a guaranteed installation of the FreeBSD OS.

Set composition


  • gozfs_512b.sh - script to install FreeBSD on disks with block size 512 bytes.
  • gozfs.sh - script to install FreeBSD on disks with block size 4k or 8k bytes.
  • install_mfsbsd_img_to_sda.sh - script to write MfsBSD .img to a running Linux system on the first HDD (with non-guaranteed results)
  • install_mfsbsd_iso.sh - script to write MfsBSD ISO on a running Linux system
  • mfsbsd_repack.sh - script for repacking the MfsBSD image with the addition of network settings.
  • archive/ - directory with old source scripts.
  • untested/ - directory with untested scripts.

Description

For installation, a standard MfsBSD image is used, where there is a tmux application and root/mfsroot accesses.
We do not need the FreeBSD archives in the image, we will download them separately from our own or public http server.
Access to the new system, if no new password was specified in the arguments, after setting the scripts gozfs.sh/gozfs_512b.sh - rootmfsroot123.
MfsBSD does NOT support IPv6.

Usage strategies


If DHCP works
  1. there is rescue FreeBSD with ZFS ==> install via gozfs.sh
  2. there is rescue FreeBSD without ZFS ==> write MfsBSD.img directly to /dev/ada0
  3. it is possible to load ISO ==> load MfsBSD and install inside it via gozfs.sh
  4. there is Linux installed ==> then via GRUB, ISO MfsBSD, kFreeBSD
  5. there is rescue Linux ==> then in vKVM (statically linked qemu) we load ISO MfsBSD, we forward /dev/sda, through ssh or VNC the client install with ISO system, then we correct a network and we try to reboot a host machine.
If DHCP is NOT working
  1. there is Linux installed ==> then via GRUB, ISO MfsBSD, kFreeBSD
  2. there is rescue FreeBSD with ZFS ==> repack MfsBSD.img and then write this image to /dev/ada0
  3. it is possible to load ISO ==> modify MfsBSD ISO, boot from our image and install the system from it via gozfs.sh

Script syntax

  • gozfs.sh/gozfs_512b.sh

      sh gozfs.sh -p vtbd0 -s4G -n zroot
    

    or

      sh gozfs.sh -p ada0 -p ada1 -s4G -n tank -m mirror -P "my_new_pass"   
    

    Full syntax:

    # sh gozfs.sh -p <geom_provider> -s <swap_partition_size> -S <zfs_partition_size> -n <zpoolname> -f <ftphost>
    [ -m <zpool-raidmode> -d <distribution_dir> -D <destination_dir> -M <size_memory_disk> -o <offset_end_disk> -a <ashift_disk> -P <new_password> -t <timezone> -k <url_ssh_key_file> -K <url_ssh_key_dir>
    -z <file_zfs_skeleton> -Z <url_file_zfs_skeleton> ]
    [ -g <gateway> [-i <iface>] -I <IP_address/mask> ]
    
  • install_mfsbsd_iso.sh

      sh install_mfsbsd_iso.sh 
    

    or

      sh install_mfsbsd_iso.sh -m https://mfsbsd.vx.sk/files/iso/12/amd64/mfsbsd-12.2-RELEASE-amd64.iso -a 00eba73ac3a2940b533f2348da88d524 -p 'my_new_pass'
    

    Full syntax:

    # sh install_mfsbsd_iso.sh [-hv] [-m url_iso -a md5_iso] [-H your_hostname] [-i network_iface] [-p 'myPassW0rD'] [-s need_free_space]
    
  • other scripts without arguments

Untested
https://sysadmin.pm/takeover-sh/
Convert_UFS_to_ZFS.sh
Source resources:
Deprecated:
  • gozfs_512b.sh
  • mfsbsd_repack.sh

Author:

  • Vladislav V. Prodan <github.com/click0>

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐ if this project helped you!

Buy Me A Coffee

About

A set of scripts intended for a guaranteed installation of the FreeBSD OS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages