| Author |
Message |
pixelblip
Joined: 23 Aug 2008 Posts: 45
|
Posted: Mon 25 May 2009, 05:15 Post_subject:
Project Read Only Puppy |
|
Hi
I wanted to make a bullet proof puppy installation (don't laugh!) that is installed into flash that is read only. It's a little project of mine I keep thinking about.
In the old days, you had computers like Acorn Archimedes that would contain the OS in Rom....just switch on and go...if it crashes switch off and then back on.........ahh the golden days..........RISC os loading up from Rom...........
Can anyone advise me how I might reproduce this scenario with Puppy Linux....I could boot from a CD (which I produce using the remaster method) - this is ok but I'd rather boot from a flash based device. So I want to remaster to a flash drive and make it non writeable....like the old days of EPROM.
Can anyone help here / advise me? Thanks for your help.
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 5988 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Now at Woof alph6 frugal
|
Posted: Mon 25 May 2009, 05:29 Post_subject:
|
|
Like in the good all days, where cassette tapes could be put in read only (remember?) there aree flash cards with a read only facility.
I think Sandisk has those.
_________________ Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Barry's help manual.
Use peppyy's puppysearch
|
|
Back to top
|
|
 |
pixelblip
Joined: 23 Aug 2008 Posts: 45
|
Posted: Mon 25 May 2009, 06:18 Post_subject:
|
|
Thanks Beem I'll take a look at that.
Mmmmm cassette tapes loading Spectrum and BBC Micro games..........what fun that was.
|
|
Back to top
|
|
 |
tgeer43
Joined: 22 May 2009 Posts: 43
|
Posted: Sun 31 May 2009, 15:12 Post_subject:
Re: Project Read Only Puppy Sub_title: Not hard to do with USB Flash install |
|
I have my 4.2.1 USB Flash install set up kind of like that, only a little better, I think. The automatic periodic save is disabled and I am prompted at shutdown to save everything or not. I get full read/write ability while I'm running but have to intentionally save the pup_save file to alter the contents of the USB install. The 'save' icon on the desktop still works, of course. It's a great way to run because now I'm pretty free to install stuff and tweak away at the system and if something goes awry then I just don't save the session. That way my installation keeps getting better and better without ever really endangering its previous incarnation.
It takes only a few minutes to set things up this way and you could bypass the save prompt on shutdown and have it never save just as easily. Pizzasgood has a couple of definitive threads on this in these forums. Let me know if you can't find what you're looking for.
tgeer
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 5988 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Now at Woof alph6 frugal
|
Posted: Sun 31 May 2009, 16:38 Post_subject:
|
|
I just saw a comment to go in Menu|System|Puppy event manager and set 0 in the tab save session.
_________________ Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Barry's help manual.
Use peppyy's puppysearch
|
|
Back to top
|
|
 |
tgeer43
Joined: 22 May 2009 Posts: 43
|
Posted: Sun 31 May 2009, 20:01 Post_subject:
Re: Project Read Only Puppy |
|
| Béèm wrote: | | I just saw a comment to go in Menu|System|Puppy event manager and set 0 in the tab save session. |
That takes care of the autosave. To get the prompt at shutdown/reboot, here are Pizzagood's instructions:
| Quote: | Shutdown script: /etc/rc.d/rc.shutdown
There should be a group of lines like this:
Code:
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
;;
Modify it to be more like this:
Code:
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
dialog --yesno "Save session?" 0 0 >/dev/console
if [ $? -eq 0 ]; then
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
fi
;;
That should make it prompt before saving on shutdown with a Flash install. |
Works perfectly and is easily modified to never save if one desires a true read only install.
tgeer
|
|
Back to top
|
|
 |
lisek

Joined: 14 Feb 2008 Posts: 74 Location: PL
|
Posted: Sun 21 Jun 2009, 14:37 Post_subject:
|
|
Hi puppians,
I have puppy4.2 SMP on usb stick. [thanks aragon!]
I turned off the periodic 'save session' in Puppy Event Manager.
The installation is done without the pup_save file that is the saving session is done directly to entire usb flash during the rebbot/shutdown - not to pup_save file.
I would like none saving session and none prompt to save sesison during the reboot/shutdown. I wish to use the save-desktop icon when I need it.
So this method does't work for me:
Shutdown script: /etc/rc.d/rc.shutdown | Quote: |
There should be a group of lines like this:
Code:
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
;;
Modify it to be more like this:
Code:
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
dialog --yesno "Save session?" 0 0 >/dev/console
if [ $? -eq 0 ]; then
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
fi
;;
|
I think the couse is I have not the extra pup_save file, my puppy4.2 SMP can occupy entire space of usb flash.
I don't know how to change the code. Anyone helps?
Thanks to all who do superb work for puppy project and help the begginers like me via forum. I really appreciate this.
_________________ regards - lisek
|
|
Back to top
|
|
 |
jafadmin
Joined: 19 Mar 2009 Posts: 158
|
Posted: Sun 21 Jun 2009, 16:49 Post_subject:
|
|
Change like this:
Shutdown script: /etc/rc.d/rc.shutdown | Quote: |
There should be a group of lines like this:
Code:
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
;;
Modify it to be more like this:
Code:
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
#the above are in unionfs at /.
#echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
#/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
;;
|
|
|
Back to top
|
|
 |
kilon
Joined: 19 Jun 2009 Posts: 17
|
Posted: Mon 22 Jun 2009, 02:58 Post_subject:
|
|
I would like to thank pizzagod and all people here for posting this , as I had a similar question in another thread. Thanks
|
|
Back to top
|
|
 |
sky king
Joined: 08 Apr 2009 Posts: 71
|
Posted: Mon 22 Jun 2009, 03:49 Post_subject:
usb read only Sub_title: with SD cards |
|
You could use a USB SD card reader or if you have a SD slot, no reader required. After getting it set up, set the switch to lock the card. At least I think that's the way they work. Never have used the little switch on one yet. Maybe some thumb drives have a switch, too.
There's yer classic reference, too. A switch like a (small) floppy has on it. The old IBM 8" or even 5"ers didn't have that, they were really "floppy".
|
|
Back to top
|
|
 |
lisek

Joined: 14 Feb 2008 Posts: 74 Location: PL
|
Posted: Mon 22 Jun 2009, 09:37 Post_subject:
|
|
| jafadmin wrote: | Change like this:
Shutdown script: /etc/rc.d/rc.shutdown | Quote: |
There should be a group of lines like this:
Code:
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
;;
Modify it to be more like this:
Code:
13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
#the above are in unionfs at /.
#echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
#/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
;;
|
|
Tkanks for your reply.
I changed these two lines but Puppy still is saving session at the rebbot/shutdown.
_________________ regards - lisek
|
|
Back to top
|
|
 |
lisek

Joined: 14 Feb 2008 Posts: 74 Location: PL
|
Posted: Mon 22 Jun 2009, 12:16 Post_subject:
|
|
NOW my shutdown script: /etc/rc.d/rc.shutdown
looks like this:
| Quote: | 13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has pup_save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
#echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
#/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
;;
128) #1st shutdown, save to pup_save.2fs.
#partition already mounted on $SMNTPT.
echo "Saving session to $SAVEFILE file on $SAVEPART partition..." >/dev/console
mkdir /tmp/save1stpup
echo -n "Mounting ${SAVEFILE}..."
FILEFS="ext3"
[ ! "`echo -n "$SAVEFILE" | grep "2fs"`" = "" ] && FILEFS="ext2"
if [ "$CRYPTO" = "" ];then
mount -t $FILEFS -o noatime,rw,loop $SMNTPT$SAVEFILE /tmp/save1stpup
else
#note: loop2 is kept available for scripts to use. but, do this to find free one...
DEVLOOP="`losetup-FULL -f`"
|
Maybe some changes are needed in red area?
_________________ regards - lisek
|
|
Back to top
|
|
 |
darwinev0lved
Joined: 29 Jul 2008 Posts: 26
|
Posted: Fri 25 Sep 2009, 11:30 Post_subject:
|
|
Hi, I changed the shut down script as Pizzagood suggested and it shuts down without saving. Brilliant. I've got Puppy set up as I want it and don't want to worry about changing it Only thing is - when I restart it, I get the warning screen saying that X seems to have exited uncleanly.
Is this something to worry about or not? Is there something to fix?
Puppy 430, frugal install, booting off a usb stick.
Regards, Jon.
Actually, this seems to be intermittent (which is code for: it's stopped, but I don't know why ...)
So: Pizzagood rules, Puppy is great.
|
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 6333 Location: Arizona USA
|
Posted: Fri 25 Sep 2009, 16:24 Post_subject:
|
|
SD memory cards have a write-protect switch. I know because I've accidentally switched it on. It took me a while to figure out why the card wouldn't let me write to it any more.
I have a universal SD-to-USB converter, that I bought for about $15. I plug my camera's SD memory card into it so I can read the card without having to connect the camera to my computer. It's a two-piece solution to your problem.
|
|
Back to top
|
|
 |
alienjeff

Joined: 08 Jul 2006 Posts: 2173 Location: Winsted, CT - USA
|
Posted: Fri 25 Sep 2009, 16:37 Post_subject:
|
|
Appears that OP pixelblip has fallen off the edge of the earth ...
_________________ hangout: ##arch-ftw on irc.freenode.net
diversion: http://alienjeff.net - visit The Fringe
quote: "The foundation of authority is based upon the consent of the people." - Thomas Hooker
|
|
Back to top
|
|
 |
|