0

I have ubuntu 14.04 installed on my 64Gb flash card. It is not live and I am not guest user, 100% sure. I don't remember how exactly I created it, but filesystem is ext4 and I have no swap. It worked fine until the day all saved files have been removed after regular reboot. So system behavior look like liveUSB. I can save/delete no files permanently. All new files are erased after each reboot. I had some issues with 'read-only file system' before (file system spontaneously turns to read-only), but simple reboot was enough to fix it. I have tried fsck, but I am not sure of appropriate options. Any suggestions or configuration requests are welcome. Thank you!

df output:

Filesystem     1K-blocks     Used Available Use% Mounted on
udev             2012448        4   2012444   1% /dev
tmpfs             404648     1312    403336   1% /run
/dev/sda1       60793916 52100200   5589104  91% /
none                   4        0         4   0% /sys/fs/cgroup
tmpfs              65536     1272     64264   2% /tmp
none                5120        0      5120   0% /run/lock
none             2023236      292   2022944   1% /run/shm
none              102400       40    102360   1% /run/user
tmpfs              10240      780      9460   8% /var/log

sudo lsblk -f output

NAME   FSTYPE LABEL MOUNTPOINT
fd0                 
sda                 
└─sda1 ext4         /
sr0         

sudo lsblk -m output:

NAME     SIZE OWNER GROUP  MODE
fd0        4K root  floppy brw-rw----
sda     58,9G root  disk   brw-rw----
└─sda1  58,9G root  disk   brw-rw----
sr0     1024M root  cdrom  brw-rw----

sudo e2fsck -cf /dev/sdb1 output

    e2fsck 1.42.9 (4-Feb-2014)
Checking for bad blocks (read-only test):   0.00% done, 0:00 elapsed. (0/0/0 err
done                                                 
/dev/sdb1: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdb1: 662079/3866624 files (0.5% non-contiguous), 13244484/15441152 blocks
  • 1
    Please edit your question, and add the output of the following three command lines (in a terminal window), df , sudo lsblk -f , sudo lsblk -m – sudodus Jan 05 '17 at 16:35
  • better, post the output of fsck from a live boot and also the health of your hard drive with smartmontools - https://help.ubuntu.com/community/Smartmontools . Sounds as if your hard drive is failing. See also http://askubuntu.com/questions/539184/how-do-i-check-the-integrity-of-a-storage-medium-hard-disk-or-flash-drive – Panther Jan 05 '17 at 16:39
  • @sudodus I have included the required information – peremeykin Jan 05 '17 at 18:35
  • The posted information does not really help me that much. Can you look at the links I gave you. – Panther Jan 05 '17 at 18:38
  • "How do I check the integrity of a storage medium (hard disk or flash drive)?" - http://askubuntu.com/questions/539184/how-do-i-check-the-integrity-of-a-storage-medium-hard-disk-or-flash-drive . What is your question ? testdisk supports some usb drives so .... – Panther Jan 05 '17 at 18:49
  • OK, you are right, you have an installed system without swap, which should be OK in a computer with enough RAM. I would suggest that you use following fsck command. Boot Ubuntu live from another drive, or insert the card into another computer with linux. Make sure that the ext4 partition is not mounted. sudo e2fsck -cf /dev/sdx1 Now the drive letter x is a, but in the live system or another computer, it will probably be another letter, maybe b or c. Check that with lsblk (as before). – sudodus Jan 05 '17 at 18:49
  • @sudodus please take a look at my e2fsck output. It seems that my drive is not totally broken, is it? I don't completely understand whether fsck is used to repair the drive or just check it? – peremeykin Jan 05 '17 at 21:27
  • The file system was modified, but only minor modifications, that it 'dares' do without asking you. Overall it looks good. I don't think the file system is causing your problem. - Now that there are some minor modifications, maybe you can keep saved files again. At least you can try. Boot, create a small file and reboot. Is it still there? - Otherwise I have one concern - the file system is rather full, 91% used. I think it will work better if you remove (or move to another drive) enough files, to reach below '80% used', as seen by df. – sudodus Jan 05 '17 at 21:36
  • You can also run the command sync to flush the buffers. Wait until the prompt returns. And shutdown the computer after that. It should increase the chance that the files are really saved before things are turned off. – sudodus Jan 05 '17 at 21:39
  • @sudodus I still can't save any files permanently (after fsck). Also I can't delete any files to free space. I have tried sync earlier with no effect. – peremeykin Jan 05 '17 at 21:47
  • Have you got another drive, where you can backup your important files? The pendrive might be failing. It looks like it is getting close to 'gridlock', or maybe it is already gridlocked. Another alternative is that the operating system is damaged (a software damage). After backing up the important files, you can wipe the whole device with mkusb. It can release lock-ups in the internal system of the pendrive - It has a small processor inside, and we cannot reach it with our tools, but we can release the load by letting things go to zero and let it replace failing memory cells with fresh ones. – sudodus Jan 05 '17 at 21:57
  • See this link about pendrive lifetime. It applies to memory cards too. http://ubuntuforums.org/showthread.php?t=2196858&p=13199297#post13199297 – sudodus Jan 05 '17 at 22:02
  • @sudodus mkusb is not able to wipe anything on my drive. All files are exists as before after mkusb wipe (with no errors) and remount. I tried to format it with GParted with no success also. When I remount it I see old ubuntu files. It seems that my flash drive became useless. – peremeykin Jan 06 '17 at 13:27
  • Now I am convinced that your USB pendrive is damaged, probably gridlocked as described at http://ubuntuforums.org/showthread.php?t=2196858&p=13199297#post13199297 - Please save your data to another drive as soon as possible, before the drive is completely dead. – sudodus Jan 06 '17 at 13:42

0 Answers0