After several attempts—and a fair share of trial and error—installing Ubuntu 18.04 on Docker and other platforms, I eventually gave up and opted to install the older OS directly on my System76 Galago Pro laptop. However, because AOSP recommends using legacy Ubuntu 18.04, I couldn’t completely abandon the idea of setting it up on my desktop machine instead.
This time, I decided to install the OS on an HDD and even created a swappable storage area. Here’s how I approached it.
sda 8:0 0 3.6T 0 disk
├─sda1 8:1 0 2T 0 part /mnt/seagate/part1_2T
├─sda2 8:2 0 1T 0 part /mnt/seagate/part2_1T
└─sda3 8:3 0 654G 0 part /mnt/seagate/part3_600G
It does not zero out all data, but it effectively makes the disk look empty to the OS.
🧨 WARNING:
Once executed, your OS will no longer recognize any partitions or data on /dev/sda. This is irreversible unless you use advanced data recovery tools — and even then, it’s not guaranteed.
✅ Safe Use Case:
Use wipefs -a when:
You want to start fresh on a disk.
You’re going to create new partitions and install a new OS (like Ubuntu 18.04 in your case).
🛡️ If you want to preview what it will erase:
sudo wipefs /dev/sda
This shows existing signatures without deleting them.
# Replace with actual partition numbers (check with lsblk if unsure)
sudo mkfs.ext4 /dev/sda1 # root
sudo mkswap /dev/sda2 # swap
sudo mkfs.ext4 /dev/sda3 # /aosp or data
Mount and test them
# Make mount points
sudo mkdir /mnt/root_disk
sudo mkdir /mnt/aosp_data
# Mount the partitions
sudo mount /dev/sda1 /mnt/root_disk
sudo mount /dev/sda3 /mnt/aosp_data
# Activate swap
sudo swapon /dev/sda2
Check with
df -h
free -h
Launch Ubuntu 18.04 Installer
ubiquity
If you’re in the Live USB GUI, just click “Install Ubuntu” from the desktop instead.
In Installer → Choose “Something Else”
Device
Mount Point
Use as
Format
/dev/sda1
/
ext4
✔️ Yes
/dev/sda2
swap
swap
✔️ Yes
/dev/sda3
/home
ext4
✔️ Yes
Set the bootloader installation to: /dev/sda
This is where you must choose “Something else”.
You’ll see the list of sdb drives.
Choose “Ext4 journaling file system” to format the disks.
The mount point must be root.
Press “Continue”.
When booting Ubuntu 18.04, set the Hard Disk as the primary booting disk in BIOS.
Reboot
Once installed, reboot and remove the USB.
Your system should now boot into Ubuntu 18.04 from your freshly wiped 3.6TB disk 🎉