Checking flash drive for corruption

Booting, installing, newbie
Post Reply
Message
Author
edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

Checking flash drive for corruption

#1 Post by edwin.evans »

I'm running Puppy Linux on a SD Card. I think my file system is corrupted but I'm not sure how to tell for sure. I found e2fsck but I'm not sure how to use it since I'm not clear on how Puppy file systems are set up. Like what is vfat, ext2, etc? What is pup_ro1? Where can I find a good explanation of this?

Also, is this the best tool for me to use and if so what command should I run to check if my flash drive is corrupt?

Here is what I tried:

/$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda1 vfat 1923312 702200 1221112 37% /initrd/mnt/dev_save
/dev/loop1 ext2 516040 148848 367192 29% /initrd/pup_ro1
tmpfs tmpfs 257344 800 256544 1% /initrd/pup_rw
tmpfs tmpfs 128124 127256 868 100% /initrd/mnt/tmpfs
/dev/loop0
squashfs 127232 127232 0 100% /initrd/pup_ro2
unionfs aufs 257344 800 256544 1% /
shmfs tmpfs 54516 4 54512 1% /dev/shm


/$ e2fsck -n /dev/loop1
e2fsck 1.41.11 (14-Mar-2010)
Warning! /dev/loop1 is mounted.
/dev/loop1 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/loop1: 2266/32768 files (2.0% non-contiguous), 39274/131072 blocks


/$ e2fsck -n /dev/sda1
e2fsck 1.41.11 (14-Mar-2010)
Warning! /dev/sda1 is mounted.
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sda1

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

Thanks!

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#2 Post by darkcity »

When Puppy is frugally installed (which it looks like you are) it uses a layered file system

the base SFS which contains the 'untouched' Puppy Linux files is read-only
on top of this the Pup savefile records any changes - this is a file-system in a file (ext2 ext3 or ext4)

these two file can reside on a linux or windows partition

e2fsck is used for linux filesystems (ext2 ext3 and ext4)
http://linux.die.net/man/8/e2fsck

But it should not be used on mounted file-system, to check the Pup savefile
- boot without loading it. http://puppylinux.org/wikka/HowToAvoidLoadingSaveFile
- then use e2fsck. normally i use v c f options.


---
A better description is here (scroll to Architecture Overview)-
http://puppylinux.com/development/howpuppyworks.html

Post Reply