fstab vs. Gparted

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
JerryW

fstab vs. Gparted

Post by JerryW »

So, I installed a new solid state drive and have been pondering moving my "home" folder to it. When I do a "lsblk", I get:

Code: Select all

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
sdb      8:16   0 465.8G  0 disk 
├─sdb1   8:17   0   953M  0 part /boot
├─sdb2   8:18   0  24.8G  0 part /
├─sdb3   8:19   0   7.8G  0 part [SWAP]
└─sdb4   8:20   0 432.2G  0 part /home
sr0     11:0    1  1024M  0 rom  
The above partitioning scheme is what I see using GPARTED
sda is apparently my new drive, installed but nothing further done.

When I look at FSTAB (/etc/fstab - - gedit) I get:

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=067258bb-4967-4f00-b6a5-379b038f389f /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=243c5d8c-7fbe-4640-94e0-31654f08d855 /boot           ext4    defaults        0       2
# /home was on /dev/sda4 during installation
UUID=856f7c0f-de45-4597-9595-f8d116084b11 /home           ext4    defaults        0       2
# swap was on /dev/sda3 during installation
UUID=35fda864-d74d-4ddd-8285-995d8b603905 none            swap    sw              0       0
So fstab, to me, looks like it thinks all my stuff is on sda...but it's actually on sdb. What am I missing?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: fstab vs. Gparted

Post by AndyMH »

What am I missing?
"/home was on". The system uses the partition UUIDs and they haven't changed.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
JerryW

Re: fstab vs. Gparted

Post by JerryW »

Ahhh, thanks Andy

I was going to move my home folder to my new solid-state drive using:
https://www.howtogeek.com/442101/how-to ... ard-drive/

the last step was an edit of the fstab - and that's where my knowledge came to a halt. I may wait
till I do a complete clean install - and use that opportunity to move my backed-up home folder to the
new solid state drive.

Thanks again
Jerry
Warrenton, VA
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: fstab vs. Gparted

Post by AndyMH »

That would work, but he makes it hard work by using the terminal nearly all the way. You can setup the new drive - create a partition table, create partitions, with gparted, it's a lot easier.

While the changes to fstab are simple, mess it up and you will end up with a system that won't boot. If you proceed make sure you have a mint install stick/DVD to hand so that you can boot it if necessary to delete the fstab you modified and rename the copy you made back to fstab.

You already have a separate /home partition so all you would need to do in fstab is change the UUID so it points at the new partition on the other drive.
change

Code: Select all

UUID=856f7c0f-de45-4597-9595-f8d116084b11 /home ext4 defaults 0 2
to

Code: Select all

UUID=newUUID /home ext4 defaults 0 2
You get the new UUID by typing blkid in a terminal and copy/pasting.

I see you have a separate /boot partition, have you got an encrypted install?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Storage”