How many of you have had that sinking feeling as your PC boots up? You know, a slight niggle in the back of your mind that says “this is taking longer than usual” before Windows drops dead in front of you, and refuses to play ball.
Me too, and much of the time the original Windows CD/DVD How To Make Your Own Windows Live CD How To Make Your Own Windows Live CD Read More /USB How To Install Windows 7 On Netbook From A USB Drive How To Install Windows 7 On Netbook From A USB Drive Read More you used in your original install can’t fix the problem. You need something else. Something like a whole operating system, either installed on a separate partition or in Live CD/USB format. Enter Ubuntu Ubuntu 10.04 - An Extremely Simple Operating System [Linux] Ubuntu 10.04 - An Extremely Simple Operating System [Linux] Read More !
There’s a good few reasons to have Ubuntu on a CD or USB stick somewhere in a draw. It’s free, to start with. You don’t need to install it to use it, and it’s great for accessing a butchered Windows partition – even if it’s just to get your precious documents back before a format.
When it comes to fixing your broken Windows install then Ubuntu has its uses there too. If you happen to break your registry Top 5 Freeware Registry Cleaners That Improve PC Performance Top 5 Freeware Registry Cleaners That Improve PC Performance Cleaning the registry will rarely improve Windows performance and it's risky. Yet many swear by registry cleaners. You too? At least use one of these tools because they're the safest you will find. Read More or master boot record, then fear not – all is not lost. This technique should work on any Ubuntu-based Linux distributions Why Are There So Many Versions of Ubuntu? [Technology Explained] Why Are There So Many Versions of Ubuntu? [Technology Explained] Read More .
Download, Install & Boot Ubuntu
Those of you who already have a dual-boot Ubuntu and Windows How to Set Up a Dual Boot Windows & Linux System with Wubi How to Set Up a Dual Boot Windows & Linux System with Wubi Read More machine can skip this step.
If you’ve not got a Live USB stick then you’re going to need to get hold of one. UNetbootin How To Install Linux With Ease Using UNetbootin How To Install Linux With Ease Using UNetbootin We've already talked about Linux and why you should try it, but probably the hardest part of getting used to Linux is getting it in the first place. For Windows users, the simplest way is... Read More is a useful tool which enables you to create a USB stick with a bootable version of your favourite open source operating system preloaded. If you’d prefer to use a CD, download an Ubuntu disk image and burn it with ImgBurn ImgBurn - Easy & Free CD and DVD Burner App ImgBurn - Easy & Free CD and DVD Burner App Read More .

If you’re dual-booting, then this is a simple step of choosing Ubuntu over Windows at boot. For Live USB sticks 100 Portable Apps for Your USB Stick for Windows and macOS 100 Portable Apps for Your USB Stick for Windows and macOS Portable apps let you take your favorite software anywhere via a flash drive or cloud storage. Here are 100 of them to cover your every need, from games to image editors. Read More and CDs you’re going to need to enter the BIOS setup as your PC boots (usually by pressing F2 or Del) and arrange your boot devices to prioritize your USB device or CD drive to boot before your main hard drive.
If you’ve done everything correctly you’ll see the UNetbootin bootloader appear. From here you’ll want to boot directly into the operating system. After a minute or two you’ll see the desktop appear, and we’re ready to begin.
Fixing A Corrupted Windows NTFS Partition
Luckily you can schedule an NTFS consistency check within Ubuntu to attempt to repair your tattered Windows partition, but you’re going to need to install a couple of things. It is worth mentioning that this should work with any NTFS drive that refuses to mount in Ubuntu too. Open a Terminal window by clicking Applications, Accessories and then Terminal.
First install NTFS-3G by typing this command:
sudo apt-get install ntfs-3g
Enter your password and hit Enter on your keyboard. Next install NTFSProgs in the same way:
sudo apt-get install ntfsprogs
Now with both of those tools at your disposal, you can set about fixing Windows. First locate your Windows partition. In the Terminal type:
sudo fdisk -l
You’re looking for an entry that looks like this:
/dev/sda2 * 638 12312 93773824 7 HPFS/NTFS
The important bit is the /dev/sda2 which tells us where the Windows partition is mounted. HPFS/NTFS lets us know that the partition is a Microsoft Windows formatted device, and that little star denotes that this is a bootable partition.
So in my case /dev/sda2 means that Windows is on sda (my internal hard drive) and that it’s partition 2 that I want to play around with.
Armed with this information you want to use NTFSProgs to attempt to fix the partition. In your Terminal window type:
sudo ntfsfix /dev/<device name>
Replace <device name> with your Windows partition (e.g. /dev/sda2) and enter your password followed by Enter. Your drive will now be mounted, checked for consistency and any errors found should be fixed. Restart your PC to assess the situation, if all goes well you’ll see Windows.
Fixing A Corrupt Master Boot Record
If you’ve got a problem with Windows’ oh-so-important boot record then you can also fix that from within Ubuntu too. Assuming you’ve already booted into Ubuntu, open up Terminal and install lilo by typing:
sudo apt-get install lilo
Enter your password to proceed with the installation, you’ll get a few warnings pop-up along the way.
If you followed the first part of this tutorial you’ll know which partition Windows is installed on, if you missed it type:
sudo fdisk -l
Find the HPFS/NTFS partition that relates to your Windows install, and type:
sudo lilo -M /dev/mbr
Replace <device name> with your Windows partition (e.g. /dev/sda2) and hit Enter. Ubuntu will attempt to restore your master boot record. You’ll probably want to restart your machine now, just make sure you take any Live CD/USB devices out as you do.
Conclusion
If you’re still having problems with a Windows install, and you’ve tried everything then don’t forget you can mount the partition and rescue as much data as you think you’ll need. Using the terminal, enter:
sudo mkdir /media/windows
sudo ntfs-3g -o force,rw /dev/<device name> /media/windows
Replace <device name> with your Windows partition location and the drive should pop-up on your desktop.

Has Ubuntu saved your bacon recently? Do you dual-boot with Windows? Thinking about making a Live CD just in case? Let us know below.



Life saver! It works.
Thank you for this article, total life saver!
I use Linux as my only OS now, but have a ntfs partition on a raid0 disk array that suddenly vanished. I tried testdisk and various partition recovery software and they scanned for hours and just gave me jibberish and would even crash my machine during the scan!
One command from your article and 2 seconds later it was fixed.. *doh!*
Thank you, thank you, thank you!
What do I have to do if instead of LILO I have Grub? It 's the same procedure?
Was dealing with this problem for almost 13 hours now... Finally i did fix it thanks to your post Thank You Very MUCH! also for the people who want to add Windows to the Grub list after you fix the partition just type in the Terminal: sudo update-grub
This will detect and add windows automatically to the list, and if you still facing problems then use boot-repair tool from Ubuntu. Thanks again. God Bless.
The "ntfsfix" command does NOT "fix" corrupted NTFS partitions, it only manages very small errors related to the dirty bit. For serious NTFS recovery you need something else:
http://askubuntu.com/a/776317/271
if your data is valuable to you you should never ever (try to) write to a corrupt filesystem ("fixing" == writing). boot linux from a removable device, mount the partition read-only and try to copy as much data as you can; if that is not possible, generate a disk-image with ddrescue or sth- like that.
generally, keep OS and user-data apart; best on two different disks (at least two partitions); windozw has to reinstalled qwuite often and this makes it much easier and more reliable.
if you disk is already unreliable it is a really dangeruous idea to install another OS on that; also messing with the mbr can render windoze completely useless.
a good tool for rescue is systemrescuecd http://www.sysresccd.org
(i'm just bit-by-bit-recovering a really bad disk for a friend who made this much harder by using ideas like the ones propesed here)
NTFSPROGS not a valid package anymore?
ntfsprogs has been merged with ntfs-3g.
Thank you man! Helps a lot!!!
Thanks so much
thank you very much dude...
ubuntu fixed the broken partition ..
respect...
I get this error:
Refusing to operate on read-write mounted device /dev/sde2.
I forgot to mention. I specified the partition on the 320gb where Windows XP is installed, but it is telling me that it is refusing to do the operation. I can view all files on both partitions on the 320gb drive. It is just that Windows XP can't seem to locate its own partition and will not launch.
I tried ntfsfix and it did not work. I have I have a dual-boot system where I have Ubunto 10.04 on an 80gb hard drive configured as master and I have another 320gb drive configured as slave with two partitions, one containing Windows XP and the other is for data storage. Windows stopped launching, and claims it cannot find the drive where it is installed. When I boot into Linux, I can see both partitions of the 320gb drive. When I run sudo fdisk -l, all of the partitions on the 80gb drive where Linux resides are displayed, as well as all of the partions on the 320gb. But when I try to run ntfsfix, I just get an error message saying it is refusing to do the operation on that drive. Why is it refusing? Do Linux and Windows have to physically reside on the same hard drive in order for it to work?
I tried the fix you suggested but how could you fix this error:
"unable to read this file system. because of some operations may be unavailable. The cause might be a missing software package. the following list of software packages is required for ntfs file system support: ntfsprogs / ntfs-3g"
Thanks mate! You really helped me out. You may also want to mention that all tthis doen't even need access to the Internet to download anything. Using Ubuntu 8.04 live disk.
I did ntfsfix, and lilo, but my hard disk continues not booting on windows. i´m now trying to copy as much as i can. bu, hey! thank you a lot!
Thenk you so much!!!!
Thank you so much. I was in a llop where the BIOS did not see the system partition to boot from. I have been searching for and trying solutions for days and the sudo apt-get install ntfs-3g has now icked some life into my boot sequence.
I can now run win 7 from a usb to repair (I hope).
It did merge all of my partitions though so be aware of this beofre hand.
What a mess and all from a free download off CNET that my virus scan didn't catch. BE WARY!
Now to fix the issue with my external HD which is not visible to any OS.
Thanks again
Hi there,
I have a 2TB portable external drive showing suddenly as "raw". Testdisk says file system is corrupt.
Cannot find ntfsprogs- says not available using apt-get?
Any hope here? I'm running Mint Mate 17.1 but have access to Windows & Minitool Data Recovery licenced version. Just trying for a MFT/MBR fix first, rather than multi-hours of recovery files to sort through.
Help??
Thanks a lot!!!
My pc is in dual boot win7/linux-mint. I had a problem with the pins of the CF-reader: from that moment on, win7 started refusing to boot. Also from the linux-mint system the ntfs partition was not accessible. I tried with the win7 recovery disk, but all I got was:
===
Root cause found:
System volume on disk is corrupt.
Repair action: File system repair (chkdsk)
Result: Failed. Error code = 0x1f
Time taken = 0 ms
===
Then I came here: from the terminal of my linux-mint I typed "sudo ntfsfix /dev/sda2" and in just 2 seconds the error was fixed.
Really thanks!!!
BW
How can i fix a windows partition gone Raw what commands can i use I have a HBCD can i use that
jinky
i have done watever you the steps you mentioned here but what i want to know is how to replace the device name at the end...please tell me
"Find the HPFS/NTFS partition that relates to your Windows install, and type" l cant find any sda related to ntfs. l am trying ubuntu from a live USB image. The asterix shows my live USB drive. No other drive listed as sda...
when i give the command "sudo fdisk =l" i get this below message. how to proceed with it? help..
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
any ways out?? im using windows 8.1 which is corrupted and refusing to load with winload.exe corrupted.
using ubuntu live from usb
Fantastic info , very well explained and helpful at least in my case ( I had an issue with an external 2T drive) . Much appreciate the help, you saved me hours of scanning through irrelevant info. Cheers.
Wow, this article was published in Sept 2010 – very pleased that the information is still relevant and could help you solve your issue :)
I Had The Cd Come, I Did Try It, It Works, But You Can't Download Anything.
Thanks - that was just what i neded to "Fix A Corrupted Windows NTFS Partition" -wooderfull, it saved me at least 24 hours of reinstalling.
Many thanks
Jesper
Thanks - that was just what i neded to "Fix A Corrupted Windows NTFS Partition" -wooderfull, it saved me at least 24 hours of reinstalling.
Many thanks
Jesper
Unable to locate package ntfs-g
New to Ubuntu. Latest ubuntu 10.10 running on flash drive to fix an ailing netbook ...
It's actually:
sudo apt-get install ntfs-3g
Probably why you can't find it! Though I wrote this for 10.04, I'm fairly sure it should still work with the latest build.
It's actually:
sudo apt-get install ntfs-3g
Probably why you can't find it! Though I wrote this for 10.04, I'm fairly sure it should still work with the latest build.
thanks, I made a guess it was possible to recover an NTFS partition, did a web search and bam it worked! nice!
thanks, I made a guess it was possible to recover an NTFS partition, did a web search and bam it worked! nice!
thanks for this, i had a problem with master boot record and it's solved
Okay. I'm sold. When I fired up my pc, 30 minutes ago, she went into fixing file mode. I'm no geek. However, I know bad when I see it :)
Ubuntu works!! Had a laptop with Vista and could not boot or access recovery partition. Booted wih Ubuntu sticks and could recover all data. A have to have.
It appears the ms-sys package has been removed from the repositories due to licensing issues, so instead I'm putting up instructions for lilo. You can install it by opening the Terminal and typing:
Then repair your MBR by typing:
The article will be updated soon, hope this helps.
Well spotted, the article will be amended shortly with instuctions for lilo.
ms-sys was removed from the repositories a while ago due to licensing issues.
BIG NOTE HERE!!!: ms-sys was taken out of the repositories back in Ubuntu 8.0.4. So many sites point to using ms-sys and say "just apt-get install it!" If you were wanting to use ms-sys to restore the MBR, you'd HAVE to download the source code, two libraries (I think), and compile it from source. I've done that one more than once to repair the MBR. A tool which IS included on the live CD (last I checked) is "install-mbr" and I believe I've had good luck with that tool (http://manpages.ubuntu.com/man... The other option I've read (but not tried) is to repair it using lilo (http://ubuntuforums.org/showth...
BIG NOTE HERE!!!: ms-sys was taken out of the repositories back in Ubuntu 8.0.4. So many sites point to using ms-sys and say "just apt-get install it!" If you were wanting to use ms-sys to restore the MBR, you'd HAVE to download the source code, two libraries (I think), and compile it from source. I've done that one more than once to repair the MBR. A tool which IS included on the live CD (last I checked) is "install-mbr" and I believe I've had good luck with that tool (http://manpages.ubuntu.com/manpages/lucid/man8/install-mbr.8.html). The other option I've read (but not tried) is to repair it using lilo (http://ubuntuforums.org/showthread.php?p=6361212)
Well spotted, the article will be amended shortly with instuctions for lilo.
ms-sys was removed from the repositories a while ago due to licensing issues.
With Windows 7 and Vista using BCD as a means of booting the OS, do these tools help to recover from a corrupted BCD>
Article nicely written and quite understandable.
I'm using Ubuntu 10.04.1 with current updates. Am not able to locate the "ms-sys" package in US repositories. Where can I find it?
Why use "force, rw" options if you are only going to back-up data? Isn't that a bit risky to an already fragile system?
Article nicely written and quite understandable.
I'm using Ubuntu 10.04.1 with current updates. Am not able to locate the "ms-sys" package in US repositories. Where can I find it?
Why use "force, rw" options if you are only going to back-up data? Isn't that a bit risky to an already fragile system?
It appears the ms-sys package has been removed from the repositories due to licensing issues, so instead I'm putting up instructions for lilo. You can install it by opening the Terminal and typing:
Then repair your MBR by typing:
The article will be updated soon, hope this helps.
Already done these things.....
Just the sort o thing I needed. Gonna give it try.
thank you
This is a really excellent read for me. Must admit that you are one of the best blogger I ever saw. Thanks for posting this useful article.
Windows CD/DVD has always worked using chkdsk and fixmbr. Might give it a try in the future as a last ditch effort.