fat32 partition contains data in linux not in windows
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
fat32 partition contains data in linux not in windows
System:
Laptop with 80 GB HDD, 1 GB RAM, etc.
Was shipped running XP as on NTFS partition
I backed up all my data (approx 40 GB worth) and did the following:
Booted to Linux Mint 2.1 (Bea) Live CD
ran sudo gparted
resized the NTFS partition to approx 20 GB
setup an approximately 40 GB FAT32 partition for my data (to share between OS's)
Installed Linux Mint
Started figuring out how to setup a partition to share data between XP and Linux. Found out FAT32 is best to use and set it up.
here is results of fdisk-l
--------------------------
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 6 48163+ de Dell Utility
/dev/sda2 * 7 2826 22651650 7 HPFS/NTFS
/dev/sda3 2827 7838 40258890 b W95 FAT32
/dev/sda4 7839 9729 15189457+ 5 Extended
/dev/sda5 * 7839 9648 14538793+ 83 Linux
/dev/sda6 9649 9729 650601 82 Linux swap / Solaris
--------------------------
After fighting with /etc/fstab and mounting (and remounting) the drive, I made it possible to write data to the FAT32 partition.
It is setup as /osshare
Here is my /etc/fstab file
--------------------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda5
UUID=f5da5218-986c-4c82-81d7-e0fe0226c02f / ext3 defaults,errors=remount-ro 0 1
I then copied all of my data back to the drive, under Linux. (This happens much faster in Linux than windows for some reason - using USB 2.0 external disk)
When I reboot and go back into Windows XP, the disk exists, shows up as my D: drive and is sized correctly.
Here is the PROBLEM:
In Windows XP, the drive is empty. The size is correct, but the drive is void of any data.
Just to be sure, I reboot and go back into Linux. Drive exists, data intact.
I am afraid to start writing data inside XP, as I don't know what will happen.
I still have my all my data backed up and could start over, but let's just say getting the FAT32 partition to mount properly wasn't any fun. I've been working with PCs for over 10 years and this has been a bugger. Some parts of Linux are nice; others are insanely and unnecessarily difficult.
I'm no expert, but that sounds more like a windows problem than a linux issue. Not that we're going to hold it against you :-) , but you might have better luck with this question on a Windows board, where everyone is used to diagnosing Windows problems.
Here's a weird sneaky suspicion - does that FAT32 drive read properly without the external usb drive plugged in? Perhaps it copied so much faster in linux because it was only symlinking the files instead of actually copying the data. Then, when you open the partition in Windows, which can't handle such symlinks, it appears empty? It's a long shot, but maybe worth a try.
I would hazard a guess that the FAT partion is not actually mounted, and you are really storing your data in the linux filesystem at the mountpoint you intended to use. As root, run mount. It will display all of the currently mounted partitions and their respective mountpoints. If that doesn't rveal anything that leads to a fix, post the results of the mount command here, and someone may be able to point out a solution.
When figuring out a tricky partition mounting issue, I prefer to run mount/umount from the command line until I have iterated upon the correct/desired settings, and then translate the results to a compatible fstab entry. This removes the need to reboot to test each new setting.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
My thought if the data was copied it was copied to /osshare directory but maybe the partition was not mounted to the directory at the time. Go into FC and run the command ' /sbin/mount ' to mounted partitions. Or use the command ' cat /proc/partitions '.
PatrickNew:
1. It may be a windows issue, and I'll do what I can on that side.
2. I have the data on my system, and the USB external drive is no longer plugged in. Also, see below
theNbomr:
The file system with Linux Mint installed is only 14 GB (with about 10GB free), whereas the FAT32 is about 40GB (with only 1.2 GB free). So, I'm pretty sure the data actually was copied over. Since about 20 GB of that was music, and I can play songs, so the data is live and legit.
Brian1:
I was having trouble getting the drive to mount, but have sinced resolved that. So, right now when I look at GParted, the drive pointing to /osshare is mounted. I made the mistake of NOT having it mounted and almost filled the / drive on my first file copy. See above for data volume.
Thank you each for your replies.
I will post more after I've been able to try the stuff listed and whatever else I can find.
My theory is type "c" partition type should have been used. Partition type "b" in sda3 is fat32 too but not in LBA mode whereas Type "c" is. One must not forget Linux has no responsibility to make things compatible in Winodws. Fat16 has a maximum address limit of 2Gb but if you ask Linux to create one bigger then it Linux will do it but no MS system can cope with it.
Possible cure
In Linux use cfdisk to alter type "b" to type "c".
How did you create the filesystem? XP has a 32GB limitation so you would of had to format it in linux. As already stated check to see if sda3 is being mounted. If not your data is being written to sda5 instead. I also agree with saikee.
I used cfdisk to change the partition type to "c". That seemed to fix it.
In the interest of full disclosure, I also rebooted XP. I am wondering if the changes I made before would have been effective without that. One more reason to not like XP... reboot, reboot...
michaelk:
I created the filesystem in Linux, using GParted. I discovered the XP FAT32 limitation when trying to format a different drive recently. Thankfully, I don't have any files over 4GB, which is another limitation of FAT32...
sda3 is being mounted. All is working... for the moment.
Thanks!! I can access my data.
Now it's off to more problems. I'm sure I'll be posting again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.