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 Thu 24 Apr 2014, 07:22
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 [4 Posts]  
Author Message
geep

Joined: 25 Dec 2012
Posts: 2

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

Hi,
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?

Cheers,
Peter
Back to top
View user's profile Send private message 
Atle

Joined: 19 Nov 2008
Posts: 282
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...

Menu
System
Gparted

Remember to pick the right drive and not your USB mem stick.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
rhadon


Joined: 27 Mar 2008
Posts: 1291
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:
Code:
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.

Cheers,
Rolf

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 
geep

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
Subject description: 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/
Code:
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.

Cheers,
Peter
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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