PuppyLinux : SfsModuleCreation

PuppyLinuxMainPage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
How to make a .sfs file
New Info
Basically, it involves copying all of folders and files of a component into a working directory (within that working directory, the directory structure should be one that you will find in Puppy). Then you create the sfs by "mksquashfs workingdirectory new.sfs".

The challenge is in knowing all of the directory structure of the programs that you add, so that the sfs can be ported to the next Puppy versions. But this may be less important for you at the moment. What may be important is to get started.

For practice, try an application in /usr, which you will put in the working directory as /usr/application. Then after making the sfs and before you remaster, delete that application from /usr (or move it to a Linux partition - not to a Windows partition).

At use time, you first copy the name_212.sfs (use short name if using DOS partition and dont forget the version number of Puppy) to the save partition and save/reboot Puppy with the new remastered CD.

EditSFS Pup
Advantagesof Squash file compression
Can puplets such as Grafpup, Hacao, Simplepup and Emptycrust be turned into .sfs modules

Old Info
This information in valid for puppy 1.0.7 and later puppy 1.0.* versions only. union structure is going to change in puppy2

Presently puppy supports .sfs files to be mounted on union /usr.
Suppose I have got some PackageX running and want to make a .sfs out of it. I would copy all the necessary files for packagex to /my-docments/packagex. inside the folder packagex there would be the following folders
/bin - containing the binaries
/lib - dependencies
/share - shared data
..

if the package you have compiled installs to /usr/local then packagex folder would contain
/local/bin
/local/lib
/local/share
..

to make a .sfs out of this execute the following command in the terminal
Code:
mksquashfs /root/my-documents/packagex /mnt/hda1/usr_packagex.sfs

/mnt/hda1 to be replaced by where ever you want this .sfs file to be created.

pre-1.0.7 users can use it by renaming it to usr_more.sfs
1.0.7 users can do the following
edit your rc.local to add the following lines

Code:
echo "Making more loop devices..."
mknod /dev/loop5 b: 7 5
mknod /dev/loop6 b: 7 6
mknod /dev/loop7 b: 7 7

if [ ! "`ls /mnt/home/usr_packagex.sfs 2> /dev/null`" = "" ];then
mkdir /.usr_packagex
echo "Mounting /mnt/home/usr_packagex.sfs file on /.usr_packagex..."
losetup-FULL /dev/loop5 /mnt/home/usr_packagex.sfs
mount -r -t squashfs -o noatime /dev/loop5 /.usr_packagex
unionctl /usr --add --after /root/.usr --mode ro /.usr_packagex
fi


if you are multiple .sfs files the increase then use the next /dev/loop that is empty i.e. the next usr*.sfs will go in /dev/loop6. If you run out of loops make new ones using mknod command as show above.

CategoryHowto

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.0
Page was generated in 0.0445 seconds