Files automatilly deleted from USB Stick

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
allanh
Level 2
Level 2
Posts: 53
Joined: Sat Jan 28, 2012 8:14 am

Files automatilly deleted from USB Stick

Post by allanh »

Hello,

I have just installed Mint 17-32 bit on a netbook. It works great. However on trying to copy files from a USB Stick to the Netbook these file get automatically dumped in to the Trash and erased from the USB stick. I cannot stop this action.

I cannot figure this one out.


Regards,



Allan Hambidge

User avatar
Derek_S
Level 6
Level 6
Posts: 1278
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Files automatilly deleted from USB Stick

Post by Derek_S »

Hello Allan - I can only think of this: you have a separate partition for /home on your system, and it is either not mounted correctly or mounted as read-only during system boot. Two things I can think of to check:

1.) Boot the system, open the terminal, and enter " sudo fdisk -l ". Find the device used for the home partition (sda1, sda2, sda3, etc.). Now enter " sudo mount -o rw /dev/sdxy ", subtituting the correct letter for "x" and the correct number for "y". Then test to see if you can copy files from the USB flash drive to one of the folders in home (like documents or downloads). If this works for this session only and fails to work after a system reboot, see step #2.

2.) Open the terminal and enter " sudo blkid ". Leave this terminal open and open a second terminal. Enter " sudo gedit /etc/fstab ". Now check to see that the UUID for home that is displayed in the first terminal (blkid) matches the UUID for home that is displayed in /etc/fstab. If they're not a match, then copy and paste the correct UUID (from blkid) into the entry for home in /etc/fstab. Be careful doing this, and be sure to save before you quit.
Last edited by Derek_S on Fri Sep 05, 2014 11:23 am, edited 1 time in total.
"Truth is becoming rarer and rarer as time passes. It is only a matter of time before it will cease to exist."

User avatar
DrHu
Level 17
Level 17
Posts: 7525
Joined: Wed Jun 17, 2009 8:20 pm

Re: Files automatilly deleted from USB Stick

Post by DrHu »

The boot device that you used to install the OS was a CD/DVD or USB ??
--if usb, installing from it would erase files
https://help.ubuntu.com/community/Insta ... StickQuick

To make sure it is not some file manager bug, you can try cp in a teminal
http://www.cyberciti.biz/faq/ubuntu-copy-file-command/
--check that the file stays in place on the USB

allanh
Level 2
Level 2
Posts: 53
Joined: Sat Jan 28, 2012 8:14 am

Re: Files automatilly deleted from USB Stick

Post by allanh »

Hi,

Thanks for your prompt reply. I tried the first part and got the sda1 2 and 3. I tried to mount sda1 this and got an error message.

I then tried the second part and got the gedit screen. I tried to alter the incorrect UUID and it starts to delete all the lines. I exit without saving the file.

I have installed Linux Mint 17 on a laptop (64 Bit) and it works perfectly.

I install using the entire hard disk. I am using only Linux. What am I doing wrong in the Netbook install?

Regards,


Allan

allanh
Level 2
Level 2
Posts: 53
Joined: Sat Jan 28, 2012 8:14 am

Re: Files automatilly deleted from USB Stick

Post by allanh »

Hello Derek,

After mustering up some patience I managed to correct the UUID line and save the file. On rebooting I copied a couple of files to the desktop from a USB stick and all OK. The files are not erased anymore. They remained on the USB and on the desktop.

Many thanks for your invaluable help.

I ask Linux questions from time to time but do also answer a few. It is really great when you can use your past experiences with others who are in a corner, Gives me a real buzz when I help someone out.

Best regards,


Allan Hambidge

allanh
Level 2
Level 2
Posts: 53
Joined: Sat Jan 28, 2012 8:14 am

Re: Files automatilly deleted from USB Stick

Post by allanh »

Hello Derek,

The problem came back again.

The following are the readings from procedures 1 and 2. I erased the line "# swap was on /dev/sda5 during installation" and resaved the file. It is now OK.

/dev/sda1: UUID="a148536b-219a-4e3d-a91f-03d100d4c772" TYPE="ext4"
/dev/sda5: UUID="c942e80a-7432-422b-94f9-96b240e9d6da" TYPE="swap"
/dev/sdb1: UUID="1971CE892288B914" TYPE="ntfs"

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=a148536b-219a-4e3d-a91f-03d100d4c772 / ext4
# swap was on /dev/sda5 during installation
UUID=c942e80a-7432-422b-94f9-96b240e9d6da none swap
UUID="1971CE892288B914" TYPE="ntfs

However, do you believe I should format the hard disk with gparted before doing a full install again?


Regards,


Allan Hambidge

User avatar
mbohets
Level 2
Level 2
Posts: 97
Joined: Sun Apr 28, 2013 8:26 am
Location: Belgium

Re: Files automatilly deleted from USB Stick

Post by mbohets »

If you want to do a clean install, do the following:
- Backup the data you want to keep on an external drive or on another pc or cloud storage
- Download a new iso file (perhaps something went wrong during your previous download)
- burn it to a dvd or put it on an usb stick
- boot from this and do an integrity check (you can choose this in the bootup menu)
- boot normally, check if it starts and works normally
- install it on your pc and format all your partitions (I always use the manual partitioning method instead of the auto install)
Je suis Charlie, how many more people have to die for religion

User avatar
Derek_S
Level 6
Level 6
Posts: 1278
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Files automatilly deleted from USB Stick

Post by Derek_S »

Hello Allan - I had a look, and it appears all your UUIDs match. But I have a serious question: When you copied and pasted the contents of /etc/fstab to this thread, did you cut some items off or miss something? Your fstab entries should look like this (I'm going to copy and paste what you have posted and add what I think is missing in red):

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=a148536b-219a-4e3d-a91f-03d100d4c772 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=c942e80a-7432-422b-94f9-96b240e9d6da none swap sw 0 0
UUID="1971CE892288B914" TYPE="ntfs

Edit /etc/fstab once more and very carefully add what I've highlighted in red. Then save and quit.

Also, I'm not exactly sure what the fstab entry should look like for mounting a NTFS partition (I've never done it!). Maybe another forum member can comment on this.
"Truth is becoming rarer and rarer as time passes. It is only a matter of time before it will cease to exist."

allanh
Level 2
Level 2
Posts: 53
Joined: Sat Jan 28, 2012 8:14 am

Re: Files automatilly deleted from USB Stick

Post by allanh »

Hi Derek,

I have added the missing parts.

I downloaded Linux Mint and did an MD5 check.Using Unetbootin I installed it on a USB Stick.

I will see how it goes before doing a full reinstall.


Regards,


Allan

User avatar
Derek_S
Level 6
Level 6
Posts: 1278
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: Files automatilly deleted from USB Stick

Post by Derek_S »

Hello Allan - I did a little Googling on the topic "entries needed in /etc/fstab to mount NTFS partitions". Your entry for this also seems to lacking a few things. Again, I'll highlight in red what appears to be missing.

What you have now:
UUID="1971CE892288B914" TYPE="ntfs

What it should look like:
UUID="1971CE892288B914" media/Data ntfs-3g defaults,windows_names,locale=en_US.utf8 0 0

Note 1.) The first thing to do is open Synaptic and verify that the package " ntfs-3g " is installed on your system. You can use the Search function in Synaptic by entering " ntfs-3g " in the search field. If it's already checked off, you're good. No check mark means you need to install it.

Note 2.) Before making the change to /etc/fstab, you should open the terminal and enter " sudo mkdir /media/Data " to create a mountpoint for the new entry.

Note 3.) Don't use gedit by itself. Instead, enter " gksudo gedit /etc/fstab " to open gedit with root privalages.

Note 4.) You may have to change the locale. Open the terminal and enter " locale " to see what you're currently using, then replace " locale=en_US.utf8 " with the correct locale.
"Truth is becoming rarer and rarer as time passes. It is only a matter of time before it will cease to exist."

User avatar
gold_finger
Level 9
Level 9
Posts: 2885
Joined: Mon Mar 11, 2013 11:39 pm

Re: Files automatilly deleted from USB Stick

Post by gold_finger »

Just adding one thing to Derek_S's reply above.

Before restarting computer you will need to create the mount point that the /etc/fstab file will be using. To do that, open a terminal and enter this:

Code: Select all

sudo mkdir /media/Data
Please add [SOLVED] to your thread if a solution is found. Go to your first post in the thread, hit "Edit" button and add [SOLVED] to the title of the post.

How To Format Your Forum Posts.

Try Linux Beginner Search Engine for Linux questions.

Post Reply

Return to “Installation & Boot”