0

I have a question:

when I type the command sudo lsblk -o, I get the following:

NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL", my outcome looks like this:

NAME   FSTYPE   SIZE MOUNTPOINT LABEL
sda           119.2G            
├─sda1 vfat     512M /boot/efi  
├─sda2 ext4   110.8G /          
└─sda3 swap       8G [SWAP]     
sdb           931.5G       

125G SSD is my sda and 1TB HDD is my sdb.

I was having a problem installing Ubuntu, and I ended up installing the os on both drives. Then I formatted HDD using sudo dd if=/dev/zero of=/dev/sdb because I want to boot from SSD. So now all my data and partitions are erased in hdd.

I want to use 1TB HDD as my primary storage disk and I think that requires me to move /home to HDD. Any quick advice on how to do that? And how do you think I should partition my HDD?

2

1 Answer 1

0

First you have to create a new partition on sdb with fdisk. You have to format this partition with ext4 (or any other filesystem type you want).

To move all the data I recommend you to boot from a LiveCD/LiveUSB. Mount sda2 in /mnt/sda2 and sdb1 in /mnt/sdb1. Then copy all the data from /mnt/sda2/home to /mnt/sda2. Finally you have to edit the /mnt/sda2/etc/fstab to automatically mount the /home filesystem:

UUID=37xxxxxxx /home           ext4    defaults        0       2

you can get the UUID with blkid

$ sudo blkid /dev/sdb1
/dev/sdb1: UUID="379xxxxxx" TYPE="ext4" PARTUUID="0006a6c7-06" 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .