Page 1 of 1
Porteus 4 Porteus.swap file problem [Solved]
Posted: 30 Jan 2020, 04:44
by Ed_P
In running Porteus 4.0 on an old 586 netbook I've added a swap file to the system to speed it up using the instructions found here
http://www.porteus.org/faq.html#twenty but booting doesn't accept it saying it has the wrong permissions. How do I add permissions to it? It's on the hard drive which is NTFS format.
Porteus 4 Porteus.swap file problem
Posted: 30 Jan 2020, 09:15
by dZ0TFR
Porteus 4 Porteus.swap file problem
Posted: 30 Jan 2020, 15:49
by Ed_P
Thank you.
Code: Select all
guest@porteus:~$ free -m
total used free shared buff/cache available
Mem: 997 345 86 91 565 420
Swap: 0 0 0
guest@porteus:~$ cat /etc/fstab
# Do not edit this file as fstab is recreated automatically during every boot.
# Please use /etc/rc.d/rc.local or sysvinit scripts if you want to mount/unmount
# drive, filesystem or network share.
# System mounts:
aufs / aufs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devtmpfs /dev devtmpfs defaults 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
# Device partitions:
/dev/sda2 /mnt/sda2 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
/dev/sda3 /mnt/sda3 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
/dev/sda1 /mnt/sda1 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
/dev/sda4 /mnt/sda4 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
# Hotplugged devices:
guest@porteus:~$ ls -lh /mnt/sda3/*.swap
-rwxrwxrwx 1 root root 500M Dec 5 14:58 /mnt/sda3/Porteus.swap*
guest@porteus:~$
Porteus 4 Porteus.swap file problem
Posted: 30 Jan 2020, 16:20
by dZ0TFR
Comment it out:
Code: Select all
#/dev/sda3 /mnt/sda3 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
and add this:
Code: Select all
/dev/sda3 /mnt/sda3 ntfs-3g uid=1000,gid=100,dmask=022,fmask=133 0 0
Attention! I am not responsible for errors! :-)
Porteus 4 Porteus.swap file problem
Posted: 30 Jan 2020, 16:28
by Ed_P
dZ0TFR wrote: ↑30 Jan 2020, 16:20
Comment it out:
Where?
Code: Select all
fstab is recreated automatically during every boot.
Porteus 4 Porteus.swap file problem
Posted: 30 Jan 2020, 16:47
by dZ0TFR
I'm sorry. I have another Linux :-(
Porteus 4 Porteus.swap file problem
Posted: 30 Jan 2020, 20:27
by Ed_P
I've tried chmod 600 /mnt/sda3/Porteus.swap and opening the drive as root and trying to change the drive's Permissions in Nemo but I can not change the Owner or Group to guest. Everything I try reverts Owner and Group back to root.

And the Execute option stays at Allow executing file.
Porteus 4 Porteus.swap file problem
Posted: 31 Jan 2020, 06:00
by dZ0TFR
Ed_P, Please write the exact error message.
First check how much disk space is where the Porteus.swap is. (on /mnt/sda3 ?). Perhaps there is simply no disk space where Porteus.swap. Free up disk space and try the native
instructions from your first message in the topic. But if it doesn't work out for you, try this:
Works for me (Porteus 4.0):
Create swap-file:
Code: Select all
dd if=/dev/zero of=/mnt/sda3/Porteus.swap bs=1024 count=1048576
where 1048576 is 1GB;
Permissions:
Format swap-file:
and turn on swap:
Code: Select all
swapon /mnt/sda3/Porteus.swap 2>/dev/null
check it out:
You need to add the file to startup:
Code: Select all
echo "swapon /mnt/sda3/Porteus.swap 2>/dev/null" >> /etc/rc.d/rc.local
Porteus 4 Porteus.swap file problem
Posted: 31 Jan 2020, 07:00
by Ed_P
Thank you
dZ0TFR.
Code: Select all
guest@porteus:~$ su
Password:
root@porteus:/home/guest# free -m
total used free shared buff/cache available
Mem: 997 287 90 147 619 422
Swap: 499 0 499
root@porteus:/home/guest# swapon -s
Filename Type Size Used Priority
/mnt/sda3/Porteus.swap file 511996 0 -2
root@porteus:/home/guest#

Porteus 4 Porteus.swap file problem [Solved]
Posted: 31 Jan 2020, 16:51
by Ed_P
dZ0TFR wrote: ↑31 Jan 2020, 06:00
Ed_P, Please write the exact error message.
oops, I forgot.
Code: Select all
swapon: /mnt/sda3/Porteus.swap: insecure permissions 0777, 0600 suggested.
I think this was more a warning rather than the show stopper. And I still get it booting but the swap file is working.
Thank you again for your help.

Porteus 4 Porteus.swap file problem [Solved]
Posted: 01 Feb 2020, 03:58
by dZ0TFR
This is warning, yes. Don't worry

Porteus 4 Porteus.swap file problem [Solved]
Posted: 28 Feb 2020, 06:48
by Ed_P
You cut and paste well kitasia. (Interesting that your Posts count shows as 0. )
Ed_P wrote: ↑30 Jan 2020, 04:44
How do I add permissions to it? It's on the hard drive which is NTFS format.
Follow the steps posted here:
Porteus 4 Porteus.swap file problem (Post by dZ0TFR #75641)