@Rosika
I believe your mount point would be “mkdir -p /dev/sdb2 /mnt/media/rosika”
O.K., but the external HDD is not always /dev/sdb. …
OK, apologies for confusion
Do it like this
- Make a mount point eg
mkdir /data - Set its permissions. It is best owned by root
- in fstab put in a line like
UUID=f14a27c2-0b49-4607-94ea-2e56bbf76fe1 /data ext2 defaults 0 2
- boot and you should see /data in
df
I hope I am not spreading more confusion. When I see /media /… I think flash drives.
Regards
Neville
That only puts the mount point in /media instead of /run.
I then run chown 755 /media/xxxxx xxxxx
@Rosika
Probably because the device you are booting from is connected via usb?
Maybe @nevj can tell you how to keep a permanent mount with a usb device, I
know how to do it in Windows but haven’t tried it with Linux.
Thanks Neville
O.K., I see it now. This sounds good.
My getting confused is certainly not your fault.
On automount - How to make partitions mount at startup? - Ask Ubuntu I also found a GUI method by making use of the Disks programme. Apparently it will edit fstab for you…
I´m not quite sure about that. Therefore my asking here. …
Thanks a lot for your help.
Many greetings from Rosika
Yes, Daniel. That´s the case indeed.
Thanks and cheers from Rosika
Not happy with things being edited behind my back.
Yes, my thoughts as well. Therfore I´d like to do it personally and manually.
That happens whenever there is more than one disk… they are named in random order.
Thats why I use UUID.
It can cause enormous problems with installers… I almost installed Void on the wrong disk once.
Yes, I notice that on an almost daily basis.
I needed to modify my hdparm
command due to that as well:
set serial 57584C314135364855375855; and echo (lsblk -o name,serial | grep $serial | awk '{print $1}'); and sleep 2; and sudo hdparm -B /dev/(lsblk -o name,serial | grep $serial | awk '{print $1}'); and sleep 2; and sudo hdparm -B 254 /dev/(lsblk -o name,serial | grep $serial | awk '{print $1}'); and sudo hdparm -B /dev/(lsblk -o name,serial | grep $serial | awk '{print $1}'); and sleep 3; and sudo smartctl -A -d sat /dev/(lsblk -o name,serial | grep $serial | awk '{print $1}'); and echo $status
(fish-syntax)
Cheers from Rosika
Hi again,
I was just wondering:
@nevj suggested in post #43
… so the mount point for the device “f14a27c2-0b49-4607-94ea-2e56bbf76fe1” (UUID), which is my 3rd HDD partition), would be /data
then.
I understand that, but:
wouldn´t it also be possible to leave its mountpoint as it is right now when I mount it manually
df -h
Filesystem Size Used Avail Use% Mounted on
[...]
/dev/sdb3 385G 167G 199G 46% /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1
[...]
So to take up my question from post #34 again:
If that´s possible:
the correct entry in fstab
should be
UUID=f14a27c2-0b49-4607-94ea-2e56bbf76fe1 /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1 ext2 defaults 0 2
or am I completely mistaken
Many greetings from Rosika
Hi Rosika,
Yes, you can use any valid directory name for a mount point. The directory has to exist, before you try to mount anything to it. You should not mount anything to a directory that already has something mounted to it.
But why would you want to do that? Its a lot of typing to access it.
Some people like to put manual mounts inside /mnt and plugandplay mounts inside /media. It is just a convention.
Cheers
Neville
Hi Neville,
thanks for your reply.
Well, the reason for asking my question is the following:
I´ve written quite a few scripts in the past in which some programmes reference files which exist on the the 3rd partition.
If I´d follow your advice
the path would´ve been changed, right?
E.g: part of a certain script which would be affected:
cd /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Zeitschriften_und_Bücher/Bücher_für_script-Referenz; firejail --net=none evince 10_easy_ways_to_restore_your_linux-system.pdf 2>/dev/null
So I guess I´d have to re-write all my scripts, which I´d like to avoid.
P.S.:
To be honest I have no problem whatsoever in manually mounting the 3rd HDD-partition after boot.
There´s an icon for it on the desktop. I just have to right-click and choose “mount”, that´s all…
I mean before having to re-write my scripts…
But it´s another case with my friend who has the exact same setup as me.
Root, home and 3rd partition, also Linux Lite (yet LL 6.4).
Also: no fstab
-entry for the 3rd partition per default.
However: whenever she wants to access her data on the 3rd partition (e.g.) by clicking on the left-side entry in thunar
she has to punch in her password; she has to be root to be allowed to access it.
This probably gets tedious on a daily basis…
Right. I see your issue. You could solve it with a symbolic link, or as you suggest, leave /media/… as the mount point.
O.K.,
in your post #38 you already suggested the use of a symbolic link:
Hmm, I´m not quite sure what you meant by that…
So /data
should be a symbolic link to /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/
But where and when would I use the symbolic link?
You said: “don´t add it to fstab”.
Cheers from Rosika
I think you could do
ln -s /data /media/…
so /media/… becomes a pointer to /data
Then your scripts would follow the pointer and find /data
You only need to do the ln command once… the pointer will be there forever
O.K.,
let´s see if I get it right:
My command for creating the symbolic link would be:
ls -s /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1 /data
If that´s correct:
my fstab
-entry would be:
UUID=f14a27c2-0b49-4607-94ea-2e56bbf76fe1 /data ext2 defaults 0 2
and my scripts are still catered for (due to the pointer).
Might all of that be correct
Cheers from Rosika
No you have it back to front
ln -s /data /media/…
It is
ln target linkname
so when you issue the ln command, /data should exist, and /media/… should not exist… the ln command will make it
That is if fstab mounts the partition to /data, as you say.
It does not matter if you do the ln before you setup fstab or after.
I use links like that. I do it after I setup fstab.
Thanks, Neville. I seem to have messed up the syntax then.
Oh dear, then it´s not the right thing for me as /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1
does exist.
Well, for my scenario is seems to be better to leave things as they are…
Thanks so much, Neville.
Many greetings from Rosika