Brand new to Linux need a little help

I have been using Linux for…2-3 days tried a few different distros but never like any until I found EndeavourOs, yes its not for newbies but i like it and i have managed to navigate the AUR and install what I need for the most part. But I have an issue with my SSD :frowning:

  1. I want to use my 2TB SSD as a game drive for wine/Lutris, but Lutris can’t use it as i find out permissions are root only… how do i fix this ?

  2. My 2TB SSD is always unmounted when Endeavour boots up making me enter my password all the time to mount it… is this meant to happen or have I done something wrong ?

  3. The SSD always ends up in run/media/user which seams wrong to me, where does everyone else normally mount there internal drives ?

Sorry if these are dumb questions, windows 10 crapped out on me few days ago and I am fed up with Microsoft and there spying ways and constant bloatware apps I will never touch.

2 Likes

Welcome! :rocket: :partying_face:

  1. Cant make hdd writabe - #2 by keybreak

  2. Yes, if you want it to be mounted you need to make an /etc/fstab entry :slight_smile:

  3. Depends, entirely your choice…Usually that’s where all hard drives go by default though

4 Likes

Welcome @Auron111
You’ve come to the right place! No dumb questions here. :wink:

3 Likes

That is a temporary locations for automounted drives. If it is a permanent drive you should add an entry for it in /etc/fstab.

If you share the output of lsblk -o name,type,fstype,mountpoint,size,uuid we can probably help you do that.

3 Likes

Welcome @Auron111

look like you in good hands .

hope you enjoy your Endeavouros +Linux journey

2 Likes

Well I hope it did this right but here is a screenshot from fstab not sure why but I have noticed that in Dolphin the boot/EFI partition is also visible which wasn’t there when I was testing the Os before deleting windows.

Three things:

  • Please don’t post screenshots to text data
  • You should use the UUID instead of /dev/sda1
  • You probably want to end that line with 0 2, not 0 0
2 Likes

Hello @Auron111, Welcome to the EOS forums.

I would like to help you out here because I went through something similar to what you’re experiencing. I would like to emphasize that I’m no Linux expert, but I’ve been around the block a lot. Also, I don’t believe that there’s any OS that suits anyone exactly. But like in other OS’s in Linux we get to make it suit us, especially distros like EOS or Arch (basically anything driven by Arch is like that).

I’ll answer all 3 of your questions in one.

As @dalto said /run/media/$USER/<removable media label> is a temporary folder created when the external drive gets mounted and will be removed once you unmount or shutdown or restart your computer. So to make things permanent we need to create a permanent mount point and add that mount point to fstab in order for SSD to get mounted on computer startup.

So let’s start at the top.

NOTE: Replace the values within < > with your own.

  1. Run lsblk to get the drive you want to mount.
    Ex: sdb 8:16 0 931.5G 0 disk
    └─sdb1 8:17 0 931.5G 0 part /home ← it’s partition name is sdb1 in device sdb

  2. After getting the device details time to make a mount point. Use mkdir to do this.
    sudo mkdir /run/media/$(whoami)/<folder name>

  3. You have reassigned ownership of the created folder to your user account.
    sudo chown -R <your user group>:<your user name> /run/media/$(whoami)/<folder name>

  4. Now let’s give it read and write access.
    sudo chmod -R 755 /run/media/$(whoami)/<folder name> (you can use 744 instead of 755).

  5. Get the UUID for your SSD. And copy the UUID
    sudo blkid /dev/<your ssd drive label> (use the partition name you got on step 1)

  6. Edit your fstab file.
    sudo nano /etc/fstab

    Add a new line to the end of your fstab file something similar to the below line.
    UUID=<your ssd's UUID> /run/media/<your user name>/<your mount point> ext4 defaults,noatime 0 2

  7. Now test your fstab with the below command for errors before restarting. If you get errors correct them before restarting.
    sudo mount -a

Now you should have an SSD that is permanently mounted every time you boot your EOS. Hope this helps. And this is my very 1st post in this forum as well :slight_smile:.

1 Like

Ok I think I have really messed something up now and I have no idea what :frowning:

Due to a…mistake my Os needed a fresh install, my 2TB SSD mounted on its own and i still have full permissions like before.
The SSD mount point seams to be /run/media/myself/Games…but here is the problem.

However I have two drives I want to connect externally via a dock, but they all want to mount into /run/media by default even after a format but they can’t.
Some reason both the external and internal SSD can’t mount in /media together as they seams to mess up with one being unable to be unmounted until the other is denying any access to the lock up drive.

I tried using KDE partition manager to change my external HDD location (only place it lets me is /home/myself/ex-hdd outside of Home I get told I can’t so :S
Now though if I set it into home I can’t seam to give them permissions at all, I have tried # sudo chown $USER:$USER . and I got the following in return:
total 16
drwx------ 2 root root 16384 Jul 27 03:29 lost+found

looked into /ect/fstab and got the following

/dev/sdb1 /run/media ext4 ro 0 0
/dev/sda1 /run/media/aaron ext4 defaults 0 0
/dev/sdc1 /home/aaron/Ex-HDD ext4 ro 0 0
/dev/sdc2 /run/media ntfs defaults 0 0 (not currently in the dock)

Honestly I am lost.

You are making a mess of your mountpoints.

  • First as @dalto said use UUID instead of /dev/sdxy. After boot it is not guaranteed which drive is sda and which is sdb (well, it can be predicted but it is complicated). Use ls -la /dev/disk/by-uuid to find a correct value.
    Example:
~ >>> ls -la /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 200 27. čec 08.30 .
drwxr-xr-x 8 root root 160 27. čec 08.30 ..
lrwxrwxrwx 1 root root  10 27. čec 08.30 10320F94320F7E4A -> ../../sdc1
lrwxrwxrwx 1 root root  10 27. čec 08.30 14d0dfdc-b16b-4e39-b575-76ac0b6c8837 -> ../../sdb1
lrwxrwxrwx 1 root root  10 27. čec 08.30 5336f373-73ce-4fff-878e-f9fe1ebbcac9 -> ../../sda2
lrwxrwxrwx 1 root root  10 27. čec 08.30 9AEE29DDEE29B305 -> ../../sdc4
lrwxrwxrwx 1 root root  10 27. čec 08.30 9C10-1E22 -> ../../sdc2
lrwxrwxrwx 1 root root  10 27. čec 08.30 ea11adae-7c42-496b-9215-aa39d30f7ef1 -> ../../sda1

So instead of /dev/sda1 I would use UUID=ea11adae-7c42-496b-9215-aa39d30f7ef1

  • Second, look how you mount sda1 and sdb1. Unless you have aaron on your sdb1 you will not be able to mount it. Also what happens if the system first mount sda1 and then sdb1? As far as I know /etc/fstab mount drives in parallel so the order may change.
    Better approach I would recommend is to have a dedicated structure under root for internal drives (e.g. /drives and under that separate folder for each drive /drives/drive_1, /drives/drive_2, … or give them some meaningful names /drives/games, drives/films, drives/junk, …) then you can use a link in your home folder to access them (ln -s /drives/drive_1 ~/games). /run/media is used by some automation tools like udev for mounting external drives. So unless you know what you are doing I would mount internal drives somewhere else. You do not need to specify external drives in fstab since udev is inteligent enough to work with them anyway.
  • You really want to end those fstab entries with 0 2 and not 0 0. It will save you a lot of hassle when there are possible file corruptions.

I hope you have commented this out. You already have /dev/sdb1 using that mountpoint and (not currently in the dock) is not valid string for fstab. Also sdc2 is the same drive as sdc1 only different partition. So if sdc1 is in the dock then sdc2 has to be in the dock too.

Again, does this mount before /home or after? It is not guaranteed. And also I do not understand why you want to mount it as read-only ro. Maybe that is just my misunderstanding but unless it is some specilised drive you generaly want to be able to write to the drive as well, no? In my experience defaults is more appropriate. But then again I do not know your intentions.

If you have a trouble with access permission on your mounted drives then you can also specify a options like umask and mode. But lets say that is second step after you fix your mountpint mess. /etc/fstab by default mounts everything as root user.

Does updating Grub become necessary as well, or is that not relevant?

As far as I know grub has nothing to do with it. Only thing that may be relevant to grub is location of EFI and root partition but I never played with it enough to tell you the details.
As I understand it grub needs to know where is your kernel and systemd (init) and then it just gives control to the system and stop doing anything else. But maybe I am mistaken.

OK thanks. So the issue is what gets mounted on booting (or rebooting). A correct fstab should solve this. UUID’s are helpful but system specific

@wordler, it may be a little off-topic but this is my minimal usb installer for some old Arch version. Here I created manualy the grub.cfg in /boot/grub.

grub.cfg (click here)
############################### set up ###############################

# path to the partition holding ISO images (using UUID)
set imgdevpath="/dev/disk/by-uuid/09b31cc7-76e8-42c2-bc1a-8ca52698fcf1"

#set gfxpayload=1920x1080x32
#gfxmode=1920x1080x32

default=0
timeout=15

#menu_color_normal=white/blue
#menu_color_highlight=yellow/blue

############################ begin entries ############################

menuentry 'archlinux' {
	set isofile='/iso/arch/archlinux-2019.04.01-x86_64.iso'
	loopback loop $isofile
	linux (loop)/arch/boot/x86_64/vmlinuz img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
	initrd (loop)/arch/boot/intel_ucode.img (loop)/arch/boot/amd_ucode.img (loop)/arch/boot/x86_64/archiso.img
}

################################# end #################################

From this minimal grub.cfg file you can se that the grup requires only a path to linux kernel and some modules for the kernel. The kernel then handles reading of /etc/fstab and mounting additional drives.
I am no expert but as I interpret it the kernel doesn’t even have to be located on your hardware.

When you create grub.cfg with update-grub you will get more bloat to it but in principle it should not be too different. Some time ago I found the guide to grub on Manjaro forum with a lot of interesting details (I cannot find the link).

I would summarise it as grub loads kernel, kernel mounts drives as listed in /etc/fstab. The way how the kernel does it depends on the implementation - systemd, init, …

Also, there is grub-mount but it looks like it mounts everything read-only

The program grub-mount performs a read-only mount of any file system or file system image that GRUB understands, using GRUB’s file system drivers via FUSE.

Yep, understood I think. It’s not a Grub thing. The mount points are a mess. Surely getting into the config with a text editor would fix this? I am somewhat distracted at the moment due to work.

The boot process is actually something that can be done a pretty wide variety of ways.

In most modern Linux distros, the initrd is in the middle of all that doing much of the work. Typically the bootloader loads the initrd into memory using the kernel. Then initrd the loads the needed kernel modules and prepares and mounts the real filesystem. Even in your case above, you are loading an initrd named archiso.img

Err…fix what? The OP resolved their issue yesterday. Is there something else that is still outstanding that someone needs help with?

1 Like

If you read the post after the solution the OP reinstalled due to some mistake that ruined his installation so it say’s.

Thanks I missed that one.

I think @vlkon already covered everything but just to reinforce 2 points

  • Don’t use /run/media for permanent mountpoints.
  • Don’t share mountpoints. You two devices with the same mountpoint and one device mounting inside of the others. While the latter is possible, it probably isn’t what intended.
2 Likes

As @dalto mentioned don’t share mount points. You can create your own. My mount point for my hard drive containing my music files is /tunes. It works, just create it and give the ownership to your user. There is lots of info on this in the Arch wiki or just “google it” :grin:

2 Likes

It seems you have messed up your entire set of mount points. Also, I did show you how to use UUIDs. I’m not going to ramble a lot but you really need to clean your fstab. @vlkon has covered everything you need to know to fix your problem.

I would like to suggest commenting out all the mount points you added and restore your fstab to its original state. Also, your other issue is you’re trying to mount /dev/sdb1 and /dev/sdc2 into /run/media this won’t work. Use a different folder inside your main mount location folder.

Ex:

  • mount /dev/sda1 to /run/media/disk_1
  • mount /dev/sdb1 to /run/media/disk_2 … etc

Please use UUIDs they don’t change.