Puppy RamBoot - Everything (including save file) in RAM

Under development: PCMCIA, wireless, etc.
Message
Author
seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#31 Post by seaside »

jemimah wrote:Maybe it's psubdir. I don't think I considered that...
That would make sense, since the pupsave file loads just fine without the "ramboot=1" option.

Mstar
Posts: 74
Joined: Fri 16 Feb 2007, 20:04

File System

#32 Post by Mstar »

Jemimah,

The frugal is on a FAT32 partition in its own subdirectory. The 2fs is the extension of the automatically generated pupsave file. I don't know if it's actually an ext2 file, but I presume it is. It's whatever Puppy creates.

Since I'm also using the psubdir command, that's a likely place to look for the problem. Here is the whole menu.lst entry:

#Rampup
title Rampup
rootnoverify (hd0,2)
kernel /Rampup/vmlinuz pemdia=satahd psubdir=Rampup ramboot=1
initrd /Rampup/initrd.gz
boot
#End Rampup

My installation quits in exactly the same way Seaside describes.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#33 Post by jemimah »

Ok, I'll check out the psubdir thing and see if I can fix it.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#34 Post by Lobster »

jemimah

(I have been eating red herrings again)
An OS started in ram
(do we have a networking booting Puppy)
would seem to be the most secure system
for instant shutdown.

Why might you want that?
Well let us say you have a Puppy droid
flying over a war zone dropping flower petals
(something I recently suggested to a former
defense minister)
Obviously you don't want your petal collection points
or flight path to fall into the hands of the militarily demented.

Droid down
No software.
The flowers are safe. :D
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#35 Post by jemimah »

I've uploaded a new version that hopefully fixes this problem. I haven't fixed the shutdown script yet though. I'll look that that later this weekend.

Lobster, I believe I read there's a way to retrieve data from RAM after the machine has shutdown. But my understanding is you have only mere seconds to do this before it's to garbled to recover. So this solution is probably secure enough for your flower bomber Puppy.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#36 Post by seaside »

jemimah wrote:I've uploaded a new version that hopefully fixes this problem. I haven't fixed the shutdown script yet though. I'll look that that later this weekend.

Lobster, I believe I read there's a way to retrieve data from RAM after the machine has shutdown. But my understanding is you have only mere seconds to do this before it's to garbled to recover. So this solution is probably secure enough for your flower bomber Puppy.
jemimah ,

Thank you very much for this update. I downloaded the new version and it worked flawlessly.

Now if I could only capture the thoughts that were in my head just after I shut down. No.... wait....that wouldn't be worth much :D

Thanks again,
s

Mstar
Posts: 74
Joined: Fri 16 Feb 2007, 20:04

Mine Works Too!

#37 Post by Mstar »

Thank you Jemimah,

The pupsave is not saved on shutdown, however. If you are going to fix it, would it be possible to include the ability to re-size it as well as save it?

Just asking, I have no idea how it would be accomplished.

Thanks again for your effort and help.

Weatherman
Posts: 1
Joined: Tue 29 Dec 2009, 22:52

Ramboot Test Results and question

#38 Post by Weatherman »

I also do not get a pupsave file to save to the USB stick upon using the modified shutdown. I get an error message that says "Boot Device not found, file not saved". I did not take the usb stick out. Everything else seems to work when booting up from USB, meaning that the modified initrd says it detects the ramboot and then proceeds to bring the usb files (including a pupsave stashed on the usb from a previously unmodified initrd) to ram as it should. Unfortunately it somehow doesn't see the boot device when it shuts down...

Is there a way to manually copy the pupsave file from ram back to the usb stick when a real save is needed? I just wasn't sure is the /mnt version of pupsave is up to date. I tried to execute the save2usb script but it just says that the save is queued and the message never leaves the screen.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#39 Post by jemimah »

I've updated the shutdown script. It is now working for me, with or without psubdir set. Please try the new version.

Remember not to trust this script with your important data. Even if the code is perfectly correct, power outages, system crashes, and attempting to copy a mounted filesystem, will try to ruin your day at the worst possible moment.

A better way is not to use the shutdown script at all, and save any documents you are working on to the hard drive (outside the save file) or to a usb stick. If you need to install software or something just boot without the Ramboot option. That way you get a completely clean version of the OS every time you boot; like a remaster, but easier.

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

I wonder if we slip a bit off drinkability...

#40 Post by potchan »

Putting everything totally to RAM limits a lot of HW tolerance Puppy is so proud of. I would limit the RAM-MANIA to those files and folders needed to speed-up the system. There's a lot of them, most of them very light, and a conclusive work of marking them as such and distinct them from others onRAM never really done. Perhaps we should have two to three initrds like initrd1.gz initrd2.gz... (one extra letter/number allowed) to let the user choose. I personally spend a lot of time wondering if separating/clouding some of RAM can open new horizons. Connections become more and more speedy, closer and closer to HD speeds abilities and reliability.
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

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

#41 Post by gyro »

jemimah,

I just tried your ramboot on a frugal install of Browserlinux355.
(Looking for a simple, secure, Internet browsing platform.)
I used the "init" script from your initrd.gz. This did not work, crashed on boot.
I then created "/mnt/tmpfs3" directory in my initrd-tree. This worked fine. Thanks.

But, just one thing:
Since my computer has 1GB of ram, ordinary puppy 431 and hence BrowserLinux355 copies pup-431.sfs to ram.
Your ramboot code copied both pup-431.sfs and pupsave2fs to ram. So I ended up with 2 copies of pup-431.sfs in ram. It just seems a waste.

I did like that it unmounted my sda1, once startup is finished, so the only mounted writable "disk" is the pupsave.2fs in ram, which then gets thrown away.

I setup 2 entries in my "menu.lst", one with ramboot=1 and one without. So if pupsave.2fs isn't right yet, I can simply reboot into a system that saves pupsave.2fs.

gyro

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#42 Post by jemimah »

gyro wrote:jemimah,
So I ended up with 2 copies of pup-431.sfs in ram. It just seems a waste.
Wait, how is it loading two copies? I explicitely set PCOPY to false and PUPMODE to 12 for Ramboot, does it actually tell you it's loading it again?

Potchan, I think you've missed the point of this project. This is only intended for specialized uses that need to have literally everything in RAM.

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

#43 Post by gyro »

jemimah wrote:Wait, how is it loading two copies?
I don't know why, but i'm pretty sure that it does.

Code: Select all

# losetup
/dev/loop0: 0 /mnt/tmpfs/pup-431.sfs
/dev/loop1: 0 /mnt/dev_save/pupBrowser/pupsave.2fs
# ls /initrd/mnt/dev_save/pupBrowser/
pup-431.sfs  pupsave.2fs
# ls /initrd/mnt/tmpfs/
pup-431.sfs
And yes the normal "loading pup-431.sfs" line during boot, has "copying to ram" at the end.

gyro

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

#44 Post by gyro »

jemimah wrote:Wait, how is it loading two copies?
I think I've found the problem:

Code: Select all

 if [ "$COPY2RAM" = "yes" -a "RAMBOOT" != "yes" ];then
should be

Code: Select all

 if [ "$COPY2RAM" = "yes" -a "$RAMBOOT" != "yes" ];then
I'll test this and report back.

gyro

Report: yes, that fixed it.

gyro

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#45 Post by jemimah »

Nice catch. I must have made missed the $ when I copied it from Puppeee. I've updated the initrd.gz in the first post.

Mitchellray
Posts: 116
Joined: Mon 07 Dec 2009, 04:30

How to clarification please - delete initrd.gz, replace, edi

#46 Post by Mitchellray »

Hello jemimah,
I was unsuccessful at my attempt to try ramboot option.
I booted Puppeee 4.31 beta_3* on my 1005HA.
I inserted another USB stick with the same and mounted it.
I deleted initrd.gz on this second stick.
I downloaded the 'new' initrd.gz to the mounted stick.
I opened syslinux.cfg and added to the end of the only line "ramboot=1" , the number one that is.
Then I downloaded the shutdown file and place it on the USB stick. I am not sure what to do with it.
The netbook would not boot off of this stick with an error saying it could not find .sfs file (something to that extent, although I could give exact if that is needed in order to re-direct my efforts)
I have started over by copying my working Puppeee on to the test USB Flash D stick and am actually on it inputting this message.
I will try the modifications again once better informed.
Mitchellray

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#47 Post by jemimah »

Puppeee already has the Ramboot modifications in it's initrd, so don't try to replace it. Just adding Ramboot=1 to should do the trick.

Mitchellray
Posts: 116
Joined: Mon 07 Dec 2009, 04:30

Ramboot worked; what about shutdown script?

#48 Post by Mitchellray »

Hello,
The ramboot=1 edit to syslinux.cfg worked and the os is loaded and the USB Flash D remains unmounted.
If I understood the first post, the shutdown script would allow for a save back to the stick as long as it has not changed its location.
If so, where and how do I add that?

(I tried to mount the USB Flash D and then save to it during a session, but the change I made, which was to add a bookmark, did not remain when I booted back up again. I don't know why I thought that would work.)
Mitchellray

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#49 Post by sunburnt »

jemimah; Puppy already has code to mirror the Save file for USB booting (I believe).
You just need to find it and make use of it for your setup...
I`m sure Barry thought of having the Save file in ram, but I see no advantage in it.
It must persist to be a Save file as you pointed out, so having it on a drive is best.

prehistoric; ### I have been suggesting a " no-union " OS for years now...

Basically the union is complex, unneeded, and requires OS resources,
but having apps. in no-union Squash files is required for my setup.
This eliminates the " loose files " of standard app. package installs.
It`s almost impossible for apps. to get viruses if they`re Squash files,
and stray file deletion is near impossible as there are few loose files.
Squash files are never installed, they`re mounted, used, and unmounted.
If Squash apps. are static compiled then there`s no dependency problems.

panzerpuppy
Posts: 632
Joined: Tue 02 Oct 2007, 07:39

#50 Post by panzerpuppy »

[deleted] Double post. See the next message.
Last edited by panzerpuppy on Tue 12 Jan 2010, 07:45, edited 1 time in total.
Turbopup Tech Support

Post Reply