Accidental file deletion and recovery in Puppy

Booting, installing, newbie
Post Reply
Message
Author
snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

Accidental file deletion and recovery in Puppy

#1 Post by snayak »

Dear All,

Today I accidentally deleted /usr/bin/as.
This file comes inside devx.sfs.
File devx.sfs is mounted as read-only.
That means file /usr/bin/as must be present inside devx.sfs.
Puppy linux uses unionfs to mount sfs files layer wise.
Topmost layer is savefile layer which is writable.
That means unionfs hides this file from being shown up.
Reasoning all these I ran the command

Code: Select all

find / -name .wh*
I saw

Code: Select all

/initrd/pup_rw/usr/bin/.wh.as
[wh meand whiteout]
I was tempted to delete this file!
I was hoping to get back my /usr/bin/as.
I ran

Code: Select all

rm /initrd/pup_rw/usr/bin/.wh.as
and now I see

Code: Select all

~ # ls -l /usr/bin/as
-rwxr-xr-x 1 root root 330772 Aug  2  2013 /usr/bin/as
Kindly correct my understanding if mistaken,
and suggest if there is a better way.

Sincerely,
Srinivas Nayak
[Precise 571 on AMD Athlon XP 2000+ with 512MB RAM]
[Fatdog 720 on Intel Pentium B960 with 4GB RAM]

[url]http://srinivas-nayak.blogspot.com/[/url]

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

#2 Post by foxpup »

Did you delete the .wh.as while still running the Puppy with the pupsave containing the .wh.as?
You should open the pupsave from another Puppy session not using this pupsave, e.g. started with pfix=ram

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#3 Post by fredx181 »

snayak wrote:I ran
Code:
rm /initrd/pup_rw/usr/bin/.wh.as

and now I see
Code:
~ # ls -l /usr/bin/as
-rwxr-xr-x 1 root root 330772 Aug 2 2013 /usr/bin/as

Kindly correct my understanding if mistaken,
and suggest if there is a better way.
I think you did exactly the right thing (but anyone correct me if I'm wrong), the .wh file prevents /usr/bin/as from being present in the filesystem, removing the .wh simply brings the it back.

Fred

snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

#4 Post by snayak »

Thanks guys.
[Precise 571 on AMD Athlon XP 2000+ with 512MB RAM]
[Fatdog 720 on Intel Pentium B960 with 4GB RAM]

[url]http://srinivas-nayak.blogspot.com/[/url]

Post Reply