Need help how to mount partition on startup

Hi all,

I am not used to do that, so I am not totally sure how to do it. I have an ssd that has 2 partitions, one that has CachyOS on it and the other one that I just reclaimed from my windows installation. I formated it to btrfs.

I want the partition that I reclaimed to be an extension of my /home folder in a way and I want it to automatically be mounted on boot of CachyOS.

So I khow that I have to essentially do this:

1. Run blkid
2. Copy the UUID of the partition I want to mount.
3. sudo nano /etc/fstab
4. Go to the bottom of the file and paste the UUID
5. Hit tab and paste the location I want it to mount at. 

So my question is about the fifth part. I have to create the mount point before doing this. So, where do I create it? In the root/mnt folder of my CachyOS partition or on the second partition? How do I name it?

Thanks in advance for the help.

what you want ? to enlarge the home directory ?

Yes, but it is on another partition. My /home folder is on the partition 1, the same as root. It is not on a partition of its own.

You don’t need to mount that. You can delete it and expand your btrfs partition instead and, since root and /home are on the same partition anyways, you’ll just have more space available. If you had a partition for /home, you’d expand that partition.

I knew I could do that with gparted, but wasn’t sure 100%. Can I do that without reinstalling CachyOS? DO I have to do that with Gparted Live ISO?

Pretty sure you have to do it on an unmounted partition, so yeah… a Live USB or the CachyOS Installer USB should work.

you don’t need gparted
simply add the partition in btrfs

I should add that I’m unfamiliar with btrfs’s features. I assume you know more than me in this field, hotte, so I will defer to you.

Thanks @hotte for the advice, but how do I do that? :upside_down_face:

Ok, I found how to do it, but I am not sure of the right arguments for the command.

My partitions setup is this:

/dev/nvme1n1p4: PARTLABEL="root"

/dev/nvme1n1p2: PARTLABEL="linux_disk_2"

So, the command should be this?

sudo btrfs device add /dev/nvme1n1p2 /dev/nvme1n1p4

Am I right?

sorry not really

you want to put the partition nvme1n1p2 to the btrfs filesystem and enlarge the home directory.

so the command should be

# btrfs device add /dev/nvme1n1p2 /home

edit: using this method you keep two partitions

always there are many ways leading to Rome :grinning:

if you want to have one partition only, you may run gparted to enlarge the systempartition and resize the btrfs filesystem then.

Awesome! It worked and gave the result I needed. Thanks @hotte. :grinning:

I prefer to boot in USB, and do it graphically with KDE Partition Manager.or gparted.

This is cumbersome and not in keeping with the spirit of Linux.
textually not graphically = KISS :wink: :sunglasses:

I’m a programmer and I can use also command line.
It’s good for scripting.