Project Read Only Puppy
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.
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.
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
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.
I think Sandisk has those.
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]
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]
Re: Project Read Only Puppy
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
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
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
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).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
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]
Re: Project Read Only Puppy
That takes care of the autosave. To get the prompt at shutdown/reboot, here are Pizzagood's instructions:Béèm wrote:I just saw a comment to go in Menu|System|Puppy event manager and set 0 in the tab save session.
Works perfectly and is easily modified to never save if one desires a true read only install.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.
tgeer
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
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.
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
I think the couse is I have not the extra pup_save file, my puppy4.2 SMP can occupy entire space of usb flash.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 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.
Change like this:
Shutdown script: /etc/rc.d/rc.shutdown
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 /.
#the above are in unionfs at /.
#echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
#/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
;;
usb read only
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".
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".
Tkanks for your reply.jafadmin wrote:Change like this:
Shutdown script: /etc/rc.d/rc.shutdownThere 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
;;
I changed these two lines but Puppy still is saving session at the rebbot/shutdown.
NOW my shutdown script: /etc/rc.d/rc.shutdown
looks like this:
looks like this:
Maybe some changes are needed in red area?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`"
-
- Posts: 83
- Joined: Tue 29 Jul 2008, 12:19
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.
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.
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.
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.
Fails???
My first post - I really find puppy to be a refreshing linux variant that's carved out a niche for itself among some of the bigger distros.
Has anyone actually gotten puppy to run from a write-protected usb stick?
I'm running 4.2.1 and have disabled save-periodically, save on shutdown, and can run without any problem this way. When I shutdown, flip the switch on the flash drive to write-protected and try to boot, the kernel loads, init starts running, but drops down to a shell with the error:
No Puppy files found. Dropping out to initial-ramdisk console...
I can find this section in the init file, but haven't quite figured out the logic of what's it's doing.
Any thoughts or verifications that puppy on write-protected flash can be done in version 4 ( I had this working once back in version 2)?
Has anyone actually gotten puppy to run from a write-protected usb stick?
I'm running 4.2.1 and have disabled save-periodically, save on shutdown, and can run without any problem this way. When I shutdown, flip the switch on the flash drive to write-protected and try to boot, the kernel loads, init starts running, but drops down to a shell with the error:
No Puppy files found. Dropping out to initial-ramdisk console...
I can find this section in the init file, but haven't quite figured out the logic of what's it's doing.
Any thoughts or verifications that puppy on write-protected flash can be done in version 4 ( I had this working once back in version 2)?
Solved
OK, after looking at the init script and booting into the root shell, I manually tried to mount the write-protected flash drive - and it failed. So, of course there was no chance to load the puppy files!
Why didn't it mount? I had originally formatted the drive ext3, thinking it's more robust than ext2. However, after shutting down puppy running with the flash drive in READ/WRITE mode, it somehow got into an "unclean" state. Then, after write-protecting and booting, dmesg showed mount quietly complained that the journal needed recovery. But, with readonly access, it couldn't be recovered, so the mount failed.
Solution: switch to ext2 on the flash drive. Boot into a backup copy of puppy, and then plug in the problematic flash drive to work on it. fsck to recover the journal, then tune2fs to drop it back to an ext2.
Now, it boots beautifully, either read/write or switched into write-protected mode. Booting r/w and making some changes to the desktop, then saving and rebooting in w-p mode goes without a hitch.
I'm not sure why ext3 would get into trouble. Maybe puppy shuts down too quickly after saving and that causes journal problems? Perhaps the modified rc.shutdown (as quoted by tgeer48 above) has an ill effect. It might be interesting to see if anyone else running with "limited saves" is seeing any issues with ext3 flash drives.
Anyhow, this configuration now offers all the benefits of a true live-CD with it's guaranteed clean startup state, plus the convenience of the multisession CD mode that allows for modifications when desired - just by flipping the switch on the flash drive and rebooting. Very nice!
Combined with the firewall, Firefox running as a restricted user, and some FF addons (RequestPolicy et al), I'm fairly comfortable turning this system over to my wife for online banking.
Why didn't it mount? I had originally formatted the drive ext3, thinking it's more robust than ext2. However, after shutting down puppy running with the flash drive in READ/WRITE mode, it somehow got into an "unclean" state. Then, after write-protecting and booting, dmesg showed mount quietly complained that the journal needed recovery. But, with readonly access, it couldn't be recovered, so the mount failed.
Solution: switch to ext2 on the flash drive. Boot into a backup copy of puppy, and then plug in the problematic flash drive to work on it. fsck to recover the journal, then tune2fs to drop it back to an ext2.
Now, it boots beautifully, either read/write or switched into write-protected mode. Booting r/w and making some changes to the desktop, then saving and rebooting in w-p mode goes without a hitch.
I'm not sure why ext3 would get into trouble. Maybe puppy shuts down too quickly after saving and that causes journal problems? Perhaps the modified rc.shutdown (as quoted by tgeer48 above) has an ill effect. It might be interesting to see if anyone else running with "limited saves" is seeing any issues with ext3 flash drives.
Anyhow, this configuration now offers all the benefits of a true live-CD with it's guaranteed clean startup state, plus the convenience of the multisession CD mode that allows for modifications when desired - just by flipping the switch on the flash drive and rebooting. Very nice!
Combined with the firewall, Firefox running as a restricted user, and some FF addons (RequestPolicy et al), I'm fairly comfortable turning this system over to my wife for online banking.
Project Read Only Puppy
Hello,
I'm fairly new to Puppy and have created a read only puppy based on 4.31 with Pizzagoods modification.
Unfortunately I get the same problem like darwinev0lved. In my case it is not intermittent:
Regards
Andreas
I'm fairly new to Puppy and have created a read only puppy based on 4.31 with Pizzagoods modification.
Unfortunately I get the same problem like darwinev0lved. In my case it is not intermittent:
Any Ideas?darwinev0lved wrote: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.
Regards
Andreas
Reading, writing and updating is essential to the operation distro.
If we constrain the writing and updating to RAM only, we have for practical purposes a read only operating system.
To accomplish this in the most simple way, one would boot Puppy and not make a save file.
This is fine if you only plan to make a few boots. But for regular use it would be better to configure the pup_save file, merge it with the pup_xxx.sfs file, and modify the shutdown script to not bug you to make a pup_save file
The user would still have the option to write to devices of choice as he pleases, just that Puppy is always bit for bit the same on each boot.
If we constrain the writing and updating to RAM only, we have for practical purposes a read only operating system.
To accomplish this in the most simple way, one would boot Puppy and not make a save file.
This is fine if you only plan to make a few boots. But for regular use it would be better to configure the pup_save file, merge it with the pup_xxx.sfs file, and modify the shutdown script to not bug you to make a pup_save file
The user would still have the option to write to devices of choice as he pleases, just that Puppy is always bit for bit the same on each boot.