Make Puppy recover automatically from improper shutdowns
- SilverPuppy
- Posts: 143
- Joined: Fri 29 May 2009, 02:21
Why not full installation, people?
I do understand the portable environment benefits of Puppy, but that said, why wouldn't you just do a full install on a small partition in this situation? Then you can use my files and have recovery fully automated, and everything wonderful!
Not only can it automatically fix the problems idiots introduce by dumping computers in a heap instead of turning them off nicely, but you also experience the following benefits running full vs. frugal:
1. The SFS system uses RAM, as everything else does. Running off a LiveCD I've observed as much as 17MB of additional RAM usage compared to a full install.
2. The SFS decompression takes up a significant amount of CPU time on low-powered computers. Running full installations removes this load as well.
I would recommend using EXT3 when you do, as the journaling makes it easier for fsck to fix things, but that's just a fringe benefit.
Not only can it automatically fix the problems idiots introduce by dumping computers in a heap instead of turning them off nicely, but you also experience the following benefits running full vs. frugal:
1. The SFS system uses RAM, as everything else does. Running off a LiveCD I've observed as much as 17MB of additional RAM usage compared to a full install.
2. The SFS decompression takes up a significant amount of CPU time on low-powered computers. Running full installations removes this load as well.
I would recommend using EXT3 when you do, as the journaling makes it easier for fsck to fix things, but that's just a fringe benefit.
Fixed inode count problem Puppy 4.31 frugal
I kept running e2fsck on pupsave.2fs and new errors kept developing. Copied the files from one 2 GB hard disk without UDMA support to a slightly newer one with UDMA support which runs twice as fast. No more errors. Normally frugal install can recover from improper shutdown. I had too many unfixable crashes with full install that e2fsck could not fix.
Only the pupsave.2fs file ever got the bad inodes so I ignored it and started fresh. DOS works okay on that drive. Puppy works on a 400MB drive without UDMA.
With 256MB RAM, I don't worry about losing 17MB of it. Puppy does run faster from memory than from hard disk on older computers (at 300MHz it was up to 5 sec between click and program appearing on screen). The full install appears not to load into RAM.
Only the pupsave.2fs file ever got the bad inodes so I ignored it and started fresh. DOS works okay on that drive. Puppy works on a 400MB drive without UDMA.
With 256MB RAM, I don't worry about losing 17MB of it. Puppy does run faster from memory than from hard disk on older computers (at 300MHz it was up to 5 sec between click and program appearing on screen). The full install appears not to load into RAM.
I am using a full install. of 431 please explain how to use your files. i had a couple of bad shut downs but after typing reboot it came back, i am a newbie to this and don't know if i am using ext 2 or ext 3 and if that matters. Since this is an old p3 256mb ram lap top with a dead motherboard bat and pc bat i use the power cord that sometime falls off. BUT with pup this thing is really fast and i love it.
This thread has been very interesting. Thanks for the interesting scripts you pieced together. I actually had a problem this sunday. I was running terminal in a secure session and decided to reboot puppy 4.31 by using the 'reboot' command. Waited a while and never regained ssh control of the puppy linux box remotely. Showed up at the client and it was stuck at the root prompt #. The USB Keyboard wasn't working. Wound up reinstalling Puppy 4.31. It happened again this afternoon. I thought it was a rare situation until I typed 'reboot' again and it seems that it doesn't cleanly reboot the computer. Anyhow my question is if I plug in a PS/2 keyboard and I have access to the root prompt. Can I just install the 4.31 files into the /etc/rc.d folder and change their permissions and run it after whatever damage was done to the file system or is it too late already and should I reinstall puppy again for the 2nd time.
Hello all this is my first post on this site. I have found your topic to be very interresting and have attempted to follow along. but have been unsuccessful. I have a old gateway 700c that i have been fixing for my daughter and would really like to get this to work. any help would be appreciated. I have backed my original files and have even altered them to match yours silverpuppy. but am unable to boot off hard drive. I am using puppy 4.3.1. thanks in advance
- SilverPuppy
- Posts: 143
- Joined: Fri 29 May 2009, 02:21
Sounds like a classic case of.....
OOPS!
I think your mouse problem is that you picked the wrong rc set. If you put the 4.1 set with 4.3, there's no telling what will happen. At the least, it will act more like 4.1.
As for working intermittently, I have never had problems with that. Properly configured, this works every time. I have dumped test machines several times, and they always recovered to a happy X.
That said, my test machines were all real.....I have no idea what will happen in a virtual machine. Use at your own risk there.
Tmay who can't boot: did you load grub properly? Did it boot before you changed the files out? Did you use the correct set of files? You'll have to be MUCH more specific about the behavior you're getting if we're to be able to help.
Nassausky, I have noticed that if you type reboot in a terminal on Puppy, it will throw a fit. I've only ever tried it in a local RXVT, but I'd imagine that it might do the same thing when you're logged in with telnet-ish (I presume that's what you did, sorry, I'm still rather addicted to doze....) ....I'd presume that you can just dump the files in and boot it for repair, but do note that you'll have to do 2 things: verify that the partition matches in the e2fsck line, and create a file called /tmp/RUNNING (can be empty) so that it realizes that it was improperly shut down.
Hope that helps....believe it or not, I'm actually somewhat new to Linux, but I understand the way it thinks pretty well because of my childhood DOS and BASIC life.
I think your mouse problem is that you picked the wrong rc set. If you put the 4.1 set with 4.3, there's no telling what will happen. At the least, it will act more like 4.1.
As for working intermittently, I have never had problems with that. Properly configured, this works every time. I have dumped test machines several times, and they always recovered to a happy X.
That said, my test machines were all real.....I have no idea what will happen in a virtual machine. Use at your own risk there.
Tmay who can't boot: did you load grub properly? Did it boot before you changed the files out? Did you use the correct set of files? You'll have to be MUCH more specific about the behavior you're getting if we're to be able to help.
Nassausky, I have noticed that if you type reboot in a terminal on Puppy, it will throw a fit. I've only ever tried it in a local RXVT, but I'd imagine that it might do the same thing when you're logged in with telnet-ish (I presume that's what you did, sorry, I'm still rather addicted to doze....) ....I'd presume that you can just dump the files in and boot it for repair, but do note that you'll have to do 2 things: verify that the partition matches in the e2fsck line, and create a file called /tmp/RUNNING (can be empty) so that it realizes that it was improperly shut down.
Hope that helps....believe it or not, I'm actually somewhat new to Linux, but I understand the way it thinks pretty well because of my childhood DOS and BASIC life.
- SilverPuppy
- Posts: 143
- Joined: Fri 29 May 2009, 02:21
Please review.....
EXT2 or EXT3 doesn't strictly matter, but in your situation I suggest EXT3 because the journaling makes it a bit more forgiving, albeit it does give you slightly less usable space and slightly worse write performance.DarinB wrote:I am using a full install. of 431 please explain how to use your files. i had a couple of bad shut downs but after typing reboot it came back, i am a newbie to this and don't know if i am using ext 2 or ext 3 and if that matters. Since this is an old p3 256mb ram lap top with a dead motherboard bat and pc bat i use the power cord that sometime falls off. BUT with pup this thing is really fast and i love it.
If you start at the top and read down, I think you'll understand deployment pretty well.
- SilverPuppy
- Posts: 143
- Joined: Fri 29 May 2009, 02:21
RAM it?
You're right, it doesn't. I prefer that behavior. I don't see the sense either of storing the entire OS and the core apps in RAM all the time, or of constantly compressing and decompressing stuff to make that possible. It does slow things down, and very noticeably on old original Pentium machines that are a bit more CPU-cycle starved.sindi wrote:With 256MB RAM, I don't worry about losing 17MB of it. Puppy does run faster from memory than from hard disk on older computers (at 300MHz it was up to 5 sec between click and program appearing on screen). The full install appears not to load into RAM.
But to each their own. That's Linux for you!
Power Failure
Hey guys,
I am trying to use puppy 4.3.1 as a terminal services (RDP) client. I am using the PCTSCscripts to accomplish this.
The problem is that when ever a user resets the computer or there is a power failure it loops trying to start X. I have tried the methods suggested in this thread and various other threads on this forums but it still seems to be broken.
Here is a list of files that I have edited:
rc.sysinit
rc.shutdown
I have attached the file that pctsc uses to call pctsc.auto.tsc which runs rdesktop.
Any help solving the power issue will be greatly appreciated
EDIT: Oh and the filesystem im using is ext3, full-HD install
I am trying to use puppy 4.3.1 as a terminal services (RDP) client. I am using the PCTSCscripts to accomplish this.
The problem is that when ever a user resets the computer or there is a power failure it loops trying to start X. I have tried the methods suggested in this thread and various other threads on this forums but it still seems to be broken.
Here is a list of files that I have edited:
rc.sysinit
Code: Select all
busybox mount -t proc none /proc ;STATUS=$((STATUS+$?))
if [ -f /RUNNING ];then
echo -n "(Checking Filesystem..)" >/dev/console
e2fsck -p -f /dev/sda1 &
wait
fi
if [ ! -d /initrd ];then #w468
busybox mount -o remount,rw /
echo 'PUPMODE=2' > /etc/rc.d/PUPSTATE
fi
. /etc/rc.d/PUPSTATE #variables created at bootup by init script in initrd.
#v409 mount/umount scripts no longer write to /etc/mtab, as gparted failed to create a
#ext3 partition -- dunno why. Instead, now have /etc/mtab a symlink to /proc/mounts...
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
#-------------------------------------------------------------------------------------------------
##############SHUTDOWN RECOVERY Add to /etc/rc.d/rc.sysinit################
#If we were not shutdown cleanly, try and recover
if [ -f /RUNNING ];then
echo -n "(Cleaning up after Unclean SHUTDOWN)" >/dev/console
rm -f /var/log/X*
rm -f /RUNNING
rm -rf /tmp/*
rm -f /var/lock/LCK*
rm -f /var/run/*.pid
rm -rf /root/tmp 2>/dev/null
rm -rf /root/.thumbnails/* 2>/dev/null
rm -f /etc/.XLOADED
fi
###################Detect Bad Shut######################
#create a file in tmp that should be deleted on a clean shutdown
if [ ! -f /RUNNING ];then
echo 'this file is deleted during a clean shutdown' > /RUNNING
fi
#-------------------------------------------------------------------------------------------------
#redirect all output to a log file (must do after remount rw)...
[ ! "$LOGLEVEL" ] && exec 1>/tmp/bootsysinit.log 2>&1
rc.shutdown
Code: Select all
echo "${DISTRO_NAME} is now shutting down..." > /dev/console
#------------------------------------------------------------
rm -f /RUNNING
echo "Puppy is deleting RUNNING..." > /dev/console
#------------------------------------------------------------
ORIGPUPMODE=$PUPMODE #v2.22
Any help solving the power issue will be greatly appreciated
EDIT: Oh and the filesystem im using is ext3, full-HD install
- Attachments
-
- root.zip
- (2.37 KiB) Downloaded 411 times
USB Flash Drive recovery not an issue?
I installed puppy on a flash drive using the installer at
http://www.pendrivelinux.com/install-pu ... m-windows/
posted this http://www.murga-linux.com/puppy/viewtopic.php?t=52455
then spent the past hour reading every post in this thread
- Since I am a total Puppy noob and only learned about it yesterday :X I donn't know if I am going to have an issue with using the 4GB USB drive as the ONLY drive for the computer. I have it all booting up fine and I even yanked the cord a few times just to see if it would fail on resume -
I guess I tested it about 3 times and no problems, but then I read this thread and now I am worried again.
Do I need to install a script to run fsck on the flash drive? is that even possible?
I am guessing its a Frugal install (since its for a pendrive and I had to install the dev-XXX-.sts thingy manually to compile C code) and since Wikipedia says flash memory doesn't usually (can't maybe?) use journaling, I am guessing I am using ext2 not ext3...
I want to use this as the system for a arcade cabinet running puppy arcade - the machine will invarably get unplugged often, do I risk turning my arcade cabinet into a 150 lb paperweight until I hook up a CD drive and try to reinstall?
man, reading more just creates more questions.. head hurt, must stop now...
http://www.pendrivelinux.com/install-pu ... m-windows/
posted this http://www.murga-linux.com/puppy/viewtopic.php?t=52455
then spent the past hour reading every post in this thread
- Since I am a total Puppy noob and only learned about it yesterday :X I donn't know if I am going to have an issue with using the 4GB USB drive as the ONLY drive for the computer. I have it all booting up fine and I even yanked the cord a few times just to see if it would fail on resume -
I guess I tested it about 3 times and no problems, but then I read this thread and now I am worried again.
Do I need to install a script to run fsck on the flash drive? is that even possible?
I am guessing its a Frugal install (since its for a pendrive and I had to install the dev-XXX-.sts thingy manually to compile C code) and since Wikipedia says flash memory doesn't usually (can't maybe?) use journaling, I am guessing I am using ext2 not ext3...
I want to use this as the system for a arcade cabinet running puppy arcade - the machine will invarably get unplugged often, do I risk turning my arcade cabinet into a 150 lb paperweight until I hook up a CD drive and try to reinstall?
man, reading more just creates more questions.. head hurt, must stop now...
- SilverPuppy
- Posts: 143
- Joined: Fri 29 May 2009, 02:21
EXT3 is fine
Well, I haven't used this on anything BUT EXT3 recently, and it works fine. Just be sure you've got the partition set properly in the e2fsck line, and are using the correct scripts.
Even if the e2fsck line is messed up, it should still generally work. I'm not sure where you made a wrong turn.
Even if the e2fsck line is messed up, it should still generally work. I'm not sure where you made a wrong turn.
- Colonel Panic
- Posts: 2171
- Joined: Sat 16 Sep 2006, 11:09
Thanks for this Silverpuppy. I've downloaded these scripts and plan to install them on a computer at my local community centre which has EcoPup and Puppy 4.21 installed on it.
Gigabyte M68MT-52P motherboard, AMD Athlon II X4 630, 5.8 GB of DDR3 RAM and a 250 GB Hitachi hard drive running Ubuntu 16.04.6, MX-19.2, Peppermint 10, PCLinuxOS 20.02, LXLE 18.04.3, Pardus 19.2, exGENT 200119, Bionic Pup 8.0 and Xenial CE 7.5 XL.
- SilverPuppy
- Posts: 143
- Joined: Fri 29 May 2009, 02:21
Great stuff!
Just be certain to insert my pieces into the 4.21 files so you don't end up with weird behavior because something isn't right.
Search for my username "SilverPuppy" to find the pieces I've added.
Search for my username "SilverPuppy" to find the pieces I've added.
-
- Posts: 150
- Joined: Tue 29 Jan 2008, 21:11
- Location: Lancashire,U.K.
- Contact: