Skip navigation.
Home
Now Shipping Version 7.0

Files not actually saved Fixed!


Posts: 9

I have been using MEPIS for several years now. I have enjoyed it but I have a problem that I have had both in v3.4 and now in 6.0. I am using a dual boot system, partitioned into several parts with a NTFS, VFAT and then the EXT3 for home and / and a swap partition. I use the vfat32 for keeping files that I work on in both winXP and MEPIS. I have found many times when I have saved a file under MEPIS and have seen it in the mounted system vfat but when I reboot into winXP the file has disappeared! When I boot back into MEPIS the file is also gone! This is quite frustrating and I can't seem to find a pattern when the file will actually save and will it will, evidently, virtually save. I can't seem to find a way to search for this that brings up this problem.

Any suggestions?

Thanks!

Files not actually saved

Although you have mounted vfat32 partition are you making sure you unmount this partition before shutting down and restarting in windows or Mepis.This could be your problem

John

Jon Du Quesne's picture

Post Your /etc/fstab File

wdavidp, can you please post the contents of your /etc/fstab file so that we can see what your partitions are and how they're mounted? Also, open a konsole, and enter the command "mount" and post the results. That will show us what is currently mounted.

Jon

SimplyMEPIS Value CD: $17.95
Amount saved not buying Windows Vista Ultimate: $399
Experience gained learning Mepis and helping others: Priceless

fstab file contents

Hi Jon, and John Smiling

I had not considered that I would need to unmount the file systems before logging out. I assumed that as a part of the logout shut down these were unmounted. I will test that. Here is the content of my /ect/fstab file I just reloaded and repartitioned. The new (for me) vfat partition is on /dev/sda5

# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda6 / ext3 defaults,noatime 1 1
/dev/sda7 swap swap sw,pri=1 0 0
none /proc proc defaults 0 0
none /proc/bus/usb usbfs devmode=0666 0 0
none /dev/pts devpts mode=0622 0 0
none /sys sysfs defaults 0 0
/dev/sda8 /home ext3 defaults,noatime 1 2
# Dynamic entries below, identified by 'users' option
/dev/sda1 /mnt/sda1 ntfs noauto,users,exec,ro,umask=0222 0 0
/dev/sda2 /mnt/sda2 vfat,ext3,ext2,reiserfs noauto,users,exec 0 0
/dev/sda5 /mnt/sda5 vfat,ext3,ext2,reiserfs noauto,users,exec 0 0
/dev/cdrom /media/cdrom iso9660,udf noauto,users,exec,ro 0 0
/dev/fd0 /media/floppy vfat,ext2 noauto,users,exec,rw 0 0

it only takes faith

Jon Du Quesne's picture

Ah, I See Something

Ah wdavidp, I think I see something!

First thing. If you want the vfat partition on /dev/sda5 to be ALWAYS MOUNTED, so that you see it while in Mepis you need to move the entry in /etc/fstab up above the "# Dynamic entries..." section. Use your favorite editor to move /dev/sda5... to just under /dev/sda8.... You should also delete the "noauto,users,exec" and change it to "defaults". Better yet, you may simplify the line like so:

/dev/sda8 /home ext3 defaults,noatime 1 2
/dev/sda5 /mnt/sda5 vfat defaults 0 0

Next, the reason why a "file disappears". Keep in mind that there are two things necessary to "mount" a partition in Linux: 1) a device, 2) a mount point. The "mount point", when nothing is mounted is nothing more than a directory. So the directory /mnt/sda5 is just sitting there waiting to be used for something. If you do not have /dev/sda5 mounted to /mnt/sda5, and you put somefile.txt into /mnt/sda5, then you would see somefile.txt while you are in Linux. But because /mnt/sda5 is not connected (mounted) to /dev/sda5 it would not be visible to Windows. Also (and you can try this). If you put somefile.txt into /mnt/sda5 without mounting, and then mount /dev/sda5 the mounting of /dev/sda5 covers up the directory /mnt/sda5. It doesn't delete anything, it just covers it up. Unmount /dev/sda5 and all of your stuff that was (incorrectly) placed in /mnt/sda5 will reappear Smiling

What to do? Make sure /dev/sda5 is unmounted, and move any of your "stuff" from /mnt/sda5 to someplace else temporarily. Then mount /dev/sda5 to /mnt/sda5 and copy your "stuff" back. When you go into Windows, you should be able to see it.

Jon

SimplyMEPIS Value CD: $17.95
Amount saved not buying Windows Vista Ultimate: $399
Experience gained learning Mepis and helping others: Priceless

Changes but still problems

Hi Jon,

thanks for your comments. I tried the following fstab I edited the changes you suggested and then umount -a then mount -a I found that I had root only permissions. I did a search and found the umask option. I added that as below and found I could edit and the drive was mounted. I wrote a small edit to a file an then made a test file. I then did a shut down and restart into windows. The test file was not present and the edited file was corrupted. I noticed that the option is for vfat and I know that this is a fat32 partition.

Any more guidence here? Thanks for your patience.

# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda6 / ext3 defaults,noatime 1 1
/dev/sda7 swap swap sw,pri=1 0 0
none /proc proc defaults 0 0
none /proc/bus/usb usbfs devmode=0666 0 0
none /dev/pts devpts mode=0622 0 0
none /sys sysfs defaults 0 0
/dev/sda8 /home ext3 defaults,noatime 1 2
/dev/sda5 /mnt/sda5 vfat auto,users,exec,umask=000 0 0
# Dynamic entries below, identified by 'users' option
/dev/sda1 /mnt/sda1 ntfs noauto,users,exec,ro,umask=0222 0 0
/dev/sda2 /mnt/sda2 vfat,ext3,ext2,reiserfs noauto,users,exec 0 0
/dev/cdrom /media/cdrom iso9660,udf noauto,users,exec,ro 0 0
/dev/fd0 /media/floppy vfat,ext2 noauto,users,exec,rw 0 0

it only takes faith

Jon Du Quesne's picture

Try This

Try making this change:

/dev/sda5 /mnt/sda5 vfat auto,users,exec,umask=000 0 0 # from this
/dev/sda5 /mnt/sda5 vfat defaults 0 0 # to this

Do a "umount /mnt/sda5" and then a "mount /mnt/sda5" as user root. Add your file (not as root user)

Another question. What do you mean that the file was "corrupted"? What tool(s) did you use to edit the file or create the test file?

If you are using Kwrite, then you can configure it so that it writes PROPER DOS files. Unix and Linux use a different end-of-line for text. The end a line with a newline character. But DOS ends files with carriage-return+linefeed.

So, if you're using Kwrite, start it up, and then choose Settings -> Configure KWrite. From in there choose Open/Save. At the top, on the right, you will find File Format. Change End of Line from UNIX to DOS/Windows. Save the changes. When you are done creating/modifying the file, make sure you change the file format back to UNIX.

You may want to try a super-simple test. While /dev/sda5 is mounted to /mnt/sda5, use the command "touch somefile.txt". This will create an empty file at that mount point. Reboot into Windurze. See if somefile.txt exists. If it does then you are successfully writing to the directory. Then we can see if some other aspect of reading/writing is not working Smiling

Jon

SimplyMEPIS Value CD: $17.95
Amount saved not buying Windows Vista Ultimate: $399
Experience gained learning Mepis and helping others: Priceless

File will not copy

Hi Jon,

I followed your instructions and changed fstab as above. I did the umount and then mount of /mnt/sda5

The file will not copy to the drive now. I cannot create any files on the drive. It only has root access permissions.

Earlier, I was using Open office to edit the file and create a new file. I used Open Office 2.02 under MEPIS to edit the file and then Open Office 2.1 under WinXP to open the file.

I understand that a mount takes the permissions of the user doing the mount unless you allow for other uses to access as in the case of umask. It appears that the mount you are suggesting will only inherit root permissions. Are you experiencing something different?

Thanks!
David

it only takes faith

Jon Du Quesne's picture

Permissions

Hey David, are you having too much fun!!

OK, I do not currently have an vfat partitions on my box, but here are the permissions on the relevant partitions:

$ ls -lad /mnt
drwxr-xr-x 10 root root 4096 2006-10-12 08:59 /mnt
$ ls -la /mnt
total 40
drwxr-xr-x 10 root root 4096 2006-10-12 08:59 .
drwxr-xr-x 26 root root 4096 2006-12-03 11:07 ..
drwxr-xr-x 19 root root 4096 2006-09-22 17:23 hda2
drwxr-xr-x 20 root root 4096 2006-11-01 17:32 hda3
$ mount
/dev/hda2 on /mnt/hda2 type ext3 (rw,noatime)
/dev/hda3 on /mnt/hda3 type ext2 (rw,noatime)

Now, here's the thing. If I try to just go down into one of the above mounted directories and perform "touch junk", I too get a "permission denied" message. But down in /mnt/hda3, I have a copy of "home" (/mnt/hda3/home) and inside there, I have an old copy of my account (/mnt/hda3/home/me). If I go down there, then I AM able to perform "touch junk" with no problem.

You may need to add the umask option onto the mount command, but I'm not sure that will help. Perhaps someone else will chime in; otherwise, I will have to create a test area and put a vfat partition into it and see what happens to the permissions. I will not be able to get to it for a while however Sad

Could you mount the partition and then do the command "mount" with no arguments, and post the results? That will show us all of your mounted partitions and the permissions. Perhaps it's something else stupid that I haven't spotted Puzzled

Jon

SimplyMEPIS Value CD: $17.95
Amount saved not buying Windows Vista Ultimate: $399
Experience gained learning Mepis and helping others: Priceless

m_pav's picture

Have you checked the fat32 filesystem for errors?

Windows XPs chkdsk is unable to fix all errors on a fat32 file system, and your fat32 file system may have a dirty flag that needs to be cleared, but thankfully, Linux can fix this really easily and it does it much faster than windows can, and it does it better.

Unmount your fat32 partition first, or do umount -a from a konsole as root, then open mepis utilities, (gear icon in the quicklaunch > System Settings > System Configuration > Mepis Utilities) enter your root password then click on Repair Partitions, choose your fat32 partition and click the Check button. If there are any errors, they will be fixed and your issue may be remedied.

Another thought came to mind - make sure your user account has permissions for the disk group, that way, you can mount and unmount drives and/or partitions.

Speaking of user permissions, have you right clicked the /mnt/sda2 and the /mnt/sda5 folders as root to check their permissions? You might find having sent files to the location without having a valid block device mounted first has affected the permissions for the entire folder.

As a possible repair, you might like to try making sure all windows drives are unmounted using the umount -a as above, then as root, delete the folders under /mnt for the windows partitions, then re-create them and re-mount your partitions again using the mount -a command from a terminal. When the partitions have been mounted, check out if kwikdisk and kdiskfree reports the used/free space correctly, then try copying a file to the partition.

Happy Christmas

Mike P

--------------------
Life may not be the party we thought, but while we're here, we may as well dance.
Break M$'s shackles from your feet and free yourself with Mepis

Fixed!! Thanks!

I followed the above suggestions. I did not get any errors returned from checking the FAT32 system. However, I did change the line in fstab to the following.

/dev/sda5 /mnt/sda5 vfat defaults,umask=0000 0 0

This seems to have fixed the problem and so far I have not lost any files.

Thanks for your help!

David P

it only takes faith

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.