LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Inconsistent filesystems from parted and fdisk (https://www.linuxquestions.org/questions/ubuntu-63/inconsistent-filesystems-from-parted-and-fdisk-4175537156/)

cbb2c 03-18-2015 03:25 PM

Inconsistent filesystems from parted and fdisk
 
This is my first post. Thank you all in advance for your help and your patience.

I've set up an old machine as a dual boot Win7/Ubuntu 12.04 machine. I've partitioned the single hard drive for Windows and Ubuntu to have their own partitions, with a shared NTFS partition (of 15 GB) intended for Downloads, Documents, etc. Unfortunately Windows doesn't recognize the filesystem on the shared partition.

I used parted (see below) to verify that I had actually set up the filesystem (using mkntfs). I later used fdisk (see below) to view the id of the partitions. Then I noticed that parted indicates that the 15 GB partition is NTFS, while fdisk indicates that it's a Linux partition. Notice, too, that the filesystem for the second partition is inconsistent.

I've read (http://www.linuxquestions.org/questi...6/#post5328291) that the information given by fdisk isn't always correct.

My questions are: Which of these (parted or fdisk) is more likely correct, and how do I know? And could whatever it is that's causing this problem be the reason Windows isn't recognizing the filesystem?

Thanks for your help!

Code:

$ sudo parted /dev/sda print
Model: ATA WDC WD800JD-60LS (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size    Type    File system    Flags
 1      1049kB  40.0GB  40.0GB  primary  ntfs            boot
 2      40.0GB  60.0GB  20.0GB  primary  ext4
 3      60.0GB  75.2GB  15.2GB  primary  ntfs
 4      75.2GB  80.0GB  4801MB  primary  linux-swap(v1)

Code:

$ sudo fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ca88f

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048    78151679    39074816    7  HPFS/NTFS/exFAT
/dev/sda2        78151680  117225471    19536896    7  HPFS/NTFS/exFAT
/dev/sda3      117225472  146923519    14849024  83  Linux
/dev/sda4      146923520  156301311    4688896  82  Linux swap / Solaris


Pearlseattle 03-18-2015 03:58 PM

Hi
That's weird, but I saw something similar last week on my PC (not involving Windows) when using GPT parts.
I would just go into Windows and format the shared partition from there.

p.s.:
Quote:

I've read (http://www.linuxquestions.org/questi...6/#post5328291) that the information given by fdisk isn't always correct.
From what I read there the partitions types were GPT, which you're not using => not relevant for you.

rknichols 03-18-2015 05:15 PM

fdisk is just looking at the "Id" field in the partition table. The "83" there indicates Linux, but MBR partition type is almost completely ignored** in Linux. parted, on the other hand, is looking at the contents of the partition and finding an NTFS filesystem there.

** There are a handful of "container" types, such as "5 Extended", and "85 Linux extended" that are significant to the kernel.


All times are GMT -5. The time now is 03:02 PM.