You are not logged in.

#1 2021-01-16 09:07

globetrotterdk
Member
Registered: 2020-12-23
Posts: 62

Complex partitioning, install, mount partition as user after install.

Disclaimer - I am an average Linux user that has stumbled onto this issue, as I am using newer hardware with SSD and HDD as standard in my computer. This should also be useful for owners of computers with hybrid drives.

Q4OS uses what appears to be a Calamares installer. At this time, the installer does not support custom mount points. Typically, what I do for my hardware is to create /boot/efi, root and home (ext4) partitions on the SSD. A swap partition is created on the HDD, as well as a /data partition (ext4) on at least part of the HDD. As the Q4OS installer doesn't support custom partitions, the /data partition needs to be ignored during the install process. This means that only /boot/efi, /root, /home and swap mount points can be set in a manual setup of the drives for install.

After install, reboot and install completion with the install type you choose (minimal, average or full), another reboot will bring you back to the system, where you can now add the /data partition. Here are the steps that I used:

1) Find the UUID of the partition by using one of these methods:

$ tune2fs -l /dev/sda2
$ sudo tune2fs -l /dev/sda2

$ blkid /dev/sda2

$ sudo lsblk

$ sudo dumpe2fs /dev/sda2

Replace /dev/sda2 to a path wherever your partition resides.

Add a line at the bottom of your /etc/fstab with the following:

/dev/disk/by-uuid/xxxxxxxx /home/user/data auto uid=1000,umask=022,nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Data 0 0

Remember to include the actual UUID of your partition, as well as your "user" in /home/user/data. As an average user, I used Gnome Disks to help me work out the line, using "edit mount options" Both the path /home/user/data and "uid=1000,umask=022" are very important to include. It is of course possible to change the path of your mount point, but it must be within your /home/user for the directory to be able to be set to user read / write.

Next:

$ sudo mkdir -p /home/user/data/

Change the path to reflect the name of the user, the name of the directory that you want, and where you want it to appear in /home/user.

Lastly:

This is the way the folder permissions should look before "chowning" them

$ ls -ld data
drwxr-xr-x 2 root root 4096 jan 15 18:21 data

Changing permissions from root to user (again, change user to your user name):

$ sudo chown user:user data

This should be the result of the chown:

$ ls -ld data
drwxr-xr-x 2 user user 4096 jan 15 18:21 data

It should be noted that I didn't use the recursive "chown -R" as the only item that should be in the newly created directory, is a "lost & found" directory used by the system. If you run into trouble, hopefully someone else can help you, as I just learned how to do this myself... However, it did work for me and should work for you.

Hopefully, this will encourage some people to install and use Q4OS, that initially gave up on trying to install Q4OS, when they started using newer hardware.

Last edited by globetrotterdk (2021-01-16 09:13)


I’ve had a perfectly wonderful evening, but this wasn’t it. - Groucho Marx

Offline

#2 2021-01-16 18:40

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,540
Website

Re: Complex partitioning, install, mount partition as user after install.

Thank you for posting the detailed and helpful directions.

Offline

Board footer

Powered by FluxBB