Skip to content

Installing Ubuntu#

Overview#

Most of the time you'll customize a non-freshly installed OS. Chances are, you don't want to reinstall Ubuntu just because you've changed an environment variable or added a new Git alias to your configuration... In this case you can skip this part and see Customization.

However, there are some tasks (like partitioning disks) that are best to do before a full reinstall. Also sometimes you might like to start fresh or you've got a new device and want to install and setup Ubuntu. If that's true, you may find this section helpful as Zephyr ✳️ can assist with that too!

This process consists of 3️⃣ distinctive phases: Pre-installation, Installation and Post-installation. It's mostly the standard (stock) Ubuntu installation (install phase) with some steps before/after that (pre-install, post-install).

In pre/post-installation Disk maps play a crucial role. They are just normal configuration files in your profiles and as the name suggest in these files you can describe your disks, partitions and file-systems and let Zephyr know about them.

Danger

First and foremost, back up all your data!

This is a destructive process it will delete all files!

Pre-installation#

After you've backed up all your important files (Are you sure❓ Take a moment to reconsider, don't be sorry later!) you can boot from the remixed USB-stick (that have zephyr.iso burned).

If you don't want to partition any disk or let the Ubuntu installer to format partitions you can skip phase.

At the end of this phase the actual install is not yet started, however the disks and partitions are partitioned & formatted, so all files will be deleted.

Pre-installation steps

  1. 🔴 Boot from live USB (Zephyr)
  2. 🖱️ Try Ubuntu
  3. Open Terminal
  4. (Optional) This is a good time to securely wipe disks or perform memory cell clearing (only for SSD). This is a manual process.
  5. (Optional) Manage disk structure. Partition disks, setup LVM, encrypt with LUKS. If you don't want to change the disk layout, skip this step.

    # Necessary commands and their order depends on the desired disk architecture
    zephyrctl disk zap PROFILE DISK_MAP...
    zephyrctl disk partition PROFILE DISK_MAP...
    zephyrctl disk encrypt PROFILE DISK_MAP...
    zephyrctl disk lvm PROFILE DISK_MAP...
    
    # Confirm disk structure
    zephyrctl disk info PROFILE DISK_MAP...
    
    where:
    PROFILE            Selected customization profile
    DISK_MAP           Disk-map to use
    
  6. (Optional) Format partitions

    # Maybe need to open LUKS containers first
    zephyrctl disk decrypt PROFILE DISK_MAP...
    
    # Then format filesystems
    zephyrctl disk format PROFILE DISK_MAP...
    
    where:
    PROFILE            Selected customization profile
    DISK_MAP           Disk-map to use
    

You now have clean & empty disks, ready for a fresh install. 🏳️

Installation#

This is the standard Ubuntu install process.

Installation steps

  1. Start installation

    zephyrctl launch
    
  2. Complete forms, settings in GUI

  3. After installation ready, 🖱️ Continue Testing
  4. DO NOT REBOOT! ⚠️

Stock Ubuntu is installed. In the next step we setup Zephyr and prepare for first boot! Yay!

Post-installation#

Ubuntu is already installed, but we need to perform the post-installation steps too. Then we will reboot the system and see the first boot (hopefully without any problems! 🤞)

Post-installation steps

  1. Mount root filesystem to /target if unmounted

    # Check still mounted
    findmnt /target
    
    # No lines returned --> not mounted --> mount
    sudo mount ROOT_FS_DEVICE /target
    
  2. Run post-install

    zephyrctl post-install install PROFILE DISK_MAP...
    
    where:
    PROFILE            Selected customization profile
    DISK_MAP           Disk-map to use
    
  3. 🔴 Reboot system

You're done! You've successfully booted into your brand new system!

Now, just one step (actually the most important 😄) remains: customizing Ubuntu.