| Author |
Message |
usbguy
Joined: 07 May 2012 Posts: 8
|
Posted: Mon 07 May 2012, 11:35 Post subject:
Two save files, Two partitions, One USB stick Subject description: How to specify which .2fs puppy save file to use prior to boot |
|
Two puppies (lupu 528), Two save files, Two partitions, One USB stick
How to specify which .2fs puppy save file to use prior to boot ?
I have tried pdev=sda1/sda4 (etc) on the syslinux bootloader line to no avail.
How can I boot to puppy on usb partition 4 and have it automatically load the save file found right there, on partition 4, and NOT load the one on partition 1 and NOT search for it and ask which one I want ??
Thanks
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2218 Location: near here
|
Posted: Mon 07 May 2012, 11:44 Post subject:
|
|
psubdir might do the trick - is the savefile in the root directory?
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
usbguy
Joined: 07 May 2012 Posts: 8
|
Posted: Mon 07 May 2012, 17:48 Post subject:
|
|
@darkcity
Thanks for the quick reply! I tried your suggestion but still no luck. Yes, the .sfs files are in the root dir of the partition.
Something is hosed now, because even after deleting all files and pasting them back from a working backup, (with no sfs files in partition 1) it's complaining that it can't find the local partition 4 sfs files, even with the pdev & psubdir flags both removed. This worked fine before. Must be some residue somewhere.... time to clean house.
One thing that wasn't clear to me from your post was whether or not I should remove the pdev flag or use it in conjunction with psubdir, so I tried both with and without it. I also tried psubdir=sda4, /sda4, /dev/sda4, /mnt/sda4.
I'm not clear exactly when my mount points get created during the boot process in relation to searching for the puppy 2fs file... Is /mnt/sda4 valid prior to the search? Thinking if my scripts to create and mnt are contained in the 2fs file, then probably not?
I'll post more tomorrow after some more testing. Time to go here.
Cheers
|
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 936 Location: Queensland Australia ɹǝpu∩uʍop
|
Posted: Mon 07 May 2012, 21:11 Post subject:
|
|
Edit the syslinux.cfg, usb installs only look for the saves on the same partition it's installed on.
make it think it's a CD and then it will search all partitions for save files, works for me.
| Code: | | default vmlinuz initrd=initrd.gz pmedia=cd |
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2218 Location: near here
|
Posted: Tue 08 May 2012, 06:02 Post subject:
|
|
Just to confirm, Puppy finding both Savefiles and asking which you want?
Is your boot partition sda1? how come the second partition is sda4 and not sda2?
---
I have several puppies frugally installed on one hard-drive partition, they all have there own directory and psubdir works for them.
---
If you never want to load the savefile on sda1 a work around could be to change its extension, ie lupusave-name.2fsbackup
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
nooby
Joined: 29 Jun 2008 Posts: 9479 Location: SwedenEurope
|
Posted: Tue 08 May 2012, 07:32 Post subject:
|
|
"I have tried pdev=sda1/sda4 (etc) on the syslinux bootloader line to no avail.
How can I boot to puppy on usb partition 4 and have it automatically load the save file found right there, on partition 4, and NOT load the one on partition 1 and NOT search for it and ask which one I want ?? "
First take a look at this thread?
http://www.murga-linux.com/puppy/viewtopic.php?t=77417
That give you some perspective on booting from usb? and my advice is from a total noob so have that in mind and The others on the forum can give you better advice than I can but in case
very few get active you could try this.
if you want to use grub4dos in case syslinux fail to use psubdir like this
title Puppy Lucid 528 on sda1
find --set-root --ignore-floppies /lucid528sda1/initrd.gz
kernel /lucid528sda1/vmlinuz pmedia=usbflash psubdir=lucid528sda1 pfix=fsck
initrd /lucid528sda1/initrd.gz
title Puppy Lucid 528 on sda4
find --set-root --ignore-floppies /lucid528sda4/initrd.gz
kernel /lucid528sda4/vmlinuz pmedia=usbflash psubdir=lucid528sda4 pfix=fsck
initrd /lucid528sda4/initrd.gz
maybe a crude version that can be more elegant. The others will tell you
the program grub4dosconfig in the Menu > Setup > grub4dos bootloader config can set it up on the USB don't tell it to do it on the HD
_________________
I'm a noob so I use Google Search of Puppy Forum
|
|
Back to top
|
|
 |
usbguy
Joined: 07 May 2012 Posts: 8
|
Posted: Tue 08 May 2012, 10:28 Post subject:
|
|
Wow, lively forum! Many thanks for all the replies and new ideas to try.
@Geoffrey: Actually that is the exact opposite of what I want and am trying to fix. It did allow me to try the pmedia=cd just to see what it would do and learn something new, so tx for that.
@Nooby: I checked out that thread, tx. There indeed may be something there wrt boot speed issues, etc, but unfortunately there really wasn't a solution. I don't have the luxury to switch to grub4dos atm, but appreciate the suggestion and examples.
@Darkcity: Bingo! Your example of having multiple puppy saves on the same partition gave me the probable solution: Forget two installs on diff partitions altogether and just copy the save file from part1 to part4 and then try the psubdir flag idea. No need to fix something if there's a better way to do it in the first place. Haven't tested yet, but am optimistic this will work, since there will be no other install to confuse matters.
Since yesterday:
I did run an interesting test: started with a 'clean' usb stick. Put puppy on Part 4 and ran it. Ran fine. Then I copied all of puppy back on Part 1, but did not run it yet. Booted part 4 again, and it still worked just fine. Hmm. Then I ran puppy from Part 1, and that worked too. Almost thought it had 'fixed itself' for a moment there..but knew better... so re-ran from part 4: It errored and loaded the part 1 file again! So clearly, something 'contaminates' or 'remembers' and it seems impossible to fix from that point forward.
Things like syslinux, clonezilla, etc. all seem to have a very straight forward boot flag that works. ie: kernel=/live/dir1 bootfrom=/dev/sdb4. There is no 'searching' every partition on every drive and muddling things up. Guess I don't get why puppy seems to taken a different path. I would assume it has to mount the partition it's booting from and unless told otherwise would just load the files in it's own root. (kinda like having to tell your computer NOT to boot of some network drive and having to try to fix it when it keeps doing it anyway). No worries though, I still love Puppy.
(the reason its on part 4 and not part 2 is just legacy: the addition of puppy to part 1 came later and the others are being used)
I'll let you know shortly if the single partition idea worked out.
Thanks again!
|
|
Back to top
|
|
 |
nooby
Joined: 29 Jun 2008 Posts: 9479 Location: SwedenEurope
|
Posted: Tue 08 May 2012, 15:37 Post subject:
|
|
I hope somebody that knows what is going on will help you.
Try to search for it. My ppor memory tells me that it is soemthing
with syslinux that does not allow it to use psubdir but I can be wrong
so it catch the first savefile and loads that one.
So somebody that knows has to give you advice or you have to test things out on your own.
My wild guess is that you should be able to search for examples of somebody having done something similar before and see the solution in that example.
_________________
I'm a noob so I use Google Search of Puppy Forum
|
|
Back to top
|
|
 |
usbguy
Joined: 07 May 2012 Posts: 8
|
Posted: Tue 08 May 2012, 17:50 Post subject:
|
|
It appears putting both saves on the same partition and using the psubdir=myfolder worked. It didn't like the =/mnt/sda4 syntax. Apparently the root / boot dir is assumed. I found a thread on Barry's Blog that spoke to the extra .sfs files too and whether or not to put them in the root dir or the psubdir. Both should work.
So it appears I have an acceptable work-around (and better impl) for my original problem. It still doesn't explain how or why puppy seems to remember where it last booted from and load that by default over the local save files. The incorrect syntax does explain some of the behavior I saw.
Thanks again to everyone for their time and suggestions.
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2218 Location: near here
|
Posted: Tue 08 May 2012, 18:06 Post subject:
|
|
I guess Puppy is different from other distro in that its default is to work frugally and can load into ram.
its worth reading the following page if you haven't already. especially the part on layered file-systems which can get mighty confusing.
http://puppylinux.com/development/howpuppyworks.html
---
the question remains, could you load a savefile from usb non-boot partition in preference to one on the boot partition? is it just a case of getting the right syntax?
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
nooby
Joined: 29 Jun 2008 Posts: 9479 Location: SwedenEurope
|
Posted: Wed 09 May 2012, 01:31 Post subject:
|
|
| usbguy wrote: | It appears putting both saves on the same partition and using the psubdir=myfolder worked. It didn't like the =/mnt/sda4 syntax. Apparently the root / boot dir is assumed. I found a thread on Barry's Blog that spoke to the extra .sfs files too and whether or not to put them in the root dir or the psubdir. Both should work.
So it appears I have an acceptable work-around (and better impl) for my original problem. It still doesn't explain how or why puppy seems to remember where it last booted from and load that by default over the local save files. The incorrect syntax does explain some of the behavior I saw.
Thanks again to everyone for their time and suggestions. |
In case others have same problem it could be a good thing to share
exactly what you did to get it going?
And if you feel you have solved or gotten it solved then maybe do this.
| Quote: | | Two save files, Two partitions, One USB stick [Solved] |
_________________
I'm a noob so I use Google Search of Puppy Forum
|
|
Back to top
|
|
 |
usbguy
Joined: 07 May 2012 Posts: 8
|
Posted: Wed 09 May 2012, 08:59 Post subject:
|
|
@darkcity: Agreed. I'm about to test exactly that and will post the results. Now that I have the syntax correct, I should be able to mix and match installs and save files, and even resolve my original problem. I looked at that link too, tx. Wow. Some of that I've seen before, but def not all.
@nooby: thx for the suggestions. My next post 'should' be my last in this thread and assuming it works, I will mark this matter [solved] and post exactly what I did.
Hold tight...
|
|
Back to top
|
|
 |
usbguy
Joined: 07 May 2012 Posts: 8
|
Posted: Wed 09 May 2012, 11:29 Post subject:
Two save files, Two partitions, One USB stick [SOLVED] |
|
I was finally able to convince two puppies to play nice on one usb stick using darkcity's original idea, albeit with an all-import syntax change.
*** From syslinux.cfg ***
kernel vmlinuz
append initrd=initrd.gz pmedia=usbflash psubdir=/subdir/subdir2
****
I placed both the savefile .2fs and the rest of the .sfs files in subdir2, (although it seemed to work ok before with only the savefile in the subdir and the extra .sfs files left in the root also)
I went two levels deep just as extra insurance to avoid the default drive scan behavior, which Barry said searches only one dir deep.
Note Barry also said the initial / is optional after psubdir=...
I also had been using pdev=sda1 or 4 but it didn't seem to effect it. Came to find out later (no one corrected my original post) the correct parameter is pdev1 (note the 1). Regardless, this idea works fine without it.
Note there was no need to specify the partition in the psubdir path. Must use the one it booted from as the default root.
Thanks again to the cool catz in this dog pound
M
|
|
Back to top
|
|
 |
|