Porteus 4 Porteus.swap file problem [Solved]
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 4 Porteus.swap file problem [Solved]
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
Porteus 4 Porteus.swap file problem
please show the file:
Code: Select all
cat /etc/fstab
Porteus-4.0-x86 (t.me/porteusrus)
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 4 Porteus.swap file problem
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
Porteus 4 Porteus.swap file problem
Comment it out: and add this:
Attention! I am not responsible for errors! :-)
Code: Select all
#/dev/sda3 /mnt/sda3 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
Code: Select all
/dev/sda3 /mnt/sda3 ntfs-3g uid=1000,gid=100,dmask=022,fmask=133 0 0
Code: Select all
reboot
Porteus-4.0-x86 (t.me/porteusrus)
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 4 Porteus.swap file problem
Where?
Code: Select all
fstab is recreated automatically during every boot.
Ed
Porteus 4 Porteus.swap file problem
I'm sorry. I have another Linux :-(
Porteus-4.0-x86 (t.me/porteusrus)
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 4 Porteus.swap file problem
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.
Ed
Porteus 4 Porteus.swap file problem
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:
where 1048576 is 1GB;
Permissions:
Format swap-file:
and turn on swap:
check it out:
You need to add the file to startup:
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
Permissions:
Code: Select all
chmod 600 /mnt/sda3/Porteus.swap
Code: Select all
mkswap /mnt/sda3/Porteus.swap
Code: Select all
swapon /mnt/sda3/Porteus.swap 2>/dev/null
Code: Select all
swapon -s
Code: Select all
echo "swapon /mnt/sda3/Porteus.swap 2>/dev/null" >> /etc/rc.d/rc.local
Porteus-4.0-x86 (t.me/porteusrus)
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 4 Porteus.swap file problem
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#
Ed
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 4 Porteus.swap file problem [Solved]
oops, I forgot.
Code: Select all
swapon: /mnt/sda3/Porteus.swap: insecure permissions 0777, 0600 suggested.
Thank you again for your help.
Ed
Porteus 4 Porteus.swap file problem [Solved]
This is warning, yes. Don't worry
Porteus-4.0-x86 (t.me/porteusrus)
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 4 Porteus.swap file problem [Solved]
You cut and paste well kitasia. (Interesting that your Posts count shows as 0. )
Follow the steps posted here: Porteus 4 Porteus.swap file problem (Post by dZ0TFR #75641)
Ed