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 Mon 29 May 2017, 05:51
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
The strange case of init script in initrd.gz
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [32 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
jlst

Joined: 23 Nov 2012
Posts: 571

PostPosted: Sat 28 Jan 2017, 23:52    Post subject:  

I know why it failed. It's missing psubdir=/boot

I think the file is: /boot/puppy_xslacko_4.2.sfs
but you have to confirm that.

The old behavior was to search in all subdirectories. If you had 200 directories, it would search in all of them.

Although /boot is a standard location for the kernel.. this might be solved by adding a single line after:

[ -f "${ONE_MP}${ONE_TRY_FN}" ] && ONE_FN="$ONE_TRY_FN"

this new line:
[ $? -ne 0 -a -f "${ONE_MP}/boot/${2}" ] && ONE_FN="/boot/${2}"

so what do you think...
Back to top
View user's profile Send private message 
mistfire

Joined: 04 Nov 2008
Posts: 505
Location: PH

PostPosted: Sun 29 Jan 2017, 00:10    Post subject:  

jlst wrote:
I know why it failed. It's missing psubdir=/boot

I think the file is: /boot/puppy_xslacko_4.2.sfs
but you have to confirm that.

The old behavior was to search in all subdirectories. If you had 200 directories, it would search in all of them.

Although /boot is a standard location for the kernel.. this might be solved by adding a single line after:

[ -f "${ONE_MP}${ONE_TRY_FN}" ] && ONE_FN="$ONE_TRY_FN"

this new line:
[ $? -ne 0 -a -f "${ONE_MP}/boot/${2}" ] && ONE_FN="/boot/${2}"

so what do you think...


You are right. My main SFS file was in /boot folder

Nice idea @jlist. Much better if you add another boot option/parameter to search all subdirectories.

I suggest that the subdirectory depth was 2 (for example /boot/x-slacko/ folder) in case of fully organized bootable usb or just search all subdirectories if psubdir is not specified.
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1326
Location: Brisbane, Australia

PostPosted: Tue 31 Jan 2017, 10:57    Post subject:  

mistfire wrote:
Much better if you add another boot option/parameter to search all subdirectories.

I suggest that the subdirectory depth was 2 (for example /boot/x-slacko/ folder) in case of fully organized bootable usb or just search all subdirectories if psubdir is not specified.
Why not just add "psubdir=/boot/x-slacko" as a boot parameter.

You have to specify exactly where vmlinux and initrd.gz are, to the bootloader, why not tell init exactly where the puppy files are???
This information must be known when the puppy is installed.

gyro
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 684

PostPosted: Wed 01 Feb 2017, 11:07    Post subject:  

jlst wrote:
drunkjedi wrote:

I can do this easily in fatdog with boot parameters 'savefile=location', 'basesfs=location', 'extrasfs=location'.

So my fatdog doesn't waste time searching for files and boots faster as it loads those files from hdd.

I searched for similar boot options for a puppy, didn't find them yet.


In https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/testing/initrd-progs/0initrd/README.txt

see Boot parameters:
psave=
pupsfs=
zdrv=
fdrv=
adrv=
ydrv=
While I tried what you showed for tahr64.
Here's it's entry
Code:
label tahr64-savelocation
linux /tahr64/vmlinuz
initrd /tahr64/initrd.gz
append psave=sda7:/tahr64save/
menu label Tahr64-savelocation
text help
Start Tahr64 puppylinux
endtext

Doesn't work.
I have to add pmedia=satacd for it to find my savefolder.
Back to top
View user's profile Send private message 
jlst

Joined: 23 Nov 2012
Posts: 571

PostPosted: Thu 02 Feb 2017, 15:50    Post subject:  

drunkjedi wrote:
...

How old is your tahrpup? I hope it's the one released not so long ago.

--

Ok, I created "aa" directory in sda3 (booting from sda1)

I see a grub4dos menu and press e to edit the cmd. I add
Quote:
psave=sda3:/aa


It recognizes the savefolder and continues booting as usual.

Now, what happens if I add an extra slash:

psave=sda3:/aa/

It doesn't work. So avoid adding an extra slash.

---

If I have mypsave.4fs in sda3/zz/xx, I'd add this

psave=sda3:/zz/xx/mypsave.4fs
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 684

PostPosted: Thu 02 Feb 2017, 23:07    Post subject:  

Quote:
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?
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 684

PostPosted: Fri 03 Feb 2017, 08:45    Post subject:  

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:
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'
Back to top
View user's profile Send private message 
jlst

Joined: 23 Nov 2012
Posts: 571

PostPosted: Fri 03 Feb 2017, 10:55    Post subject:  

drunkjedi wrote:
Quote:
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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1326
Location: Brisbane, Australia

PostPosted: Fri 03 Feb 2017, 13:19    Post subject:  

drunkjedi wrote:
Quote:
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
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 687

PostPosted: Fri 03 Feb 2017, 16:00    Post subject:  

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:

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?
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1326
Location: Brisbane, Australia

PostPosted: Fri 03 Feb 2017, 20:24    Post subject:  

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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1326
Location: Brisbane, Australia

PostPosted: Fri 03 Feb 2017, 20:37    Post subject:  

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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1326
Location: Brisbane, Australia

PostPosted: Sat 04 Feb 2017, 09:37    Post subject:  

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
Back to top
View user's profile Send private message 
mistfire

Joined: 04 Nov 2008
Posts: 505
Location: PH

PostPosted: Mon 27 Feb 2017, 21:14    Post subject:  

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.
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1326
Location: Brisbane, Australia

PostPosted: Tue 28 Feb 2017, 09:59    Post subject:  

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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [32 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
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.0872s ][ Queries: 14 (0.0109s) ][ GZIP on ]