Fstab/Mtab/testdisk discrepancy?

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
DapperMe17
Level 3
Level 3
Posts: 127
Joined: Tue Jul 15, 2008 8:55 pm

Fstab/Mtab/testdisk discrepancy?

Post by DapperMe17 » Tue Jul 06, 2010 8:23 pm

Hello,

My HD contains a Windows, Fat32, two Linux & swap partitions. Recently, I had to recover my partition table with "testdisk", due to a foolish attempt to resize a partition.

I recovered all partitions, with the exception of my root partition. I left that unallocated, then reformatted it with GParted, to be of a larger size.

All data has been recovered & the PC works fine, just as it always has.

The wierd thing is that the original "root" partition seems to co-exist on the same partition as my Fat32 data(???)

GParted shows my root partition as almost full, when it should only be about half full....then my Fat32 partition shows empty, when it should be about 3GB full. Root should only be about 5GB, not almost 9GB.

I believe that my mtab & fstab are corrupt relative to the partitions that GParted lists, and need to be fixed. However, I don't know where to start....?

Code: Select all

fdisk -l



Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xae32ae32

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1642 13189333+ 7 HPFS/NTFS
/dev/sda2 1643 3327 13534762+ f W95 Ext'd (LBA)
/dev/sda3 3328 4701 11036655 c W95 FAT32 (LBA)
/dev/sda4 4702 4864 1309297+ 82 Linux swap / Solaris
/dev/sda5 2844 3327 3887698+ 83 Linux
/dev/sda6 1643 2843 9646969+ 83 Linux


NOTE.../dev/sda2 is an extended partition, which should hold only two EXT4 partitions-sda5 & sda6
__________________________________________________ ___________________________________

Code: Select all

/etc/mtab


/dev/sda6 / ext4 rw 0 0
none /proc proc rw 0 0
none /dev/pts devpts rw 0 0
/dev/sda5 /home ext4 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/dev/sda1 /media/disk fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0
/dev/sda3 /media/LINUX\040-\040XP vfat rw,nosuid,nodev,noatime,uhelper=hal,shortname=lowe r,uid=500,flush,utf8 0 0

__________________________________________________ _______________________________

Code: Select all

/etc/fstab


# Entry for /dev/sda6 :
UUID=00d48746-feba-4db5-80a4-a7416ca9b38a / ext4 defaults 1 1
# Entry for /dev/sda5 :
UUID=6cd8b50f-7149-4aa3-94fd-215e7485ec71 /home ext4 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda3 :
UUID=a2c83cbf-05b6-4a07-b116-cc7a609f1e44 swap swap defaults 0 0
none /dev/pts devpts defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0

__________________________________________________ __________________________________
Gparted...see image attachment below.


__________________________________________________ ___________________________________
[b]NOTE...Fat32 shows empty. However, all data that's suppose to be in that partition, is still available, and located somewhere. I wonder if it's being held in the root partition by mistake? Out of curiosity, I tried to save a 700mb file to my Fat32 partition (which shows empty & should have plenty of free space), but it was cancelled due to lack of space on the partition.[/b]
__________________________________________________ ____________________________________
Here's my "testdisk" information (Fat 32 shows a warning...maybe I have to repair the cylinders or heads?)

TestDisk 6.11, Data Recovery Utility, April 2009
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 40 GB / 37 GiB - CHS 4864 255 63
Current partition structure:
Partition Start End Size in sectors

1 * HPFS - NTFS 0 1 1 1641 254 63 26378667
2 E extended LBA 1642 0 1 3326 254 63 27069525
Warning: Incorrect number of heads/cylinder 16 (FAT) != 255 (HD)
3 P FAT32 LBA 3327 0 1 4700 254 63 22073310 [LINUX - XP]
4 P Linux Swap 4701 0 1 4863 254 63 2618595
5 L Linux 2843 1 1 3326 254 63 7775397
X extended 1642 0 2 2842 254 63 19294064
6 L Linux 1642 2 1 2842 254 63 19293939



Thanks for any help!

chattr
Level 2
Level 2
Posts: 58
Joined: Thu Jul 03, 2008 2:43 pm

Re: Fstab/Mtab/testdisk discrepancy?

Post by chattr » Wed Jul 07, 2010 8:56 am

A quick point: /dev/sda3 in your fstab is said to be swap:
# Entry for /dev/sda3 :
UUID=a2c83cbf-05b6-4a07-b116-cc7a609f1e44 swap swap defaults 0 0
but fdisk -l shows something different:
/dev/sda3 as /dev/sda3 3328 4701 11036655 c W95 FAT32 (LBA)
/etc/mtab is just a text file maintained by the mount and umount commands ( see 'man mount'), so by running ' mount ' in terminal, /etc/mtab gets printed. Did you mount /dev/sda3 manually?

As to your comments about testdisk, I've never used it, so I'm an ignoramus about testdisk.

As to your gparted screenshot, could you please put the output of the terminal command 'df -Th' (no quotes, of course), here in this thread? That command will print the free space and filesystem type for all mounted filesystems. The -h option prints human readable free space numbers and the -T option prints the filesystem type. TIA.

DapperMe17
Level 3
Level 3
Posts: 127
Joined: Tue Jul 15, 2008 8:55 pm

Re: Fstab/Mtab/testdisk discrepancy?

Post by DapperMe17 » Thu Jul 08, 2010 11:24 pm

Hi chattr & thank you for taking the time to view my post & offer your opinions.

To answer you questions...

No, I did not manually mount /xda3,

And, here's the printout...

# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda6 ext4 4.0G 3.4G 370M 91% /
/dev/sda5 ext4 3.7G 425M 3.3G 12% /home
tmpfs tmpfs 219M 956K 218M 1% /dev/shm
/dev/sr0 iso9660 694M 694M 0 100% /media/livecd 2010041205:14
/dev/sda1 fuseblk 13G 13G 239M 99% /media/disk
/dev/sda3 vfat 11G 11G 0 100% /media/LINUX - XP

Also...here's some information on /sda3 from GParted..

DapperMe17
Level 3
Level 3
Posts: 127
Joined: Tue Jul 15, 2008 8:55 pm

Re: Fstab/Mtab/testdisk discrepancy?

Post by DapperMe17 » Thu Jul 29, 2010 10:31 pm

Ok...the issue with /sda6 is fixed. I just reinstalled & reformatted.

However...I'm still confused with only /sda3....which currently shows no data per above screenshot. However, this is my shared fat32 partition (Linux-XP), which does show up and contain all of my shared files just fine. I can access those files as normal.

I do have mtools and dosfstools installed.

Do I need to change something in my fstab?

User avatar
mick55
Level 6
Level 6
Posts: 1491
Joined: Fri Sep 25, 2009 2:47 am

Re: Fstab/Mtab/testdisk discrepancy?

Post by mick55 » Fri Jul 30, 2010 1:06 am

DapperMe17 wrote:Ok...the issue with /sda6 is fixed. I just reinstalled & reformatted.

Do I need to change something in my fstab?
If you reinstalled and reformatted, then you have a new fstab
because you have a new install.

If you want to see if everything is OK post the output of these commands.

Code: Select all

sudo fdisk -l

Code: Select all

sudo blkid

Code: Select all

sudo lshw -C disk

Code: Select all

free | grep Swap

Code: Select all

cat /etc/fstab

mick
Things are more like they are now than they ever were before.

Dwight D. Eisenhower (1890 - 1969)

DapperMe17
Level 3
Level 3
Posts: 127
Joined: Tue Jul 15, 2008 8:55 pm

Re: Fstab/Mtab/testdisk discrepancy?

Post by DapperMe17 » Sun Aug 01, 2010 1:48 am

fdisk -l..........

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xae32ae32

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1642 13189333+ 7 HPFS/NTFS
/dev/sda2 1643 3327 13534762+ f W95 Ext'd (LBA)
/dev/sda3 3328 4701 11036655 c W95 FAT32 (LBA)
/dev/sda4 4702 4864 1309297+ 82 Linux swap / Solaris
/dev/sda5 2844 3327 3887698+ 83 Linux
/dev/sda6 1643 2843 9646969+ 83 Linux

Partition table entries are not in disk order


blkid........

/dev/sda1: UUID="0000649A00001B58" TYPE="ntfs"
/dev/sda5: UUID="6cd8b50f-7149-4aa3-94fd-215e7485ec71" TYPE="ext4"
/dev/sda6: UUID="00d48746-feba-4db5-80a4-a7416ca9b38a" TYPE="ext4"
/dev/sda4: UUID="a2c83cbf-05b6-4a07-b116-cc7a609f1e44" TYPE="swap"
/dev/sda3: LABEL="LINUX - XP" UUID="4633-DE83" TYPE="vfat"


free | grep Swap.......

Swap: 1309288 26020 1283268


cat /etc/fstab........

# Entry for /dev/sda6 :
UUID=00d48746-feba-4db5-80a4-a7416ca9b38a / ext4 defaults 1 1
# Entry for /dev/sda5 :
UUID=6cd8b50f-7149-4aa3-94fd-215e7485ec71 /home ext4 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda4 :
UUID=a2c83cbf-05b6-4a07-b116-cc7a609f1e44 swap swap defaults 0 0
none /dev/pts devpts defaults 0

User avatar
mick55
Level 6
Level 6
Posts: 1491
Joined: Fri Sep 25, 2009 2:47 am

Re: Fstab/Mtab/testdisk discrepancy?

Post by mick55 » Sun Aug 01, 2010 2:52 am

The outputs of those commands are what they should be, so that's good news. :)

Now let's tackle the /dev/sda3 issue.

Run gparted.

Click on /dev/sda3. Does it still have the error message?

If it does, right click the partition and select "check" from the context menu.
This will fix the error Mint sees. If the "check" option is greyed out then select
"unmount" and try again.

After you have fixed the errors add /dev/sda3 to your fstab.

Follow this tutorial to see how.

Auto Mount Partitions on Boot (also Windows partitions)

(I think the tutorial is pretty self-explanatory, but if you get stuck let me know.) :wink:

mick
Things are more like they are now than they ever were before.

Dwight D. Eisenhower (1890 - 1969)

DapperMe17
Level 3
Level 3
Posts: 127
Joined: Tue Jul 15, 2008 8:55 pm

Re: Fstab/Mtab/testdisk discrepancy?

Post by DapperMe17 » Sun Aug 01, 2010 4:15 pm

That worked!

Adding the vfat to fstab via your link from Fred, did the trick.

Thanks much for your help!

:D

User avatar
mick55
Level 6
Level 6
Posts: 1491
Joined: Fri Sep 25, 2009 2:47 am

Re: Fstab/Mtab/testdisk discrepancy?

Post by mick55 » Sun Aug 01, 2010 9:11 pm

Glad you got it sorted. :)

mick
Things are more like they are now than they ever were before.

Dwight D. Eisenhower (1890 - 1969)

Post Reply

Return to “Hardware Support”