Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 25 May 2015, 05:54
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Disable swap and mount disks readonly - how? (Solved)
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 25 Dec 2012
Posts: 2

PostPosted: Tue 25 Dec 2012, 15:59    Post_subject:  Disable swap and mount disks readonly - how? (Solved)  

1/ I'm using Slacko Puppy v5.4 to retrieve files from a dying PC. Booting off a DVD and saving stuff to a USB stick.

The dying PC has a couple of disks with Linux swap files, and I can see that Puppy is using one of these swapfiles.

I don't want to write anything at all to the hard disks as the PC is very sick. Want to tell Puppy at boot to not use the swap partitions at all.
Also can't see how to mount hard disks readonly.

Any help appreciated.

2/ I have found Slacko amazing - have installed several Slackware binary packages direct from Slackware (perl, python, gcc-gfortran etc.) and also compiled from slackbuilds.org. But haven't found any clear instructions on how to create .sfs archives. Some of the things I've compiled - e.g. R and gdal - I'd like to package as .sfs.

Any pointers to a good .sfs tutorial?

Back to top
View user's profile Send_private_message 

Joined: 19 Nov 2008
Posts: 311
Location: Oslo, Norway

PostPosted: Tue 25 Dec 2012, 17:11    Post_subject:  

Aint got no pointer to SFS tutorial, but you can at least use Gparted to delete the swap drive...


Remember to pick the right drive and not your USB mem stick.
Back to top
View user's profile Send_private_message Visit_website MSNM 

Joined: 27 Mar 2008
Posts: 1293
Location: Germany

PostPosted: Tue 25 Dec 2012, 17:38    Post_subject:  

Type man mount in a console. Under Options you'll find the option -r.
E.g. if you want to mount sdb1 read only:
mount -r /dev/sdb1 /mnt/sdb1

If /mnt/sdb1 doesn't exist, you have to create this folder manually.

About swap you can type swapoff or swapon and you'll get a list of options.

swapoff -a should work.

Also from gparted it should be possible to switch on or off without deleting.


Edit: For building a sfs you can use the commands dir2sfs or mksquashfs. Or maybe Pet_Maker-2.0.pet, you can find here, but I haven't tested.

Ich verwende "frugal", und das ist gut so. Wink
Raspberry Pi without Puppy? No, thanks.
Back to top
View user's profile Send_private_message 

Joined: 25 Dec 2012
Posts: 2

PostPosted: Wed 02 Jan 2013, 17:02    Post_subject: Disable swap & mount disk RO:how? Post SlackBuild sfs recipe
Sub_title: Disable swap & mount disk RO:how? Post SlackBuild sfs recipe

1/ Cheers guys. Am now happily switching swap on and off.

2/ And I found elsewhere all about .sfs files.
Found it was pretty simple to use a standard .SlackBuild script to compile a Slackware package, and with 4 additional lines of bash script was able to create an .sfs package.

In case anybody is interested, this is my trivial recipe used to build the .sfs after building gdal as downloaded from http://slackbuilds.org/repository/14.0/libraries/gdal/
cd /tmp/SBo/package-gdal
sh install/doinst.sh

mksquashfs /tmp/SBo/package-gdal /tmp/gdal-1.9.1-i486-1_SBo.zip.sfs -e /tmp/SBo/package-gdal/install
mksquashfs /tmp/SBo/package-gdal /tmp/gdal-1.9.1-i486-1_SBo.xz.sfs -comp xz -Xbcj x86 -e /tmp/SBo/package-gdal/install

Similar recipe should work for any well-behaved .SlackBuild script. It could probably be generalized using the environment variables from the .SlackBuild script.
It's probably worth looking at the autogenerated (by makepkg) doinst.sh just to check it's sensible.

(Note to anybody copying this slavishly without engaging brain - gdal needs both geos and proj - I had already installed these.)

I built both zip and xz compressed .sfs to compare the sizes. They are both bigger than the Slackware .txz package.

-rwxr-xr-x 1 root root 5.5M Jan 1 14:26 gdal-1.9.1-i486-1_SBo.xz.sfs
-rwxr-xr-x 1 root root 7.0M Jan 1 14:26 gdal-1.9.1-i486-1_SBo.zip.sfs
-rw-r--r-- 1 root root 4.5M Dec 22 22:30 gdal-1.9.1-i486-1_SBo.txz

I came to the conclusion that there's little point in building an .sfs for something as small as gdal. Seems better to build and install the Slackware .txz. But there could be some mileage in building a package containing the prerequisites too - gdal, geos and proj all together. Or maybe for something big like vlc, especially if you build it with all (or most) of its dependencies statically linked.

Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0525s ][ Queries: 11 (0.0039s) ][ GZIP on ]