rootroot@rootroot-System-Product-Name:/media/rootroot/4TB1$ sudo apt install ntfs-3g
rootroot@rootroot-System-Product-Name:/dev$ sudo fdisk -l
Partition table entries are not in disk order.
Disk /dev/sda: 3.65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: TOSHIBA HDWD240
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A2D6D794-7423-4425-B6A1-882E95B202F3
Device Start End Sectors Size Type
/dev/sda1 34 262177 262144 128M Microsoft reserved
/dev/sda2 264192 7814035455 7813771264 3.7T Microsoft basic data
Partition 1 does not start on physical sector boundary.
rootroot@rootroot-System-Product-Name:/dev$
rootroot@rootroot-System-Product-Name:/dev$ sudo ntfsfix /dev/sda2
rootroot@rootroot-System-Product-Name:/dev$ sudo ntfs-3g /dev/sda2 /media
https://www.cnblogs.com/biaogejiushibiao/p/10261226.html
关于ubuntu挂载ntfs无法进行读写的解决方法
查看挂载信息
df -h
参看要挂载磁盘UUID
sudo blkid
编辑/etc/fstab文件:
sudo vim /etc/fstab
在最后一行添加如下一行信息:
UUID=A248CF4648CF17C5 /home/mikey/MIKEY ntfs defaults 0 0
#要挂载的磁盘UUID 挂载的目录 类型
1.将已经挂载的磁盘进行修复
sudo ntfsfix 分区名称
例如:
sudo ntfsfix /dev/sda2
出现如下则成功
Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sda2 was processed successfully.
2.先卸载以经挂载的磁盘
umount /home/mikey/Mikey
3.如果遇到错误
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
3.再从新进行挂载
mount -o rw /dev/sda2 /home/mikey/Mikey
4.成功
合群是堕落的开始 优秀的开始是孤行
参考资料:
https://blog.csdn.net/weixin_38642130/article/details/87612277
使用ntfs-3g挂载NTFS格式的移动硬盘
rootroot@rootroot-System-Product-Name:/media/rootroot/4TB1$ mkdir 6739
mkdir: cannot create directory ‘6739’: Read-only file system
rootroot@rootroot-System-Product-Name:/media/rootroot/4TB1$ sudo apt install ntfs-3g
[sudo] password for rootroot:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libntfs-3g883
The following packages will be upgraded:
libntfs-3g883 ntfs-3g
2 upgraded, 0 newly installed, 0 to remove and 164 not upgraded.
Need to get 536 kB of archives.
After this operation, 32.8 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 ntfs-3g amd64 1:2017.3.23AR.3-3ubuntu1.1 [388 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu focal-updates/main amd64 libntfs-3g883 amd64 1:2017.3.23AR.3-3ubuntu1.1 [149 kB]
Fetched 536 kB in 7s (79.3 kB/s)
(Reading database ... 161560 files and directories currently installed.)
Preparing to unpack .../ntfs-3g_1%3a2017.3.23AR.3-3ubuntu1.1_amd64.deb ...
Unpacking ntfs-3g (1:2017.3.23AR.3-3ubuntu1.1) over (1:2017.3.23AR.3-3ubuntu1) ...
Preparing to unpack .../libntfs-3g883_1%3a2017.3.23AR.3-3ubuntu1.1_amd64.deb ...
Unpacking libntfs-3g883 (1:2017.3.23AR.3-3ubuntu1.1) over (1:2017.3.23AR.3-3ubuntu1) ...
Setting up libntfs-3g883 (1:2017.3.23AR.3-3ubuntu1.1) ...
Setting up ntfs-3g (1:2017.3.23AR.3-3ubuntu1.1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-27-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p8
I: (UUID=3c02f76d-682e-4377-b58d-d57affd24caa)
I: Set the RESUME variable to override this.
rootroot@rootroot-System-Product-Name:/media/rootroot/4TB1$ cd /dev
rootroot@rootroot-System-Product-Name:/dev$ ll sda*
brw-rw---- 1 root disk 8, 0 11月 26 2021 sda
brw-rw---- 1 root disk 8, 1 11月 26 2021 sda1
brw-rw---- 1 root disk 8, 2 11月 26 2021 sda2
rootroot@rootroot-System-Product-Name:/dev$ ll sd*
brw-rw---- 1 root disk 8, 0 11月 26 2021 sda
brw-rw---- 1 root disk 8, 1 11月 26 2021 sda1
brw-rw---- 1 root disk 8, 2 11月 26 2021 sda2
rootroot@rootroot-System-Product-Name:/dev$ cd sda1
bash: cd: sda1: Not a directory
rootroot@rootroot-System-Product-Name:/dev$ mount -o rw /dev/sda2 /home/mikey/Mikey
mount: only root can use "--options" option
rootroot@rootroot-System-Product-Name:/dev$ sudo apt-get -y --force-yes install ntfs-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Unable to locate package ntfs-config
rootroot@rootroot-System-Product-Name:/dev$ sudo fdisk -l
Disk /dev/loop0: 55.45 MiB, 58130432 bytes, 113536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 219 MiB, 229638144 bytes, 448512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 50.98 MiB, 53432320 bytes, 104360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 65.1 MiB, 68259840 bytes, 133320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 32.3 MiB, 33865728 bytes, 66144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/nvme0n1: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: KIOXIA-EXCERIA G2 SSD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A04A57C4-8AD6-4754-AA51-4D184197F029
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 206847 204800 100M EFI System
/dev/nvme0n1p2 206848 239615 32768 16M Microsoft reserved
/dev/nvme0n1p3 239616 488548135 488308520 232.9G Microsoft basic data
/dev/nvme0n1p4 3905857536 3907026943 1169408 571M Windows recovery environment
/dev/nvme0n1p5 488548352 488863743 315392 154M EFI System
/dev/nvme0n1p6 488863744 489842687 978944 478M Linux filesystem
/dev/nvme0n1p7 489842688 3808202751 3318360064 1.6T Linux filesystem
/dev/nvme0n1p8 3808202752 3827732479 19529728 9.3G Linux swap
/dev/nvme0n1p9 3827732480 3905857535 78125056 37.3G Linux filesystem
Partition table entries are not in disk order.
Disk /dev/sda: 3.65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: TOSHIBA HDWD240
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A2D6D794-7423-4425-B6A1-882E95B202F3
Device Start End Sectors Size Type
/dev/sda1 34 262177 262144 128M Microsoft reserved
/dev/sda2 264192 7814035455 7813771264 3.7T Microsoft basic data
Partition 1 does not start on physical sector boundary.
rootroot@rootroot-System-Product-Name:/dev$
rootroot@rootroot-System-Product-Name:/dev$ sudo ntfsfix /dev/sda2
Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sda2 was processed successfully.
rootroot@rootroot-System-Product-Name:/dev$
rootroot@rootroot-System-Product-Name:/dev$
rootroot@rootroot-System-Product-Name:/dev$ ntfs-3g /dev/sda2 /media
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
rootroot@rootroot-System-Product-Name:/dev$ ntfs-3g /dev/sda2 /media
Error opening read-only '/dev/sda2': Permission denied
Failed to mount '/dev/sda2': Permission denied
Please check '/dev/sda2' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged
rootroot@rootroot-System-Product-Name:/dev$ sudo ntfs-3g /dev/sda2 /media
rootroot@rootroot-System-Product-Name:/dev$