一区二区三区日韩精品-日韩经典一区二区三区-五月激情综合丁香婷婷-欧美精品中文字幕专区

分享

Mounting NTFS on FreeBSD · hello world

 陳惠非 2021-05-13

This post helped me figure all this out.

I need to access a USB hard drive in NTFS on FreeBSD. In order to mount NTFS partitions, FreeBSD uses ntfs-3g FUSE module.

First, make sure the fuse kernel module is loaded. This can be done adhoc with kldload fuse. But to have it loaded at boot time, add the following line in /boot/loader.conf:

fuse_load='YES'

Then, install fusefs-ntfs package:

pkg install fusefs-ntfs

Now the OS supports NTFS, you can plugin the device. Use dmesg to figure out the device ID (d0):

da0 at umass-sim0 bus 0 scbus4 target 0 lun 0 da0: <WD Ext HDD 1021 2021> Fixed Direct Access SPC-2 SCSI device da0: Serial Number 574D415A4135333836313839 da0: 40.000MB/s transfers da0: 1907727MB (3907024896 512 byte sectors) da0: quirks=0x2<NO_6_BYTE>

Use gpart to show its partitions:

> ~ gpart show /dev/da0
=>        63  3907024833  da0  MBR  (1.8T)
          63        1985       - free -  (993K)
        2048  3907022848    1  ntfs  (1.8T)

You can also find the device node for the partition under /dev:

? ~ ls -l /dev/da0* crw-r----- 1 root operator 0x72 Feb 3 12:07 /dev/da0 crw-r----- 1 root operator 0x73 Feb 3 12:07 /dev/da0s1

Now we are ready to mount it:

ntfs-3g /dev/da0s1 /mnt -o ro

-o ro makes sure it's mounted read-only. You can remove it to mount it read-write.

Note that I tried to use mount hoping there is a consolidated command for mounting different kinds of file systems. But it wasn't successful:

? ~ mount -t ntfs-3g /dev/da0s1 /mnt mount: /dev/da0s1: Operation not supported by device ? ~ mount -t ntfs /dev/da0s1 /mnt mount: /dev/da0s1: Operation not supported by device

Also note that usually mounting a partition can only be done by root, or using sudo, which result in the mounted path is owned by root:wheel. However you can mount the partition as a specified user and group using uid and gid options.

First, find out the user and group IDs of the preferred user:

# id john
uid=1001(john) gid=1001(john) groups=1001(john),0(wheel)

Now run following command to mount:

ntfs-3g /dev/da0s1 /mnt -o ro,uid=1001,gid=1001

Now /mnt is owned by john:john.

    本站是提供個人知識管理的網絡存儲空間,所有內容均由用戶發(fā)布,不代表本站觀點。請注意甄別內容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現有害或侵權內容,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多

    国内欲色一区二区三区| 亚洲综合色在线视频香蕉视频| 亚洲欧美日韩在线中文字幕| 亚洲欧洲成人精品香蕉网| 冬爱琴音一区二区中文字幕| 99久久精品一区二区国产| 中文字幕无线码一区欧美| 99久热只有精品视频免费看| 国产亚洲系列91精品| 久久福利视频视频一区二区| 五月激情婷婷丁香六月网| 亚洲国产精品一区二区| 成人精品一区二区三区综合| 色婷婷视频免费在线观看| 深夜视频在线观看免费你懂| 91超频在线视频中文字幕| 欧美日韩一区二区综合| 儿媳妇的诱惑中文字幕| 国产一区二区不卡在线播放| 国产一级性生活录像片| 日韩一区二区三区在线日| 免费播放一区二区三区四区| 成人日韩视频中文字幕| 国产高清精品福利私拍| 国产三级视频不卡在线观看| 久久经典一区二区三区| 国产成人高清精品尤物| 熟女高潮一区二区三区| 欧美中文字幕一区在线| 日本国产欧美精品视频| 国产毛片av一区二区三区小说| 激情丁香激情五月婷婷| 男人大臿蕉香蕉大视频| 加勒比东京热拍拍一区二区| 精品日韩视频在线观看| 亚洲综合一区二区三区在线| 久热这里只有精品九九| 污污黄黄的成年亚洲毛片| av在线免费观看一区二区三区| 亚洲中文字幕亲近伦片| 中文字幕亚洲人妻在线视频|