Ubuntu remount hard drive
Posted shengguang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu remount hard drive相关的知识,希望对你有一定的参考价值。
Some times ubuntu user disappeared, need to create the same user again and point to the same home drive, use below command
id -u username sudo useradd --home /home/username --uid 1001 --gid users username sudo chown -R username: ~username
After create a user, the old mounted drive may cannot open already, need to remount again.
Check the current mounting information:
mount -v | grep "^/" | awk ‘{print " Partition identifier: " $1 " Mountpoint: " $3}‘
Unmount the current mounting.
sudo umount /media/sxiao/DiskD sudo umount /dev/sda1
Create the mounting point again.
sudo mkdir /media/sxiao/DiskD
Create the mount.
sudo mount -t ntfs /dev/sda1 /media/sxiao/DiskD
Now the mount already created, but you may still cannot access or open the mounted disk, it is because the ower is root, check the disk information using `sudo ls -all /media/sxiao/DiskD`
Change the ower of the folder to the current user.
sudo chown -R username /media/sxiao/DiskD sudo chown -R username /media/sxiao
以上是关于Ubuntu remount hard drive的主要内容,如果未能解决你的问题,请参考以下文章
The Encrypted Hard Drive (eDrive)