Background#
I have a windows system hard disk and want to backup its old data to my freebsd service
Installation#
Load fusefs kernel module#
-
Load the module
-
Setup to load the module at startup
Install the NTFS file system#
1
|
pkg install fusefs-ntfs
|
Mount the NTFS disk#
Get the device info#
Use dmesg
Get the device info
1
2
3
4
5
6
7
8
9
10
|
umass0 on uhub0
umass0: <Ugreen Ugreen Storage Device, class 0/0, rev 2.10/1.00, addr 1> on usbus0
umass0: SCSI over Bulk-Only; quirks = 0x0100
umass0:4:0: Attached to scbus4
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <CT1000MX 500SSD1 0> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number 0000000247EA
da0: 40.000MB/s transfers
da0: 953869MB (1953525168 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
|
Use camcontrol devlist
The device info
1
2
3
4
5
|
<TSSTcorp CDDVDW SN-208FB TM00> at scbus0 target 0 lun 0 (cd0,pass0)
<HGST HTS721010A9E630 JB0OA3J0> at scbus1 target 0 lun 0 (pass1,ada0)
<HFS256G3AMNB-2200A 10108L00> at scbus2 target 0 lun 0 (pass2,ada1)
<AHCI SGPIO Enclosure 2.00 0001> at scbus3 target 0 lun 0 (pass3,ses0)
<CT1000MX 500SSD1 0> at scbus4 target 0 lun 0 (da0,pass4)
|
As we can see, the device is da0
Show the part of the disk#
We can see the device has 6 partitions.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
=> 34 1953525101 da0 GPT (932G)
34 2014 - free - (1.0M)
2048 1083392 1 ms-recovery (529M)
1085440 204800 2 efi (100M)
1290240 32768 3 ms-reserved (16M)
1323008 207159698 4 ms-basic-data (99G)
208482706 1646 - free - (823K)
208484352 1230848 5 ms-recovery (601M)
209715200 2048 - free - (1.0M)
209717248 1334204416 6 ms-basic-data (636G)
1543921664 409603471 - free - (195G)
|
Mount the part#
- Mount the partition 4
/dev/da0p4
to /mnt/ntfs/part4
1
|
ntfs-3g /dev/da0p4 /mnt/ntfs/part4
|
- Mount the partition 6
/dev/da0p6
to /mnt/ntfs/part6
1
|
ntfs-3g /dev/da0p6 /mnt/ntfs/part6
|
Troubleshooting#
1
2
3
4
5
6
|
Windows is hibernated, refused to mount.
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
|
Use ntfsfix
to fix the part