Quantcast
Channel: Active questions tagged mount+fstab - Ask Ubuntu
Viewing all articles
Browse latest Browse all 699

Changing mountpoint /media/user to /home using fstab made user files disappear

$
0
0

I absentmindedly didn't finish backing up my home directory before doing a clean reinstall. I also absentmindedly didn't set the partition mount point so the home partition was mounted at /media/user by default.

Instead of starting over the reinstall, I defined the UUID in fstab, mounted /media/user/, then changed /media/user to /home in fstab and mounted again. At first all the files disappeared from all the directories involved. After reboot, I saw the default empty directories in /home and nothing under /media/user. Even the partial backup I made in a new folder (/media/home) disappeared. The lines I added are at the bottom:

# /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 installationUUID=39d20bad-b9bd-45ed-a709-531b9e3a5b66 /               ext4    errors=remount-ro 0       1# swap was on /dev/sda6 during installationUUID=af6172b2-c4a3-443b-8a40-b21fb3cb6a97 none            swap    sw              0       0# (identifier)  (location, eg sda5)   (format, eg ext3 or ext4)      (some settings)UUID=18eecef8-913b-4019-abce-3e06f69b10df   /home    ext4          defaults       0       2
/home$ ls -alFtotal 12drwxr-xr-x  3 keizen keizen 4096 Mar 30 17:48 ./drwxr-xr-x 24 root   root   4096 Mar 30 13:11 ../drwxr-xr-x 19 keizen keizen 4096 Mar 31 09:40 keizen/

df -Th gave the following, which worries me because I should have way more than 1.2 G used.

udev           devtmpfs  3.9G     0  3.9G   0% /devtmpfs          tmpfs     785M  1.7M  783M   1% /run/dev/sda1      ext4       19G  6.5G   11G  38% /tmpfs          tmpfs     3.9G  115M  3.8G   3% /dev/shmtmpfs          tmpfs     5.0M  4.0K  5.0M   1% /run/locktmpfs          tmpfs     3.9G     0  3.9G   0% /sys/fs/cgroup/dev/loop3     squashfs   92M   92M     0 100% /snap/core/8689/dev/loop2     squashfs  1.0M  1.0M     0 100% /snap/gnome-logs/93/dev/loop1     squashfs  3.8M  3.8M     0 100% /snap/gnome-system-monitor/135/dev/loop0     squashfs   45M   45M     0 100% /snap/gtk-common-themes/1440/dev/loop4     squashfs  3.8M  3.8M     0 100% /snap/gnome-system-monitor/127/dev/loop5     squashfs  161M  161M     0 100% /snap/gnome-3-28-1804/116/dev/loop7     squashfs   90M   90M     0 100% /snap/core/8268/dev/loop6     squashfs   49M   49M     0 100% /snap/gtk-common-themes/1474/dev/loop8     squashfs   15M   15M     0 100% /snap/gnome-characters/399/dev/loop9     squashfs  1.0M  1.0M     0 100% /snap/gnome-logs/81/dev/loop10    squashfs   55M   55M     0 100% /snap/core18/1668/dev/loop11    squashfs  4.4M  4.4M     0 100% /snap/gnome-calculator/704/dev/loop12    squashfs   55M   55M     0 100% /snap/core18/1705/dev/loop13    squashfs  4.3M  4.3M     0 100% /snap/gnome-calculator/544/dev/loop14    squashfs   15M   15M     0 100% /snap/gnome-characters/495/dev/sda5      ext4      202G  1.2G  191G   1% /hometmpfs          tmpfs     785M   48K  785M   1% /run/user/1000

$ lsblk -e 7 -o name,size,type,fstype,mountpoint

NAME     SIZE TYPE FSTYPE MOUNTPOINTsda    232.9G disk        ├─sda1  18.6G part ext4   /├─sda2     1K part        ├─sda5   205G part ext4   /home└─sda6   9.3G part swap   [SWAP]sr0     1024M rom

I have unmounted the partition to stop overwriting, but only the default home/ directories are visible.

The output of TestDisk (sorry I only have an image link) identifies two partitions that can't be recovered. They are identical in size (429786944) but the Start and End are off by 8 each. Does that mean there are two indices and can I recover my files? Additionally TestDisk says The harddisk seems too small! Check the harddisk size: HD jumper settings, BIOS detection...

Is it possible mounting to /home without deleting the directories there by default caused my desired content to be hidden under the default ones? Any help is appreciated.


Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>