Skip to main content

Move Ubuntu Home Directory to another partition

 Background

I was doing some work that needed a backup on a server. I chose to install an Ubuntu Server to store all the backups.

Initially, I thought it didn't need to be a-lot of space. How wrong I was. As you can imagine, the backup size kept growing and growing and it was not yet a week before I had to add an additional disk to my Ubuntu installation.

I added another disk and then started the other issue of mounting it logically and making sure that it all booted up correctly. Whilst researching on adding this new disk to my Ubuntu installation, I came across this excellent article detailing what I needed.

Below are my summarized steps for my future reference.

Identify the drive

sudo fdisk -l

Select and format the drive

sudo fdisk /dev/sdb

n for new partition. p for primary partition and 1 for the first partition. Choose the default sectors for the first and last sectors

Create a file system on the partition

sudo mkfs -t ext4 /dev/sdb1
Mount the new drive
sudo mount /dev/sdb1 /mnt
cd /mnt
ls -ahl
sudo rm -rf lost+found
Copy your home folder
sudo cp -rp /home/* /mnt
Add new mount location
sudo umount /dev/sdb1
Test your new home directory
df /dev/sdb1
Edit fstab
sudo nano /etc/fstab
Add this line to boot the /home directory 
/dev/sdb1       /home   ext4    defaults        0       0

Comments

Popular posts from this blog

Telecoms: ePSK - Multiple Pre-Shared Keys

Originally posted on the Cambium Community Networks Just in case you missed it cnMaestro Version 2.2.1 (Cloud and On-Premise), brings us a great new feature called ePSK. If you’re not familiar with ePSK it’s maybe because Cambium are too modest to toot their own trumpet so I’m going to do it for them. In short ePSK gives each user a unique PSK (pre-shared key) when using WPA2-Personal, for me to explain why this is such a useful feature let me first explain the problem with using a shared PSK across the whole WLAN. When a wireless client connects to an AP it completes a 4-Way handshake, this generates the encryption keys used to encrypt wireless traffic. For the 4-way handshake to work it is a requirement that both the client and AP know the passphrase, however the passphrase is never transmitted over the air thereby making this exchange reasonably secure. But what happens when a 3rd party already knows the passphrase? It means they just need to capture the 4-way handshake to gener...

💡 The CML VM Fix: Solving My VT-x/EPT Problem

💡 The Complete Fix: CML VT-x/EPT Error Solved 🛠️ I battled the persistent error: "Virtualized Intel VT-x/EPT is not supported on this platform" while installing CML (Cisco Modeling Labs) on VMware. This problem occurs because the Windows host locks the CPU's hardware virtualization features (VT-x/EPT) that CML needs to run its internal network nodes. I discovered that fixing this requires aggressively disabling Virtualization-based security (VBS) and HVCI across multiple system layers. Here is the definitive, comprehensive guide covering every step necessary to solve this issue. Step 1: The Quick Fix (Disable Nested VT-x in VMware) I found that telling VMware to hide the feature initially allowed the CML VM to boot, but it failed later when trying to run network nodes. This must be reversed later, but it is an important diagnostic step. Power off the CML VM. Go to Settings → Processors . Ensure the box for Virtualize Intel ...

7 Apps You Should Delete Right Now And Why the Law Makes Them Dangerous

  There is a conversation happening in security research circles, government agencies, and regulatory bodies around the world, and most Papua New Guineans are not part of it. It concerns a small group of applications that sit on hundreds of millions of Android and iOS devices, including many in PNG, quietly running in the background, collecting data, and transmitting that data to servers governed by a legal system that has no obligation to protect you. In PNG, where mobile phones are the primary gateway to banking, communication, and identity, this risk is amplified. For many users, a smartphone is not just a device. It is their wallet, their ID, and their connection to essential services. This is not about a theoretical vulnerability or an obscure technical exploit. It is about the intersection of consumer software and national law, specifically the legal architecture that governs what foreign technology companies must do when their government asks for your data. The Legal Foun...