Kids web-kiosk running entirely in RAMDISK

A home for all kinds of Puppy related projects
Post Reply
Message
Author
xerxesb
Posts: 7
Joined: Tue 19 Mar 2013, 11:45

Kids web-kiosk running entirely in RAMDISK

#1 Post by xerxesb »

Hi everyone

I want to build a kid friendly web-kiosk for my 3yo to play one of his favourite websites.

I've toyed with puppy the last few nights, and I think it's fantastic for this purpose, but the only catch is that there's no guarantee he'll shutdown the operating system cleanly. In fact if anything there's a guarantee he WON'T shutdown properly, and so far the system has failed to boot on a couple of occasions because the HDD wasn't cleanly unmounted.

What i'd like to do is install and run puppy from the local HDD, but unmount the HDD after everything has been loaded into the ramdisk. That way if he turns off the machine, it won't be a problem.

I've tinkered a bit with the config but had no success thusfar. Hoping I could get some guidance on what I need to do to make sure that the filesystem is unmounted after it's loaded everything.

cheers!
x

ps. I've thought about Live CD/USBs, but there's no guarantee he wont snap off those components hanging off the side of the laptop, so installing to HDD is preferable. ;)

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

Re: Kids web-kiosk running entirely in RAMDISK

#2 Post by rcrsn51 »

xerxesb wrote:What i'd like to do is install and run puppy from the local HDD, but unmount the HDD after everything has been loaded into the ramdisk.
Contrary to what you may have read, the save file that acts as your persistent storage is NOT loaded into RAM. It is mounted, so you cannot unmount it during a session.

Read here for some ideas.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#3 Post by Flash »

If the computer will boot from a CD or DVD, then that might be the preferred way. Just teach the kid to turn off the computer when he's done, instead of shutting it down the Windows way. The disk stays in the computer at all times and nothing ever sticks out to break off. When the computer boots, it boots from the CD or DVD and runs entirely in RAM with the Puppy CD or DVD still in the drive.

If that operating method is acceptable to you and the computer, you could either create a multisession CD or DVD (if the computer will work with a multisession disk; some laptops won't) to include the programs and settings you want, or remaster a CD or DVD to include the programs and settings you want.

I would try the multisession approach first, as that is by far the easiest way if it will work. Use a CD-RW or DVD-RW if you can. Puppy works fine from rewritable disks. Use Burniso2cd to burn the multisession disk.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#4 Post by nooby »

If you fail with setting up Puppy
then try this Kiosk version of
Slax named Porteus Kiosk.
Only 37 M file so that would be okay.

unless the kid needs to get access to some games
you have on the HD it is all Firefox online as I get it.

http://distrowatch.com/?newsid=07751
Download from here
http://ponce.cc/porteus/i486/packages/k ... 0-i486.iso
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
ally
Posts: 1957
Joined: Sat 19 May 2012, 19:29
Location: lincoln, uk
Contact:

#5 Post by ally »


xerxesb
Posts: 7
Joined: Tue 19 Mar 2013, 11:45

#6 Post by xerxesb »

Lots of great responses - thanks :)

Probably should clarify that once configured, I don't want any of his session changes to be persisted, so if the save files were loaded into RAM that would be fine for me. If I then needed to tweak some changes, I'd boot off the livecd and mount the drive to make necessary changes.

@rcrsn51 - I think your post in that link might be the trick - i'll have to try it later tonight

@Flash - He knows how to eject the CD-try from the laptop, so my plan was to remove it altogether.

@nooby, @ally - Thanks for the links - i'll check them out :)

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#7 Post by muggins »

Have you tried getting your configuration right, then adding whatever pets you want, then running Menu>Setup>Remaster Puppy live-CD?

It might take a few attempts for you to get it right, but, when successful, you'll have a version specific to your laptop which can be powered off without any problems. (sans save-file)

xerxesb
Posts: 7
Joined: Tue 19 Mar 2013, 11:45

#8 Post by xerxesb »

i didn't know about it!

Will that force me to remaster onto a CD/DVD or can I still boot off the HDD?

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#9 Post by Ted Dog »

use a frugal install with grub

title Precise Puppy 5.5
kernel (hd0,5)/precise/vmlinuz pfix=ram
initrd (hd0,5)/precise/initrd.gz

add pfix=ram to grub line as shown above in bold

in /etc/rc.d/rc.local add:

Code: Select all

umount /dev/sda6

this example hd 0,5 is the sixth partition to match /dev/sda6 grub starts counting at zero for first partition.

get the setup however you like then run my sloppy remaster script

http://murga-linux.com/puppy/viewtopic.php?t=84742

xerxesb
Posts: 7
Joined: Tue 19 Mar 2013, 11:45

#10 Post by xerxesb »

@ted - I just tried running your script from the other thread, and I get the error message "Destination not block device or regular file"

What I did was to boot from Live USB, set up everything perfectly. Rebooted and saved my changes. After reboot, I copied the script from http://murga-linux.com/puppy/viewtopic. ... 327#690327 and ran it from rxvt

Do you know why this error might occur? It seems to be happening on or after the call to squash

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#11 Post by Ted Dog »

xerxesb wrote:@ted - I just tried running your script from the other thread, and I get the error message "Destination not block device or regular file"

What I did was to boot from Live USB, set up everything perfectly. Rebooted and saved my changes. After reboot, I copied the script from http://murga-linux.com/puppy/viewtopic. ... 327#690327 and ran it from rxvt

Do you know why this error might occur? It seems to be happening on or after the call to squash
unknown never came across this error before are you using wary/racy 5.5 without the /tmp patch?

Did you run it from command line? then it could have been a warning that some special file types are not squashable like /dev /proc etc. But should still work to finish OK.

xerxesb
Posts: 7
Joined: Tue 19 Mar 2013, 11:45

#12 Post by xerxesb »

i'm actually using BrowserLinux, which is based on Lupu 510.

Instead of the remaster script you linked to, I used the remaster LiveCD util and that built the SFS, but the drive still boots with sda1 mounted to /initrd/pup_ro1...

any thoughts?

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#13 Post by Ted Dog »

Before remaking SFS

in /etc/rc.d/rc.local add:

Code:
umount /dev/sda1



this example if booting hd 0,0 is the first partition to match /dev/sda1 grub starts counting at zero for first partition.

xerxesb
Posts: 7
Joined: Tue 19 Mar 2013, 11:45

#14 Post by xerxesb »

Yep - i have done that.

when i boot off my lupu-510.sfs image, my rc.local contains the line to unmount /dev/sda1, but it starts up mounted.

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

#15 Post by Ted Dog »

rename the savefile, boot with pfix=ram first

xerxesb
Posts: 7
Joined: Tue 19 Mar 2013, 11:45

#16 Post by xerxesb »

After a couple of days, I've managed to get something working.

It's not exactly what you were suggesting Ted, but it's also a combination of that and a lot of other posts i've read.

Basically, it starts with a frugal install. Then when i'm remastering, i provide a few changes to system files
1. I modified the rc.shutdown to not save any session information. This means any changes in that session won't be persisted and it will restore to the "clean" state every boot.
2. I modified rc.local to umount /dev/sda1. I'm not sure if this is required anymore, but I still have it.
3. I changed the GRUB menu to boot with pfix=ram to force the RAMDISK, but i'm not sure if this is required anymore given the next change
4. I modified the initrd.gz to force puppy to boot in PUPMODE=0. This tricks it into thinking it's running from the LiveCD for the first run, and won't mount any disk-drives either RO or RW. Now if my son turns off the computer without shutting down, the drive won't need a fsck.
5. I then modified ~/.xinitrc to NOT call /usr/sbin/delayedrun, and instead just execute the contents of the ~/Startup directory (this is the last thing that delayedrun does). This prevents the initial "welcome" splash screen, the getting-started HTML page and the "woof" audio.

After remastering from LiveUSB, i just drop the newly created lupu-510.sfs into my frugal install folder and it's done.

Thanks everyone for your suggestions! If you can see a problem with anything i've done, i'd appreciate the feedback :)

User avatar
Q5sys
Posts: 1105
Joined: Thu 11 Dec 2008, 19:49
Contact:

Re: Kids web-kiosk running entirely in RAMDISK

#17 Post by Q5sys »

rcrsn51 wrote:
xerxesb wrote:What i'd like to do is install and run puppy from the local HDD, but unmount the HDD after everything has been loaded into the ramdisk.
Contrary to what you may have read, the save file that acts as your persistent storage is NOT loaded into RAM. It is mounted, so you cannot unmount it during a session.

Read here for some ideas.
It is possible to load a save file into ram to run... but of course no settings are changed at shutdown. I took some of Jeminah's work and made it an option in Attackpup... but Im not at home so I'm not able to show you how I did it.
It required having a 2nd initrd with a modified init script.

Honestly, a remaster is the simplest solution.

Post Reply