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 Tue 02 Sep 2014, 10:03
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Load SFSs from psubdir
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
Iguleder


Joined: 11 Aug 2009
Posts: 1890
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 09 Jul 2010, 10:38    Post subject:  Load SFSs from psubdir
Subject description: Make Puppy load SFS files from a sub-directory of /mnt/home instead of /mnt/home
 

It's very very simple. Thanks to Sit Heel Speak for reminding me I always wanted this feature in Puppy Smile

If you have no idea what psubdir is, don't do it Exclamation

This makes your Puppy load SFS from /mnt/home/<psubdir>, but ONLY from there. You must have psubdir specified for this to work; however, if you don't have a psubdir specified, it still works. It just appends it to the SFSs path, that's all, it's safe.

It's kinda experimental, tested it only on my puplet, which is 4.3.1-based (here. Theoretically, it should work with all Woof-built puppies.

1) Make /root/initrd, copy your Puppy's initrd.gz there.

2) Open a console, do this:
Code:
cd /root/initrd
gunzip initrd.gz
cpio -i < initrd
rm initrd


That will extract your Puppy's initramfs.

3) Then, run this:
Code:
geany init


Find the line that says SFSSDIR="$SMNTPT".

After that line, add this:
Code:
  # iguleder: add psubdir to SFSSDIR
  for code in `cat /proc/cmdline`; do
 
    case $code in
     
      psubdir=*)
           
        SFSSDIR=$SFSSDIR/${code##*=}   
        break
        ;;
       
    esac
       
  done


That should make your Puppy look at /mnt/home/<your psubdir> instead of just /mnt/home if you have a psubdir specified.

Save the file.

4) In the same console, run this:
Code:
find . | cpio -o -H newc | gzip -9 > ../initrd.gz


That will create a new initrd.gz in /root with the required change. Replace your original initrd.gz with the new one.

5) In the console, run this:
Code:
geany `which bootmanager`


Find the line cd $EXTRASFSMNTPT. Before this line, add this:
Code:
  #iguleder: add psubdir to EXTRASFSMNTPT
 for code in `cat /proc/cmdline`; do
 
   case $code in
     
     psubdir=*)
           
       EXTRASFSMNTPT=$EXTRASFSMNTPT/${code##*=}   
       break
       ;;
       
   esac
       
 done


That should make the boot manager able to list SFSs from the psubdir, instead of /mnt/home, very similar to the change in the initramfs.

Save the file. We're done Very Happy

Then go to the boot manager, add your favorite SFSs from /mnt/home/<psubdir> and have fun. Very Happy [/code][/url]

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 09 Jul 2010, 21:43    Post subject:  

Yes, it is a good idea. I have implemented it in Woof, so future puppies will have it:

http://bkhome.org/blog/?viewDetailed=01717

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.0644s ][ Queries: 12 (0.0193s) ][ GZIP on ]