Thursday, May 16, 2013

Cloned Hard Drive AHCI booting with cd - awesome accidental fix


Vinny Eggers emailed to let me know of an unexpected fix.

He had cloned a hard drive, and when he went to use it in another computer, all he got was a blinking cursor.

Both computers had their hard drive type set to "IDE" but were modern computers that also offered "AHCI". Just to try something different to see if he could get it working, Vinny switched the new computer to AHCI and got the BSOD 0x07B screen you would expect to see for a "Windows installed as IDE, and now BIOS attempting to boot as AHCI".

However, this let him know that the hard drive was working, and had a Windows installation going because after the BSOD it would reboot and get to the "Boot in Safe Mode?" prompt.

So Vinny goes back into the BIOS, sets the data type back to IDE, and uses the ntldr is missing bootable cd as the boot device, which bypassed whatever was going on that was just causing the flashing cursor. So Windows loads just fine.

Now the fix, which worked here; was to go ahead and load the AHCI drivers into the Windows installation, then set the data type to AHCI, and it booted and worked just fine on it's own. AHCI is supported by Windows XP from Service Pack 2 forward, so you'll need that to if you don't already have it.

I'll include some of his email so you can get how he got the AHCI drivers into Windows.

"""

- Boot the PC with the NTLDRfix CD
- When in Windows, remove the CD and download the appropriate AHCI driver for your machine (manufacturers usually list it as a pre-install SATA driver, or AHCI F6 driver)
- Go into the Device Manager and look for IDE ATA/ATAPI controllers
- Expand the list and right-click on the storage controller (commonly ICH9 etc) and click update driver
- Choose the option at the bottom of the list and click next, keep doing this until you're met with a list of drivers
(select the manufacturer and model of your hardware device.....)
- Click Have Disk and proceed to install the driver from the location you downloaded/extracted the driver to
- Acknowledge any warnings and restart the machine once you're done (you may have more than one SATA controller to update)
- Go back into the BIOS before the computer boots and switch to AHCI

All going well, your PC should be booting all by itself and with native disk drivers!
"""

Thanks Vinny!

Wednesday, May 8, 2013

Selling TinyEmpire.com - info on making boot disk will still exist


I got an email thanking me for the help and saying they were sad to see I'm selling TinyEmpire.com; but I reassured them that while tinyempire.com may go away, the information about making the boot disk to work around the problem will not, it will likely just be located on another website. A few years back I purchased ntldrismissing.com and requested people link to that instead of tinyempire, and right now I'm pointing it to the specific tinyempire page, but I can point it to whatever other site, probably milescomer.com slash missing.htm if I had to guess.

Whoever runs that ComputerHope website that has the top ranking on google for "ntldr is missing"; I should really reach out and ask them to either link to my new site: ntldrismissing.com , or have them copy the boot disk info in it's entirety, and have them upload the files needed to make it as well. It's not like I own any of the files anyhow, they are all Microsoft system files.

While I'm at it, I'll answer the question "why don't you sue other people who take the files, put it into a boot disk, and sell it"; because they aren't my files. ntldr, ntdetect.com, and a very basic boot.ini is in your Windows XP install right now; if you delete it, you can get copies from the Microsoft installation disk. All I'm doing is making it super easy, giving directions, providing answers if questioned, and adding a bunch of extra choices to the boot.ini file.

And I have to give it away for free; if nothing else because of all the free help I've gotten from all the other webpages out there that give away answers for free :-)

Just xyz before you make the boot disk

I get this email from time to time, someone makes the boot disk and they get back into Windows, they do some digging and find out what the problem was, then fix it; and then email me to let me know how simple of a fix their problem was; and maybe I should just edit my page to list that fix at the top, so other people with a similar problem don't have to go through all the steps of making the boot disk. However, everyones "xyz" is different, if 99% of the time the problem was a loose IDE cable, that's the only thing I'd ever mention, but it's more likely that's the error .1% of the time. When I next sit down to revamp the site, I do want to put in a "I'm reading this from my cell phone and I can't get to another computer to make a boot disk, what are all the things I can try until then" section.

Sunday, June 24, 2012

Diskpart in Windows XP does not show usb drive

In "diskpart" on Windows XP, when you do a "list disk" command it won't show your USB drives. However: It will in Windows Vista or Windows 7. Fun fact: I tried copying diskpart.exe from a Windows7 installation into a Windows XP installation and running it, and got the error message that the file wasn't a valid Win32 application. So don't bother trying that :-)

Sunday, June 17, 2012

Fixing a virtual machine with ntldr is missing error message

Contributed by Nicholas J. Fiorello Jr. 1. Created a snapshot. Might seem kind of silly to snapshot a broken VM, but it prevents anything from making it worse. 2. Configured VM to boot from CD (fixntldr.iso) 3. Booted CD. First choice worked. 4. Discovered that NTLDR, BOOT.INI, and NTDETECT were all missing 5. Changed Administrator Password 6. Shutdown 7. Configured VM to boot from CD (XP iso with SP3) 8. Booted into recovery console. 9. Ran FIXMBR. 10. Ran CHKDSK. 11. Copied NTLDR and NTDETECT from CD 12. Rebooted 13. Created new BOOT.INI 14. Rebooted 15. Removed snapshot

Finding the files on the CD and different startup options

My son called me with the news that the computer would do nothing but display an "NTLDR is missing" message. I tried to give him instructions over the phone, like Robert Stack in "Airplane." Got home, realized the problem is serious. Luckily, I found your site on my Blackberry, followed the instructions and...civilization has returned! Thanks you so much. Couple of suggestions: for Dummies (like yours truly) you could explain how to find the appropriate files for copying from the cd drive to the c drive (I just used the search function, but I was thrown at first when I didn't see the files on the menu). Also, the last instruction, the final instruction, the driving of the golden spike instruction, was different on my machine. I had to go system-advanced-start up and recovery. Just a different set of menus, but again, I was worried that I'd get oh-so-close to the goal and fall short. Anyway, the story ends happily thanks to you, and I'm very grateful!

Fix for Cloning a Win2K partition to a hard drive with a different geometry and getting ntldr is missing

Contributed by Rob Garrett (Rob would like you to consider it speculation until it's had a chance to be test by someone else, and I (Miles) would like you to attempt to backup your data before trying anything if it's super important) Hello Miles! I solved my "NTLDR is missing" problem, and my Windows boots now! Also I solved this problem using a method not explicitly mentioned on your pages: http://tinyempire.com/notes/ntldrismissing.htm http://www.tinyempire.com/shortnotes/files/ntldr_missing.htm Stop me if you've heard this one. My particular "NTLDR is missing" message was being produced by a Win2k partition that had been cloned from a partition on a hard drive with different physical geometry (heads, sectors, etc) . The way I fixed it was by using a hex editor to change a single byte in the boot sector of the cloned partition. That fixed it, and the cloned partition boots now. I was just so damn proud of myself that I thought it'd be fun to tell someone about it, and I thought the owner of the "ntldrismissing.com" domain might be a good choice. So if you are wondering "Who the heck" I am, and if maybe you are wondering if I have written to you before asking you for help fixing my hard drive, or paid you any money, the answer is: "No, I haven't". We have not met before. First let me say thank you for bravely registering the domain "ntldrismissing.com", and also for writing a comprehensive page covering nearly all possible variants of the "NTLDR is missing" problem, plus tools like boot disk and CD images. BTW your boot-CD did allow me to boot into my cloned Win2k partition. However, from there I was unable to figure out how to get my cloned partition to boot on its own. Tried lots of stuff. This is listed below in the section titled: A bunch of stuff I tried that didn't work. Only one thing I tried worked, specifically the editing-the-boot-sector trick, and that's what this story is all about. Anyway, I will naively assume you want to hear this story, and proceed to the gory, gritty details of how I fixed that boot sector, including: which byte got changed, to what value, etc. But first a little background on the cloning operation. I am attempting to copy a Win2k installation from an old laptop hard drive to a new laptop hard drive. The way I image the partition(s) on the laptop hard drive is by booting the laptop with a Linux LiveCD (specifically Feather-Linux, but Knoppix would probably work too), then mounting a Samba share on a remote computer, then using "partimage" on the laptop to do the actual cloning work of reading the hard drive and copying data to an image file on the remote computer. E.g. to mount a Samba share named "bedrock" located on a computer at private network address 192.168.0.5 mkdir /mnt/remote mount -t smbfs -o username=fred,password=ybdbdo! //192.168.0.5/bedrock /mnt/remote Well I say "remote", but the other computer is actually in the same room. In this case "remote" is a figure of speech meaning connected by a network. Did I mention this laptop has a network card, and the LiveCD successfully detects and configures it via DHCP? That part, the getting the network up and running part, is very important! It is necessary for the next step: moving multi-Gb sized image files back and forth. This is done using a utility named "partimage", which is included on the Feather-Linux CD. Note: "partimage" program has a companion server-program named "partimaged", where the "d" is for daemon. It is intended to run on a Linux machine, where the images are stored, and listen for connections from the "partimage" client. Unfortunately, I couldn't figure out to get that stupid thing to work. However I did figure out how to get the Samba daemon running, and the mounting a remote Samba share works just as well. Theoretically that Samba share could be a shared folder on a Windows machine. Although in my case it was running on a Linux machine. I'm kinda running out of space on my Windows desktop PC. Anyway, the setup for "partimage" looks sort of like so: Partition to save/restore /dev/hda1 Image file to create/use /mnt/remote/batman-hda1 And I also click the box that says "Save partition into a new image file". The reverse process of writing a image to a hard drive partition is similar, except I check the box that says "Restore partition from an image file". After restoring the image "batman-hda1" from hda1 from the old laptop hard drive into a new first partition hda1on a new laptop hard drive, this cloned hard drive gave me the infamous "NTLDR is missing" error message. A bunch of stuff I tried that didn't work: Copying new copies of boot.ini, ntldr, ntdetect.com, from a Win2k install CD or from other sources - didn't work. Running fixmbr and fixboot via recovery console via win2k install CD - didn't work. Running a "check" with "fix all errors" on this partition, after booting into it using Miles Comer's "fixntldr4w2k" boot CD - didn't work. Using sysprep.exe - the Microsoft system preparation utility on the drive to be cloned, before cloning it - didn't work. Something that sort of worked: Miles Comer's "fixntldr4w2k" boot CD, made it possible to boot into this Win2k installation. However from there I couldn't figure out how to make the hard drive boot on its own, without relying on the CD. Also note: it had to be the CD. I did not get a chance to try the floppy, as this laptop does not have a floppy drive. I was thinking about giving up, and reinstalling Win2k from scratch, plus all the apps I had on that partition. In fact I even got started on a new Win2k install on this drive. The new first partition was named "silversurfer". Well, I'm not sure if that was actually its name, written on it, when viewed from inside Windows, but for the purposes of the discussion that follows I will call it that. This partition, "silversurfer", the first partition of the new hard drive, had no problems booting Win2k It gave me no "NTLDR is missing" error. In fact this was true even after imaging "silversurfer",and cloning it back. It still booted just fine. But if I cloned "batman" to the same place, it wouldn't boot...except by way of your boot CD. Boot sector editing I really wasn't looking forward to this, but it turned out to be easier than I thought it would be. To make a copy of just the boot sector from a partition, doing this trick under Linux, in my case the Feather-Linux LiveCD, type: dd count=1 if=/dev/hda1 of=/mnt/remote/batman-bs Note for "dd", by default the blocksize is 512 bytes, same as specifying: bs=512. The total number of bytes that gets dumped is count*bs = 1*512 = 512 bytes. I also made a copy of silversurfer's boot sector, and named it "silversurfer-bs". Note my bs suffix stands for "boot sector", not "blocksize", or whatever else bs might stand for. ;-) Number of heads (sides) ? Now somewhere in all the surfing I had been doing, trying to solve this problem I came across that phrase "number of heads (sides)". Also the word "geometry" would come up sometimes too. I think it might have been this article: http://support.microsoft.com/default.aspx?scid=kb;en-us;314057 This article suggested using a program named "sys.exe" from a Win98 startup disk to rewrite the boot partition, using: sys c: The thing I didn't try: I did not get around to trying this. It would have required me acquiring a cd version of a Win98 startup floppy, which probably isn't that hard, but I did not try this. So I don't know if that would have worked or not. The thing that did work : Here are some snapshots of the first 32 bytes of those boot sectors: silversurfer-bs Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F 00000000 EB 58 90 4D 53 44 4F 53 35 2E 30 00 02 08 20 00 ëXMSDOS5.0... . 00000010 02 00 00 00 00 F8 00 00 3F 00 80 00 3F 00 00 00 .....ø..?.€.?... batman-bs Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F 00000000 EB 58 90 4D 53 57 49 4E 34 2E 31 00 02 08 20 00 ëXMSWIN4.1... . 00000010 02 00 00 00 00 F8 00 00 3F 00 FF 00 3F 00 00 00 .....ø..?.ÿ.?... The bytes I am interested in are at offset 18h through 1Bh. According to _Table 32.10 BPB Fields for FAT32 Volumes_ of the _Microsoft Windows 2000 Professional Resource Kit_, here: http://www.microsoft.com/technet/prodtechnol/Windows2000Pro/reskit/part7/proch32.mspx those are the bytes that have something to do with "geometry". The two bytes at 18h and 19h are a word that contains the "sectors per track" geometry value for disks that use INT 13h. The two bytes at 1Ah and 1Bh are a word that contains the "number of heads" geometry value value for disks that use INT 13h. These statements are paraphrased from the Microsoft reference mentioned above, which for some reason used "count of heads" instead of "number of heads". Must be the same thing. Also I'm not sure if the hard drives physically have the number of heads or sides indicated. FFh=255d. 80h=128d What I do know is that this hard drive will boot when it has the "silversurfer" image, but not when it has the "batman" image. So maybe I should try to make the "batman" boot sector look more like the "silversurfer" boot sector, with respect to these geometry parameter thingies? That's a guess. To do this I only need to change one byte. Specifically at offset 1A, I change the FFh to 80h. Now those geometry parameters (offset 18h through 1Bh) look identical to those of the silversurfer boot sector. Then I save this file as "batman2-bs" First 32 bytes of new boot sector: batman2-bs Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F 00000000 EB 58 90 4D 53 57 49 4E 34 2E 31 00 02 08 20 00 ëXMSWIN4.1... . 00000010 02 00 00 00 00 F8 00 00 3F 00 80 00 3F 00 00 00 .....ø..?.€.?... Then I use "dd" to write the new boot sector back to the first hard drive partition. dd count=1 if=/mnt/remote/batman2-bs of=/dev/hda1 Then poweroff. Take out the Linux LiveCD. Power up the laptop, and this time my cloned "batman" Win2k partition boots up just fine. I suspect this hard drives Master Boot Record (MBR) is still the one that got put there when I installed "silversurfer" from scratch, and it still points to the first partition (hda1) or maybe the partition that's marked "active", or something like that. Also I should mention: copying the entire "silversurfer" boot sector onto the cloned "batman" partition - doesn't work. That probably belongs in that list of things I mentioned before... Anyway, that is my story of how I fixed my particular "NTLDR is missing" message, produced by a Win2k partition that had been cloned from a partition on a hard drive with different physical geometry (heads, sectors, etc) . Telling this story to someone was just as much fun as I thought it would be.