How to have Puppy regulate saves to flash drive?

Booting, installing, newbie
Message
Author
User avatar
CEL
Posts: 24
Joined: Sun 02 Sep 2007, 21:58

How to have Puppy regulate saves to flash drive?

#1 Post by CEL »

Hi, everyone. I have recently started using Puppy Linux with my ASUS Eee PC (thanks to dvw86's helpful notes!) but I have encountered a problem:

I understand that Puppy should buffer writes to the save file when it detects that it is on flash memory. However, it hasn't been working for me. The computer has flash memory as its hard drive, and I have set pmedia=ideflash to give Puppy the hint, but still the save file is being "mounted directly top layer" and the "save" icon is not appearing on the desktop.

I would rather not go through the Universal Installer now because I have already set up Puppy with GRUB and am keeping, for now, the option of booting the default Xandros. I have tried Pupeee but currently am using wNOP. Since I would like my hard drive to last as long as it can, could someone please explain to me how to make Puppy realize it is on flash?

Thanks,
cel

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#2 Post by Béèm »

You didn't specify the version you are using.
I have used with dingo a pup_save on a usb stick.
At regular intervals, it saves, a msg at the top is saying so.
I am not sure, but I think the 'save' button has been abandoned.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
CEL
Posts: 24
Joined: Sun 02 Sep 2007, 21:58

#3 Post by CEL »

I am using wNOP v0.2; Puppy 3.01. The problem is that it isn't saving at regular intervals, because it doesn't seem to recognize that it is running on flash media.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#4 Post by Béèm »

I had not realized your boot media is the flash card.
I boot (frugal) from disk, so I don't have the PMEDIA parameter.
I suppose you need that PMEDIA parameter to boot correctly from the flash card.
Sorry, I have no experience in such a set-up.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
CEL
Posts: 24
Joined: Sun 02 Sep 2007, 21:58

#5 Post by CEL »

The pmedia parameter (ideflash) doesn't help. even though it sounds like it should. Thanks anyway

User avatar
CEL
Posts: 24
Joined: Sun 02 Sep 2007, 21:58

#6 Post by CEL »

Any ideas, anyone? I would much appreciate it!

Bruce B

#7 Post by Bruce B »

One think one must never do is move a pup_save file that was originally saved to a hard disk to a flash stick. Not that it seems you did this.

If you want a save icon, along with the benefits of periodic writing rather than constant writing, install pup_save on a flash stick, make sure the save icon is there, then move it to your other location, the flash drive.

There are undoubtedly other ways. But the way I suggest is an expedient that I think (hope) should solve the problem of not having a save icon.

User avatar
CEL
Posts: 24
Joined: Sun 02 Sep 2007, 21:58

#8 Post by CEL »

Thanks for the info, Bruce. I'll try that method and see if it helps.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#9 Post by rcrsn51 »

@Bruce B: Could you clarify your comment about never moving a pup_save file from a hard drive to a flash drive? Whenever I have done this, Puppy automatically updated the file /etc/rc.d/PUPSTATE to reflect the change in location. In particular, it modified the value of the PUPMODE variable from 12 to 13. Then it started making periodic saves to the flash drive exactly as would be expected.

Bruce B

#10 Post by Bruce B »

rcrsn51 wrote:@Bruce B: Could you clarify your comment about never moving a pup_save file from a hard drive to a flash drive? Whenever I have done this, Puppy automatically updated the file /etc/rc.d/PUPSTATE to reflect the change in location. In particular, it modified the value of the PUPMODE variable from 12 to 13. Then it started making periodic saves to the flash drive exactly as would be expected.
Sure, my comment is based on something Barry posted. You were contributing on the same topic.
BarryK wrote:I hope that you didn't copy the 'pup_save' file from the hard drive?

You bootup from usb without any pup_save, and create it on first shutdown.
I took it as something one should not do. This was in 2.16 days also, so maybe something changed.

http://www.murga-linux.com/puppy/viewtopic.php?
t=18379&search_id=1687296383

I wanted to post a nicely formatted link to the topic but it didn't work. Don't know why.

Most important is behavior. You can make a pup_save file on hard disk, move it to USB Flash, the save icon shows up and it behaves properly? If so, then I'll change my understanding accordingly.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#11 Post by Béèm »

Bruce B wrote: http://www.murga-linux.com/puppy/viewtopic.php?
t=18379&search_id=1687296383

I wanted to post a nicely formatted link to the topic but it didn't work. Don't know why.
Just highlight the link in the composition window and click on the URL tag. :wink:
Like this. :)
http://www.murga-linux.com/puppy/viewto ... 1687296383
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#12 Post by rcrsn51 »

@Bruce B: You may be right about how older versions of Puppy handled this situation. However, when I copied a Dingo savefile from a hard drive to flash drive, it was actually smart enough to put the "Save" icon on the new desktop.

It would be interesting to know from CEL what value the PUPMODE variable has in his setup. It sounds like Puppy is mistakenly treating "ideflash" as the same as "idehd" and making it PUPMODE=12.

There is a converse situation that may also be incorrect. If you put an actual hard drive in a USB enclosure, you would expect it to be treated as a regular frugal install with PUPMODE=12. But the last time I checked, it was treated as a flash drive. This causes Puppy to ignore a swap file/partition which it should be able to use without fear of excess writes.

Perhaps BarryK can comment.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#13 Post by Béèm »

There is a problem going on in the French group, where a full install of Toutu is considered as pupmode=5 Bizarre.
Should be 2
Toutou is at 3.01.2
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

ideflash and PUPMODE

#14 Post by Marv »

Yes, PUPMODE=13 is not set correctly by ideflash. I have edited init (in initrd.gz) using the editing guides in the 301 release notes to patch this by adding the following line after line 506 in init:
[ "$PMEDIA" = "ideflash" ] && PUPMODE=13

A note on this editing. To get cpio to extract everything, I had to open up the permissions on the working directory fully using chmod 1777. I created it in my /tmp directory which already had been chmod 1777 to get syslinux to run. I spun my wheels for quite a time trying to work on a usbflash before getting this.

A bit rude but finally the pmedia=ideflash results in PUPMODE 13 and 'save' on my frugal installs to ideflash cards.

On the moving the Pup_Save file back and forth from idehd to usb. If the pmedia parameter is not set in syslinux.cfg, the usb is detected correcctly and 'save' results. If the pmedia parameter is passed as ideflash or (as I recall) usbflash, the save mode is not enabled correctly for either with the unpatched init.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
CEL
Posts: 24
Joined: Sun 02 Sep 2007, 21:58

patched initrd.gz?

#15 Post by CEL »

@Marv:

Great, that sounds like exactly the solution to my problem. I also found information about it at this topic. But, I wasn't able to put together the initrd with cpio—I would just get a kernel panic on startup. Could you possibly send me your patched initrd.gz so I could use that instead?

I find it odd that this isn't already implemented in Puppy… I guess not many people use a flash hd.

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

ideflash and PUPMODE=13

#16 Post by Marv »

Ok, I'll try and upload the patched file. By the way, I had kernel panics with the edited initrd.gz until I opened up the privileges on both the host directory and the working directory for the cpio editing. cpio wasn't able to extract many /dev/xxx files and when recompressed gave pretty much what you describe.

Sorry, the correct initrd.gz is over 1Mb so I can't upload it. I'll try later.
Last edited by Marv on Sat 12 Apr 2008, 05:31, edited 2 times in total.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
CEL
Posts: 24
Joined: Sun 02 Sep 2007, 21:58

#17 Post by CEL »

Well I tried using that file but now it won't start up successfully, giving "ERROR. cannot find Puppy on 'ideflash' boot media. PUPMODE=1 PDEV1= …"
Thanks also for the tip about working with cpio. I will try this again later when I have more energy.

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#18 Post by Marv »

Sorry CEL, the patched initrd file is over the size limit for an upload so what you got wouldn't work. I'll think on how to get it to you tomorrow.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
dinky
Posts: 699
Joined: Sat 19 Jan 2008, 23:39

#19 Post by dinky »

Hi CEL, I'm also really interested in this. I'm using TigerPup, which is a Compiz-Fusion derivitave of wNOP and NOP, on an eeepc. Same issue to the letter. Am not interestedin wearing out the internal memory... also not that interested in running Xandros.

Not sure about getting it to magically appear on the desktop, but the script you're looking for is in /usr/sbin/save2flash. I created a launcher on the panel for this in TigerPup, for use when installed on a usb. My init is different, as I'm using Pebble, so I'll have a go at editing it and let you know how I get on. I'm able to post things on my website, though I'm not sure that willhelp you, as the script will be different. Let me know if you find a solution. Another thought, is it possible this might work with a fat1 or fat32 partition? Puppy 3.01 (using that) won't create a usable save file that's heavily encrypted uunless it's on a fat partition.. so I have been using it. The eeepc's internal card is Linux by default.. I wonder if it might detect it's running on flash if it's fat? Unsure, but will try and give it a go. Cheers.
~dinky

User avatar
dinky
Posts: 699
Joined: Sat 19 Jan 2008, 23:39

#20 Post by dinky »

Hi CEL, easily solved, just edited my init script tonight and am now running from TigerPup with a recognised flash card. Hairy Will gave me some threads to follow here: http://www.murga-linux.com/puppy/viewtopic.php?t=29620

Also found these threads useful:
http://www.murga-linux.com/puppy/viewtopic.php?t=13430
http://www.murga-linux.com/puppy/viewto ... 357#187357

The second one from pizzapup was VERY easy for me to follow, and I had the init file edited in no time. Good luck! I'll try and add this to future versions of TigerPup. Cheers.
~dinky

Post Reply