Mount external drive

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
uzzer
Ronin
Ronin
Posts: 2
Joined: 15 Feb 2021, 17:02
Distribution: Porteus 4

Mount external drive

Post#1 by uzzer » 15 Feb 2021, 17:13

Hi all,

I am testing Porteus 4.0 LXDE and found something I can't fix by myself.

I have an external hdd drive which gets mounted as /dev/sdc1 or /dev/sdd1 depending on how Porteus wants to do it.

I need to mount it always at the same point, either /dev/sdc1 or /dev/sdd1, given I get always the same mount point.

In /etc/fstab there is this entry:

/dev/sdd1 /mnt/sdd1 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0

How I should add it to rc.local in order to get it working?

Cheers.

roadie
Full of knowledge
Full of knowledge
Posts: 315
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Mount external drive

Post#2 by roadie » 15 Feb 2021, 21:17

Something like this should work:

Code: Select all

bash -c 'echo /dev/sdd1 /mnt/sdd1 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0 >>/etc/fstab'
Also, sed will insert lines, but I have little knowledge of using it.

You might want to make a backup of /etc/fstab before running this, just to be safe.

So, rc.local would look like this:

Code: Select all

cp /etc/fstab /etc/fstab.bak
bash -c 'echo /dev/sdd1 /mnt/sdd1 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0 >>/etc/fstab'

uzzer
Ronin
Ronin
Posts: 2
Joined: 15 Feb 2021, 17:02
Distribution: Porteus 4

Mount external drive

Post#3 by uzzer » 17 Feb 2021, 18:06

Hello,

Thanks for the prompt help. Will test this weekend.

Cheers.

burdi01
Samurai
Samurai
Posts: 142
Joined: 18 Aug 2013, 12:09
Distribution: Slackware PartedMagic Xubuntu
Location: The Netherlands

Mount external drive

Post#4 by burdi01 » 18 Feb 2021, 11:04

For a non-handholding response see Permanent device/mount name for a USB disk.
:D

Post Reply