PuppyThis forum is for the discussion of Puppy Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have installed Puppy on a USB key, a few times. But now I would like to put the file PUP_xxx.SFS (PUP_211.SFS for version 2.11) in a directory of my choice; that is not necessarily the root directory, of the partition where Puppy is installed. Does anyone know how to do that ?
When I tried to move the file some where else it didn't work. Appearently the place where the file PUP_xxx.SFS is stored has to be specified somehow. And this is what I need to know.
The /sbin/init script in initrd.gz looks for pup_$PUPPYVERSION.sfs in the top-level of each partition. You could change it to look wherever you want. The important thing is to set the PUPSFS variable, which is used later in the script to copy the pup_xxx.sfs file to the RAM disk.
You can look at the script in an existing Puppy at /initrd/sbin/init .
Remastering isn't hard, gunzip a copy of initrd.gz, mount -o loop it, make changes to $MOUNT_POINT/sbin/init, umount it, gzip it again, and aim your bootstrap loader at it.
The vmlinuz and initrd.gz files can be called whatever your want, as long as you tell the boot loader where they are.
This information is great and puts me on the track. Thanks
I followed the suggestions without any problems. But did not find out yet exactly how to modify the script. I found the PUPSFS variable, and changed the line :
When I tried to reboot on the USB key (after updating and moving pup_211.sfs to the adequate directory of course) I still got the message :
ERROR, cannot find Puppy on '$PMEDIA' boot media." >/dev/console
the Linux-guru can now debug, 'e3' editor is available)
which is displayed by the /initrd/sbin/init.
This is a fairly long script, I only had a glance at it before making the change.
I need to take a closer look to see what is happening in more details and then make more appropriate modifications.
If someone knows about some good tutorials concerning this initrd thing I am interested.
I have also been able to go a little further by trying to see in the script where the pup_$PUPPYVERSION.sfs file is refered to and change the script consequently.
Nevertheless I cannot make a complete boot yet. At some point it still cannot find what it is supposed to.
I am sure I can do what I want. Though the init script does not seem to have bee written in on order to make this easy.
The boot process starts OK.
The following line (in loadpupsfsfunc()) is as far as I can tell, seing the boot messages, executing OK.
"Creating tmpfs for myDirectory/pup_211.sfs on (/initrd)/mnt/tmpfs... "
But problems start to happen with this one :
"Copying myDirectory/pup_211.sfs to tmpfs... mounting on (/initrd)/pup_ ,,,,"
where I get a failure.
Then after a couple of other various messages; I get this one :
"/mnt/tmpfs/myDirectory/pup_211.sfs : No such file or directoty"
Something has obviously been lost on the way.
Any help from Puppy or other experts in the field is welcome.
glad to know that you finally get it to work but i think the second method one would be better because we are not hard-coding something into the init script , we do it from the "outside" which is either grub or maybe other *.cfg files on disk ... probably by that way we can have different multiple configurations on only one same init script with some ease ...
>> "trying to understand how the /sbin/init (inside Puppy-initrd) is working ..."
frankly speaking , i can only do guessing on it most of the time for i'm not really into linux scripting in anyway ...
note :: these seems to work ok *only* on my puppy but i cant and donno how to test it on every possible PUPSTATE scenario and that ntfs stuffs , so it is not "robust" and its still kind of "hard-coded" with mistakes ... beware , backup your previous working init script oftenly when you edit ...