Got my entire ext3 partition overwritten

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

Got my entire ext3 partition overwritten

#1 Post by nic007 »

I have a few frugal installs on an ext3 partition. So, I used an old script of mine to do some sfs editing. I created (or supposedly created) a folder called "puppyfilesystem" as the working directory. I must have forgotten to change the path of "puppyfilesystem" everywhere in the script because all data was wiped after running the script. Luckily had most things backed up to another partition. :shock:

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#2 Post by Sailor Enceladus »

Note to self: Don't run any scripts by nic007 or your hard drive might get erased :o :) :lol:

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Sailor Enceladus wrote:Note to self: Don't run any scripts by nic007 or your hard drive might get erased :o :) :lol:
Bingo! :lol:
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

ITSMERSH

#4 Post by ITSMERSH »

There's an old German saying: Schadenfreude ist die beste Freude (literally translated: malicious joy is the best joy (I'm sure there's an equal international saying for this)).

However: I don't agree with that saying / any of such sayings.

Good to have backups, though! :wink:

Edit:

Btw. this wouldn't have happen by using the LazY Remaster Suite.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#5 Post by nic007 »

Old script I've been using for years to edit the loaded base sfs (not a remaster just a copy of /initrd/pup_ro2/*, manually editing a few things and then mksquashfs. I wanted to change the path of the working directory in the script to /mnt/sda3/puppyfilesystem but created the directory as /mnt/sda3 instead. :oops: Mksquashfs was happy to "squash" the non-existing /mnt/sda3/puppyfilesystem by overwriting the data on /mnt/sda3. :x Anyways - be careful!!!!

hamoudoudou

use editsfs, that is a well know Puppy tool.

#6 Post by hamoudoudou »

use editsfs, that is a well know Puppy tool.
But your error is human, whatever the codop used.. it's not programming error, it's yours., the man typing.
That people enjoy is not fair.. i will give you some scripts by Musher0 for automatization,.. if you need some laugh.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#7 Post by nic007 »

Yes, a human editing error. Nothing wrong with the script itself. Just thought I'd share it...of course some saw the opportunity to take a jibe at me. :) This is the script I normally use for manual editing the base sfs, additional compression options added:

Code: Select all

WrkDir="/puppyfilesystem"
rm -r $WrkDir
mkdir $WrkDir
cp -a /initrd/pup_ro2/* /puppyfilesystem
Xdialog -center -msgbox "/puppyfilesystem ready for edit.  Press OK when ready" 0 0
. /etc/DISTRO_SPECS
 PUPPYSFS="$DISTRO_PUPPYSFS"
Splash="rxvt -bg green -fg black -title "Progress" -geometry 80x6+360+360  -e mksquashfs $WrkDir /$PUPPYSFS"   
answer=`Xdialog --left --wrap --stdout --title "Compression Settings"  --combobox "Ready to compress to sfs file.
Higher compression levels produce smaller files but takes longer to compress.
Gzip compression produce bigger files than xz compression but compress faster.  
Older Puppys with pre-series-3 kernels must use gzip OLD compression.
Please select your choice from the menu, click 'OK' and .  This will take a while, please be patient." 0 80 "xz  DEFAULT" "xz  MEDIUM" "xz  HIGH" "xz  HIGHEST" "gzip  DEFAULT" "gzip  OLD" "NO COMPRESSION"`
case "$answer" in
        "xz  DEFAULT") $Splash -noappend -comp xz ;;
        "xz  MEDIUM") $Splash -noappend -comp xz -Xbcj x86 ;;
        "xz  HIGH") $Splash -noappend -comp xz -b 1048576 -Xdict-size 100% ;;
        "xz  HIGHEST") $Splash -noappend -comp xz -b 1048576 -Xbcj x86 ;;
        "gzip  DEFAULT") $Splash -noappend -comp gzip ;;
        "gzip  OLD") $Splash -noappend ;;
        "NO COMPRESSION") $Splash -noappend -noI -noD -noF -noX ;;
 esac
rm $WrkDir -r
Xdialog -center -title "SUCCESS!!!"  --no-buttons -infobox "Operation completed, exiting now" 0 0 3000 
   
exit

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#8 Post by foxpup »

I want to wipe my ext3 partition. Is this the right tool to do it? :D

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#9 Post by nic007 »

foxpup wrote:I want to wipe my ext3 partition. Is this the right tool to do it? :D
Of course, be brave. :wink:

Post Reply