Fix ntfs formatted disc in trisquel

18 réponses [Dernière contribution]
nevermoreraven
Hors ligne
A rejoint: 10/15/2014

GParted 0.18.0 --enable-libparted-dmraid --enable-online-resize

Libparted 2.3
Check and repair file system (ntfs) on /dev/sda3 00:00:01 ( ERROR )

calibrate /dev/sda3 00:00:00 ( SUCCESS )

path: /dev/sda3
start: 41166848
end: 976771119
size: 935604272 (446.13 GiB)
check file system on /dev/sda3 for errors and (if possible) fix them 00:00:01 ( ERROR )

ntfsresize -i -f -v /dev/sda3

ntfsresize v2013.1.13AR.1 (libntfs-3g)
Device name : /dev/sda3
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 479029383680 bytes (479030 MB)
Current device size: 479029387264 bytes (479030 MB)
Checking for bad sectors ...
Bad cluster: 0x6c21fd7 - 0x6c21fd7 (1)
Bad cluster: 0x6c64c8d - 0x6c64c8d (1)
Bad cluster: 0x6c64d07 - 0x6c64d07 (1)
ERROR: This software has detected that the disk has at least 3 bad sectors.
****************************************************************************
* WARNING: The disk has bad sector. This means physical damage on the disk *
* surface caused by deterioration, manufacturing faults or other reason. *
* The reliability of the disk may stay stable or degrade fast. We suggest *
* making a full backup urgently by running 'ntfsclone --rescue ...' then *
* run 'chkdsk /f /r' on Windows and rebooot it TWICE! Then you can resize *
* NTFS safely by additionally using the --bad-sectors option of ntfsresize.*
****************************************************************************

========================================

Do I do the ntfsresize --bad-sectors on the hard drive or on the image created by ntfsclone or both?

I tried fixing this problem in windows from command prompt I did "chkdsk /f /r /x" and says everything is fine but its not. I can't boot into windows 10.
This happened when I did a check windows disk for errors and it got shutdown by accident before it could finish.
Does this mean I should get a new hard drive? I think my fan is broken could that have damaged the disk?

Is there any commands in trisquel that I could fix my ntfs filesystem?

jxself
Hors ligne
A rejoint: 09/13/2010

Try checking the S.M.A.R.T. status with smartctl -H /dev/sda but if a disk is developing bad sectors I no longer trust it and immediately begin moving data to somewhere else.

"I think my fan is broken could that have damaged the disk?"

Heat could have. The S.M.A.R.T. results should talk about heat if that's been an issue.

See https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes for info on what various things mean especially the ones colored pink.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

Yes, there is: 'sudo ntfsfix' (followed by the NTFS partition). But it does less than 'chkdsk'.

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

smartctl -H when I enter this command it says it doesn't exist. What package do I need to install to be able to use it?

lembas
Hors ligne
A rejoint: 05/13/2010

smartmontools

antiesnob
Hors ligne
A rejoint: 08/22/2013

Hello tha.

First, you need to know if the bad blocks are phisycal bad blocks or logical bad blocks. For this u go to System Configuration->Disks->Select the disk on the left. At your right there's a Tools symbol. Click on it and the get the SMART information. If there's no SMART information is because you have to activate it thru da BIOS.
There you want the "reallocated sectors", "bad sectors non corrected" and "bad sectors pending". See how many there are if there's any. If the number of non corrected bad sectors plus the bad sectors pending for reallocation is 3, we'd say you have phisycal bad blocks. If there's not a single one, it means you have logical bad sectors.
Give feedback on this and I (we) could help you.

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

Do you think this could be a mistake by trisquel?
Windows says the partition is healthy and the smartctl -H /dev/sda3 says it passed.
This happened after I upgrade from windows 7 to windows 10 after I upgraded to windows 10 I am not able to mount my ntfs partition and gparted gives a warning sign next to the partition that is where windows 10 is installed on.

Disks says "Disk is OK, 7 bad sectors (37° C / 99° F)".

I haven't gotten around to fix the fan yet. Because it is the most complicated hardware replacement I have done so I am sort of paranoid that I will break something. I have worked on desktop pcs to refurbish them at a recycling company but never on laptops tho. I have a Dell Inspiron N5050.

How can I force mount the ntfs partition for read only so I can backup files and then get rid of windows and install trisquel instead???

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

I am done with microsoft their software sucks so bad I had so many issues with windows 10. Now time to only use Free Software! :)

Dell Inspiron N5050 works great with trisquel and has 3d acceleration capability so you can play free software 3d games.
The only thing that doesn't work is the wifi card but you can replace it easily inside it is real easy to replace like replacing ram on most computers or laptops. Just buy a mini card or the usb external wifi cards from think penguin and you are good to go everything will work then. :)

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

Error mounting /dev/sda3 at /media/tyler/OS: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda3" "/media/tyler/OS"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda3': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

figured it out here is how to do it from command prompt.

"sudo mount -o mount,ro /dev/sda3/" without the quotes and it works! :)

Just find the partition location you need to mount in gparted in System Settings.

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

Now time to backup Winblows and then install trisquel over it! I am free at last free at last thank god almighty I am free at last! :)

lembas
Hors ligne
A rejoint: 05/13/2010

Congrats, doesn't it just feel great?

antiesnob
Hors ligne
A rejoint: 08/22/2013

I'm kinda in a hurry. So, the bad sectors are phisycal bad sectors --- that's bad --- I'll try tomorrow to give u an advice on how to solve that (if it is possible in your case).
The error of mounting you can possibly fix it doing:
# sudo ntfsfix /dev/sda3
(it must be unmounted- no, seriously, it must be unmounted)

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

I think it is an error maybe in trisquel because ever since I upgrade to windows 10 I got those errors about bad sectors in trisquel. Also when I check to see if the disk is healthy it passes also chkdsk doesn't find any problems.

antiesnob
Hors ligne
A rejoint: 08/22/2013

chkdsk only detecs logical bad blocks. You have 7 bad blocks, meaning you have 7 physical bad blocks, and that info was taken from the SMART. It's about the disk not about the file system.
What you do need to know is if those sectors are on which state:
a) Non recoverable bad blocks
b) Remapped/reallocated
c) Pending of reallocation

The health status health as passed doesn't mean you don't have bad blocks or another issue. It is just an overall thing that evaluates if the disc can continue going on or not.

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

How do I find out which state they are in? Are any of the states better than the others?

antiesnob
Hors ligne
A rejoint: 08/22/2013
nevermoreraven
Hors ligne
A rejoint: 10/15/2014

sudo ntfsfix /dev/sda3
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/sda3 was processed successfully.

After this I am able to mount the disk and I don't get mounting errors anymore.

nevermoreraven
Hors ligne
A rejoint: 10/15/2014

How do I find out which state they are in? Are any of the states better than the others?