Porteus 4 Porteus.swap file problem [Solved]

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 4 Porteus.swap file problem [Solved]

Post#1 by Ed_P » 30 Jan 2020, 04:44

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.
Ed

dZ0TFR
Samurai
Samurai
Posts: 143
Joined: 07 Apr 2019, 07:16
Distribution: Porteus-4.0

Porteus 4 Porteus.swap file problem

Post#2 by dZ0TFR » 30 Jan 2020, 09:15

please show the file:

Code: Select all

 cat  /etc/fstab
Porteus-4.0-x86 (t.me/porteusrus)

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 4 Porteus.swap file problem

Post#3 by Ed_P » 30 Jan 2020, 15:49

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:~$ 
Ed

dZ0TFR
Samurai
Samurai
Posts: 143
Joined: 07 Apr 2019, 07:16
Distribution: Porteus-4.0

Porteus 4 Porteus.swap file problem

Post#4 by dZ0TFR » 30 Jan 2020, 16:20

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

Code: Select all

reboot
Attention! I am not responsible for errors! :-)
Porteus-4.0-x86 (t.me/porteusrus)

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 4 Porteus.swap file problem

Post#5 by Ed_P » 30 Jan 2020, 16:28

dZ0TFR wrote:
30 Jan 2020, 16:20
Comment it out:
Where?

Code: Select all

fstab is recreated automatically during every boot.
Ed

dZ0TFR
Samurai
Samurai
Posts: 143
Joined: 07 Apr 2019, 07:16
Distribution: Porteus-4.0

Porteus 4 Porteus.swap file problem

Post#6 by dZ0TFR » 30 Jan 2020, 16:47

I'm sorry. I have another Linux :-(
Porteus-4.0-x86 (t.me/porteusrus)

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 4 Porteus.swap file problem

Post#7 by Ed_P » 30 Jan 2020, 20:27

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. :wall: And the Execute option stays at Allow executing file.
Ed

dZ0TFR
Samurai
Samurai
Posts: 143
Joined: 07 Apr 2019, 07:16
Distribution: Porteus-4.0

Porteus 4 Porteus.swap file problem

Post#8 by dZ0TFR » 31 Jan 2020, 06:00

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:

Code: Select all

chmod 600 /mnt/sda3/Porteus.swap
Format swap-file:

Code: Select all

mkswap /mnt/sda3/Porteus.swap
and turn on swap:

Code: Select all

swapon /mnt/sda3/Porteus.swap 2>/dev/null
check it out:

Code: Select all

swapon -s
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.0-x86 (t.me/porteusrus)

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 4 Porteus.swap file problem

Post#9 by Ed_P » 31 Jan 2020, 07:00

:Yahoo!:

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# 
:celebrate3:
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 4 Porteus.swap file problem [Solved]

Post#10 by Ed_P » 31 Jan 2020, 16:51

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. :beer:
Ed

dZ0TFR
Samurai
Samurai
Posts: 143
Joined: 07 Apr 2019, 07:16
Distribution: Porteus-4.0

Porteus 4 Porteus.swap file problem [Solved]

Post#11 by dZ0TFR » 01 Feb 2020, 03:58

This is warning, yes. Don't worry :)
Porteus-4.0-x86 (t.me/porteusrus)

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 4 Porteus.swap file problem [Solved]

Post#12 by Ed_P » 28 Feb 2020, 06:48

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)
Ed

Post Reply