The strange case of init script in initrd.gz

Please post any bugs you have found
Message
Author
User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#21 Post by drunkjedi »

If <filename> ends with a "/" it is assumed to be a directory specification,
This line in that init readme you linked is what confused me.

Sorry to bother you.

Also could you please tell me....
pfix=ram loads pupsfs in ram, doesn't load save file.
pfix=copy loads pupsfs in ram, does it also load savefile in ram? How about savefolder?

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#22 Post by drunkjedi »

Hi jlst,

Neither psave=sda7:/tahr64save/ nor psave=sda7:/tahr64save work.

The pup is Tahr64 6.0.5.
I haven't yet tried pupsfs= or zdrv= options, but I do want to move them to sda7 too.

Only using pmedia=satacd works.
Here's what /etc/rc.d/PUPSTATE shows when booted with that option

Code: Select all

PUPMODE=12
PDEV1=''
DEV1FS=''
PUPSFS='sdf1,vfat,/tahr64/puppy_tahr64_6.0.5.sfs'
PUPSAVE='sda7,ext4,/tahr64save'
PMEDIA='cd'
#ATADRIVES is all internal ide/pata/sata drives, excluding optical, excluding usb...
ATADRIVES='sda '
#ATAOPTICALDRIVES is list of non-usb optical drives...
ATAOPTICALDRIVES='sr0 '
#these directories are unionfs/aufs layers in /initrd...
SAVE_LAYER='/pup_rw'
PUP_LAYER='/pup_ro2'
#The partition that has the tahr64save file is mounted here...
PUP_HOME='/mnt/dev_save'
#(in /initrd) ...note, /mnt/home is a link to it.
#this file has extra kernel drivers and firmware...
ZDRV='sdf1,vfat,/tahr64/zdrv_tahr64_6.0.5.sfs'
ADRV=''
YDRV=''
#complete set of modules in the initrd (moved to main f.s.)...
ZDRVINIT='no'
#Partition no. override on boot drive to which session is (or will be) saved...
PSAVEMARK=''
PSUBDIR='/tahr64'

jlst

#23 Post by jlst »

drunkjedi wrote:
If <filename> ends with a "/" it is assumed to be a directory specification,
This line in that init readme you linked is what confused me.

Sorry to bother you.

Also could you please tell me....
pfix=ram loads pupsfs in ram, doesn't load save file.
pfix=copy loads pupsfs in ram, does it also load savefile in ram? How about savefolder?
I'll fix the trailing "/" issue.

pfix=ram: tinfoil hat, don't load savefile
pfix=copy: copy sfs's to ram.. i'm not sure about the savefile.. have to test
drunkjedi wrote:Hi jlst,

Neither psave=sda7:/tahr64save/ nor psave=sda7:/tahr64save work.
It looks like you're using an outdated tahrpup... i shouldnt mention this but if you want a puppy that is usually up-to-date, then try this:
http://murga-linux.com/puppy/viewtopic.php?t=101527

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#24 Post by gyro »

drunkjedi wrote:
If <filename> ends with a "/" it is assumed to be a directory specification,
This line in that init readme you linked is what confused me.
Thats part of the new init, not the init in tahr 6.0.5.
It means that the specification would now be better described as <partition>:<path>/<filename>.
All, some or only 1 of these elements can be defined:
psave=sdb2, specifies only the <partition>
psave=:/tahr605/, specifies only the path, the default filename will still be used.
psave=:topsavefolder, specifies only the filename, the path that is PSUBDIR will be used.

Yes, this can be a little confusing when using a savefolder, since being a directory it might be considered appropriate to have a / after it's filename, but in this situation don't.
For the purposes of this spec, a savefolder is just a file.

So,
"psave=sda7:/tahr64save" says the savefolder should be named "tahr64save" in the root directory of sda7.
"psave=sda7:/pupsaves/" says that the savefolder or savefile resides in the "/pupsaves" directory of the sda7 partition using standard savefile/savefolder names.

Hmmm..., looks like the README needs re-working.

gyro

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#25 Post by belham2 »

gyro wrote:
So,
"psave=sda7:/tahr64save" says the savefolder should be named "tahr64save" in the root directory of sda7.
"psave=sda7:/pupsaves/" says that the savefolder or savefile resides in the "/pupsaves" directory of the sda7 partition using standard savefile/savefolder names.

Hmmm..., looks like the README needs re-working.

gyro

Hi gyro,

So, completely blank sda partition (thus it is sda1), frugal install of all Tahrs, Slackos, X-slacko, etc, etc...(I have tested 12 now), and "psave=...." does not work as written above IF you have pfix=ram.

It is just incredible to me that we can set up a puppy frugally, get it all set up like we like, create a savefolder (which is what ALL pups pop up in the recommend box), and yet if we want to run in RAM-only (ala pfix=ram), we cannot have the option of loading our savefolder.

I set stuff repeatedly with how you wrote it above (for example here is X-slacko grub4dos entry):

Code: Select all

title X-Slacko 32-bit (sda1)
  find --set-root --ignore-floppies --ignore-cd /X-Slacko/puppy_xslacko_4.2.sfs
  kernel /X-Slacko/vmlinuz psave=sda1:/X-Slacko/ pfix=ram
  initrd /X-Slacko/initrd.gz
...and no matter how many ways I've tried to re-jigger things around, I cannot get any puppy, from Tahrs. to LxPupScs, to Slackos, etc, etc....they will all boot themselves FULLY into RAM but they absolutely will not take a 'savefolder' with it (or even see it). Sailor E said it is not possible to have a 'savefolder' loaded when doing a RAM-only boot, but your entry above says it can. Which is it?? If it is not available, then woof-ce should re-think this, because there are a lot of people who spoken before about wanting to run fully in RAM (with their savefolder loaded) and be able to pull out the USB stick after stuff has booted, and enjoy the OS (with their savefolder) for as long as the want knowing that they do not want to save anything on the machine shutdown.

If you're saying it can be done, can I ask exactly what then I am doing wrong in the above grub4dos example?

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#26 Post by gyro »

belham2 wrote:Sailor E said it is not possible to have a 'savefolder' loaded when doing a RAM-only boot,
Sailor E is correct.
"pfix=ram" actually signals to "init" to ignore any save layer. The idea is to return to a pristine first boot (pupmode=5), unsullied by any changes you might have made.
belham2 wrote:but your entry above says it can.
I totaly disagree.
My comment is about how the new init interprets the content of a "psave=" boot parameter, when it is using it.
It does not state anything at all about the "psave=" parameter being used with "pfix=ram".

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#27 Post by gyro »

drunkjedi wrote:pfix=ram loads pupsfs in ram, doesn't load save file.
pfix=copy loads pupsfs in ram, does it also load savefile in ram? How about savefolder?
pfix=ram, copies sfs's to ram, ignores any save layer.
pfix=copy is actually the default behaviour, i.e. copy sfs's to ram, use save layer from disk.
pfix=nocopy means don't copy sfs's to ram, use them from disk, use save layer from disk.

The only pupmode that copies saved data to ram, is a multisession cd, pupmode=77.

I have just tested the various combinations for specifying "fdrv=" and "psave=" in tahrpup 6.0.5.3, which includes the new init script. All worked exactly as expected, for me.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#28 Post by gyro »

gyro wrote:I have just tested the various combinations for specifying "fdrv=" and "psave=" in tahrpup 6.0.5.3, which includes the new init script. All worked exactly as expected, for me.
Hm.., while the current init code seems to work as expected, the code that implements the decoding of a spec, is not exactly obvious.
I'll look at producing patched code that is more obviously implementing the decoding I've outlined above.

gyro

mistfire
Posts: 1411
Joined: Wed 05 Nov 2008, 00:35
Location: PH

#29 Post by mistfire »

I found a glitch on the init script. If PMEDIA is not set or not "cd", it will not search savefiles on every partition and load it.

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#30 Post by gyro »

mistfire wrote:I found a glitch on the init script. If PMEDIA is not set or not "cd", it will not search savefiles on every partition and load it.
If you are talking about the new "init" then you haven't.
It's supposed to work that way.
gyro

jcoles
Posts: 16
Joined: Wed 08 Mar 2017, 04:11

#31 Post by jcoles »

I have exactly the same problem as drunkjedi: savefiles are created but completely ignored on boot. Many suggestions were tossed back and forth in this thread, so I'm not clear what the precise solution is (if we have one).

I've tried adding boot parameters "psave=sda8:/tahr64save" with "pmedia=cd" just to make sure, but it makes no difference. The "pmedia=satacd" suggestion didn't work either. Every boot is a first boot.

If a solution is developed, could it be summarized in really clear language as (possibly) the final post in the thread.

jcoles
Posts: 16
Joined: Wed 08 Mar 2017, 04:11

#32 Post by jcoles »

Here's my solution, YMMV:

I booted from the Live-CD tahrpup USB stick and then installed tahrpup to a second USB stick. The default boot parameters for such an install include pmedia=usbflash. In syslinux.cfg, I changed this to pmedia=satacd. When I booted from this new install, it actually searched the drives for savefiles. My savefile, which the Live-CD had always ignored, was loaded. Exactly what I wanted.

If there are multiple savefiles, a list is presented.
pmedia=usbflash permits savefiles only on the USB drive itself.

My problem, and perhaps drunkjedi's too, seems to lie in trying to use savefiles with the original "Live-CD". Few people burn CDs any more. They put the ISO onto a USB stick. It seems that what you need is a puppy installation on a USB stick. The two disks are indistinguishable by their contents. The Live-CD stick has an isofs file system, the installed tahrpup has a FAT filesystem.

Post Reply