Giter VIP home page Giter VIP logo

rpooler's Introduction

Rpooler

A ZFS rpool wrapper for the Ubuntu 18.04 Ubiquity Installer

This is a wrapper that automates the creation of a fully bootable zfs root pool with Ubuntu 18.04 installed. It was crafted off the step-by-step HOWTO install Ubuntu 18.04 to a Whole Disk Native ZFS Root Filesystem using Ubiquity GUI installer. The goals are to further simplfy the installation process and encourage best practices through the guided process.

Instructions:

  1. Boot Ubuntu 18.04 Desktop Live CD
  2. Select "Try Ubuntu"
  3. Open terminal (Ctrl+Alt+t)
  4. wget https://raw.github.com/ghfields/rpooler/master/rpooler.sh
  5. sudo bash rpooler.sh

What to expect when running script

Installer script for ZFS whole disk installation using Ubuntu GUI (Ubiquity)
----------------------------------------------------------------------------
 What do you want to name your pool?  
rpool

These are the drives on your system:
 	 /dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376
 	 /dev/disk/by-id/ata-VBOX_HARDDISK_VB9c4c6292-31c83b83
 What vdev layout do you want to use? (hint: tab completion works):  
/dev/disk/by-id/ata-VBOX_HARDDISK_VB9c4c6292-31c83b83

 Which zpool & zfs options do you wish to set at creation?  
-o feature@multi_vdev_crash_dump=disabled -o feature@large_dnode=disabled -o feature@sha512=disabled -o feature@skein=disabled -o feature@edonr=disabled -o ashift=12 -O atime=off -O compression=lz4 -O normalization=formD -O recordsize=1M -O xattr=sa

Zpool would create 'rpool' with the following layout:

	rpool
	  ata-VBOX_HARDDISK_VB9c4c6292-31c83b83

 Does this look correct (y/n): 
y

The Ubiquity made swapfile will not function and will be removed.
Based on your system's 3.85 GB of RAM, Ubuntu suggests a swap of 2 GB.
 What size, in GB, should the created swap zvol be? (0 for none):  
2
Zvol swap size: 2 GB
 Is this correct (y/n): 
y

Configuring the Ubiquity Installer
----------------------------------
 	 1) Choose any options you wish until you get to the 'Installation Type' screen.
 	 2) Select 'Erase disk and install Ubuntu' and click 'Continue'.
 	 3) Change the 'Select drive:' dropdown to '/dev/zd0 - 10.7 GB Unknown' and click 'Install Now'.
 	 4) A popup summarizes your choices and asks 'Write the changes to disks?'. Click 'Continue'.
 	 5) At this point continue through the installer normally.
 	 6) Finally, a message comes up 'Installation Complete'. Click the 'Continue Testing'.
 	 This install script will continue.

Press any key to launch Ubiquity. These instructions will remain visible in the terminal window.


======
Ubiquity Launches
======

(Rsync output truncated)

Setting up zfs-initramfs (0.7.5-1ubuntu16.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for initramfs-tools (0.130ubuntu3.1) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-29-generic
cp: memory exhausted
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-29-generic
Found initrd image: /boot/initrd.img-4.15.0-29-generic
Found memtest86+ image: /ROOT/ubuntu-1@/boot/memtest86+.elf
Found memtest86+ image: /ROOT/ubuntu-1@/boot/memtest86+.bin
done
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
Installing for i386-pc platform.
Installation finished. No error reported.
 Would you like to create a snapshot before rebooting? :  
y

Script complete.  Please reboot your computer to boot into your installation.
If first boot hangs, reset computer and try boot again.

 Do you want to restart now?  
n

rpooler's People

Contributors

ghfields avatar thomdietrich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rpooler's Issues

Add information for ESXi users when selecting a disk

In ESXi 6.7U2, the Ubuntu live environment does not show any choices in the /dev/disk/by-id section. The solution is to add:
disk.EnableUUID = true to the VMX file and reboot.

After that, the script succeeds and works perfectly. Just an info line in Readme.md or the installer would be a nice touch.

EFI Stub booting

Along with #15, add the additional hooks to kernel and initramfs to populate /boot/efi/EFI/ubuntu automatically. Perhaps rsync could be used to clean up deleted kernels.

This will allow the elimination of grub

Hook instrucions found here:
https://wiki.debian.org/EFIStub

Develop mode that takes existing OS install and converts to rpool

Check OS on a drive and see if it is capable of running as an rpool. Then see if /boot, /efi, /home, etc can all be located, then create pool and structure, then rsync and chroot.

Point to physical disk
Is mounted? if not mount RO.
Look for needed directories "/boot", etc.
Look for supported distro
Point to new zpool location
Continue with rsync, and chroot

Create "recipe" mode

Create an option that outputs to file and/or screen of the commands generated by the script responses.

Install openssh-server by default

Not sure about your intended use case but it might be reasonable to automatically or optionally install and activate an SSH server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.