Looking at general Linux forums, it says that I should edit fstab to mount file systems permanently. But when I open fstab from Porteus there is a note that says I should add a command to rc.local. Can somebody share with me what is the proper way to mount a file system persistently in Porteus 3.22?
Thanks in advance
JP
Proper Way to Mount a Drive Permanently
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Proper Way to Mount a Drive Permanently
Hi jpagan. I don't understand your question.
If a drive is plugged in when Porteus boots it is automatically mounted. And unless manually unmounted stays mounted until Porteus is shutdown. So, what exactly are you asking?? 


-
- Shogun
- Posts: 434
- Joined: 02 May 2017, 09:51
- Distribution: v3.2.2-32 and Porteus-Artix-64
- Location: Chennai,India
Proper Way to Mount a Drive Permanently
ed_P, that is because, Linux systems we use are already loaded with all necessary libraries for system calls. I learned recently while installing Arch, that volume management is not natively supported in the Kernel.
Arch base installation will mount only its root partition as it is written in fstab .
File Mangers have settings for volume management for auto mounting and they may interact with prior installed libraries for I/O. Even for 'pen drive' mounting notification there is a check box in Pcmanfm (jssouza,fulalas - I found this under 'preferences') May be other FMs don't show this pop up, but list.
General advice is , we should have polkit-gnome,gvfs,udisk or udiskie etc. for auto mounting of volumes.
Since each of this take up lot of space ,I did not install in Arch. Instead I,edited, "/etc/fstab" file to include only a HDD partition where I store all my 'pdf,music.video,astronomy,photos, etc.' files, as read only. Other partitions don't show off. Very good safety measure.
Arch installation teaches lots of things. There will be only 'netctl' application for network, and it is useless for wpa2 encrypted security. One has to install, 'wpa_supplicant' downloaded from another machine.
If you install. Xorg,Xorg-server, you will not have "xinit", which has 'startx'. One will learn many more on .xauthority,.xinitrc, multi user setup etc.
xinit- fulalas, I noticed , this is the cause for 'screen messages showing xorg log upto xorgconf file. This is not shown in jssouza's LXDE as he may be using lxdm for auto login.(? pl confirm) I will try this week end.
I set up arch with lxde with minimum applications. editor,epdfviewer, net surf,mpv,mpaint,7zip.
Learning some basics, which may be child's play for many of you.
thanks.
Arch base installation will mount only its root partition as it is written in fstab .
File Mangers have settings for volume management for auto mounting and they may interact with prior installed libraries for I/O. Even for 'pen drive' mounting notification there is a check box in Pcmanfm (jssouza,fulalas - I found this under 'preferences') May be other FMs don't show this pop up, but list.
General advice is , we should have polkit-gnome,gvfs,udisk or udiskie etc. for auto mounting of volumes.
Since each of this take up lot of space ,I did not install in Arch. Instead I,edited, "/etc/fstab" file to include only a HDD partition where I store all my 'pdf,music.video,astronomy,photos, etc.' files, as read only. Other partitions don't show off. Very good safety measure.
Arch installation teaches lots of things. There will be only 'netctl' application for network, and it is useless for wpa2 encrypted security. One has to install, 'wpa_supplicant' downloaded from another machine.
If you install. Xorg,Xorg-server, you will not have "xinit", which has 'startx'. One will learn many more on .xauthority,.xinitrc, multi user setup etc.
xinit- fulalas, I noticed , this is the cause for 'screen messages showing xorg log upto xorgconf file. This is not shown in jssouza's LXDE as he may be using lxdm for auto login.(? pl confirm) I will try this week end.
I set up arch with lxde with minimum applications. editor,epdfviewer, net surf,mpv,mpaint,7zip.
Learning some basics, which may be child's play for many of you.
thanks.
Linux Kernel-4.4.272 -32 bit; Linux Kernel-5.4.185 - 64 bit
- Blaze
- DEV Team
- Posts: 3994
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Proper Way to Mount a Drive Permanently
Hi jpagan.
For example, if you need to mount your windows share permanently then you are need to tweak /etc/rc.d/rc.local
after starting your system, you will get these lines in /etc/fstab (this job will done by /etc/rc.d/rc.local script in the init step)
More info about this you can find here.
For example, if you need to mount your windows share permanently then you are need to tweak /etc/rc.d/rc.local
Code: Select all
echo -e \\n# Local partitions:\\n//192.168.1.249/d /media/P cifs credentials=/root/.smblocal1,dir_mode=0777,file_mode=0777 0 0\\n//192.168.1.220/c /media/WEB cifs credentials=/root/.smblocal2,dir_mode=0777,file_mode=0777 0 0\\n//192.168.1.220/d /media/FTP cifs credentials=/root/.smblocal2,dir_mode=0777,file_mode=0777 0 0\\n//192.168.1.165/d /media/U cifs credentials=/root/.smblocal3,dir_mode=0777,file_mode=0777 0 0 >> /etc/fstab
Code: Select all
# Local partitions:
//192.168.1.249/d /media/P cifs credentials=/root/.smblocal1,dir_mode=0777,file_mode=0777 0 0
//192.168.1.220/c /media/WEB cifs credentials=/root/.smblocal2,dir_mode=0777,file_mode=0777 0 0
//192.168.1.220/d /media/FTP cifs credentials=/root/.smblocal2,dir_mode=0777,file_mode=0777 0 0
//192.168.1.165/d /media/U cifs credentials=/root/.smblocal3,dir_mode=0777,file_mode=0777 0 0
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
Proper Way to Mount a Drive Permanently
Thanks Blaze,
I think this is exactly what I needed to know. However, in your first code line you are appending to etc/fstab, not /etc/rc.d/rc.local. Is this a typo?
I think this is exactly what I needed to know. However, in your first code line you are appending to etc/fstab, not /etc/rc.d/rc.local. Is this a typo?
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Proper Way to Mount a Drive Permanently
No not a typo. He is appending to fstab at a certain point during boot, instead of editing fstab directly. This should get it done.
fstab is created from scratch at every boot so you need to inject to it rather than edit it.
fstab is created from scratch at every boot so you need to inject to it rather than edit it.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
Proper Way to Mount a Drive Permanently
Got it!
It works perfectly now. Thanks for all the help.

It works perfectly now. Thanks for all the help.

-
- Black ninja
- Posts: 75
- Joined: 28 Oct 2017, 13:40
- Distribution: 4.0 XFCE, Manjaro
- Location: .bay.de
Proper Way to Mount a Drive Permanently
Hi,
thanks for that hint. I noticed that there is a tutorial and a thread regarding rc.local tweaks.
It would be nice if a small tutorial about using the rc.local for mounting samba-shares could be added this thread...for those who are not that familiar with the russian language. i could write down some lines if you wish
I tried this tweak on my machine, but unfortunately its not working right now, the share is not mounted after boot. /var/log/messages and /var/log/syslog do not contain any useful information about the issue.
fstab entry seems to be alright and a sudo mount --all mounts the share as expected. Any suggestions where i should have a look at? Maybe wireless isn´t up before mounts a performed...but i'm not sure...
Another question that came up:
Do i need to put the credentials-file into root-Folder or could this file be placed inside the guest-Home?
kind regards
apollo
thanks for that hint. I noticed that there is a tutorial and a thread regarding rc.local tweaks.
It would be nice if a small tutorial about using the rc.local for mounting samba-shares could be added this thread...for those who are not that familiar with the russian language. i could write down some lines if you wish

I tried this tweak on my machine, but unfortunately its not working right now, the share is not mounted after boot. /var/log/messages and /var/log/syslog do not contain any useful information about the issue.
fstab entry seems to be alright and a sudo mount --all mounts the share as expected. Any suggestions where i should have a look at? Maybe wireless isn´t up before mounts a performed...but i'm not sure...
Another question that came up:
Do i need to put the credentials-file into root-Folder or could this file be placed inside the guest-Home?
kind regards
apollo