Cannot use restored NTFS partition on Windows 7

Topics about disk partitioning (fdisk, parted, gparted, partimage), Volumes Management (lvm, evms, dmraid), Storage, file systems, ...
ajax
Posts: 6
Joined: 14 Sep 2010, 21:41

Cannot use restored NTFS partition on Windows 7

Postby ajax » 27 Dec 2014, 19:15

I used GParted with the System Rescue CD 3.8.1 to reallocate the space on the hard drive of a newly acquired laptop that runs on Windows 7 (W7). The objective was to create smaller partitions for running W7 in order to set up for multiboot operation. The partition alterations seemed to work fine. I then used the "partimage" program on System Rescue CD 4.4.1 to create an image file for the W7 partition. This worked fine. I then restored the image file to the new partition previously created for a second W7 system. This worked fine. I can mount the newly created system and the directory structure appears to be correct. GParted also shows all partition information correctly (i.e., size, type of file system, labels, etc.).

However, when I start up the original W7 system on the laptop, the disk management service only shows the new partition as "Primary and Healthy". It doesn't recognize the file system as NTFS. Most significantly the only action it will allow me to take is to delete the partition. I cannot assign a drive letter and it won't even allow me to format it.

I'd be grateful for possible explanations on how to overcome this problem.

vanepp
Posts: 85
Joined: 22 Jun 2012, 02:24

Re: Cannot use restored NTFS partition on Windows 7

Postby vanepp » 28 Dec 2014, 03:45

I'm far from an expert here but a few suggestions til more knowledgable advise comes along.
First upgrade the rescueCD. Current version is 4.4.1 which may have newer ntfs tools than the version you are using. Then consider switching to ntfsclone or partclone instead of partimage. I think that partimage is no longer being developed and thus may not have the latest ntfs support. That said I think you are trying to reduce the size of the ntfs partition(s) and last I tried that (using gparted) reducing the partition size wasn't supported yet (since that was back at about 2.8 that may have changed now though). You can't use ntfsclone to restore to a smaller partition (I don't know about partclone) as noted gparted was supposed to be able to do so in some future release which may or may not have happened yet. I think that some parts of Windows have to be in a fixed offset on the disk which may be a problem (or I could be misinformed!). In any case if you succeed tell us how you did it (and/or wait for better advise!)

Peter Van Epp

ajax
Posts: 6
Joined: 14 Sep 2010, 21:41

Re: Cannot use restored NTFS partition on Windows 7

Postby ajax » 28 Dec 2014, 18:47

Thanks to Peter

I looked into "ntfsclone". Found a man page at http://linux.die.net/man/8/ntfsclone, which, when discussing Windows Cloning, contains an interesting warning as follows:

"Usually, Windows will not be able to boot, unless you copy, move or restore NTFS to the same partition which starts at the same sector on the same type of disk having the same BIOS legacy cylinder setting as the original partition and disk had."

Since I do want to restore the partition that contains W7, to a different location, this is relevant even though it does not explain why W7 won't even recognize the restored partition as one that uses the NTFS file system. That's still a mystery. I will try some other tools to see if that helps.

I should point out that what I'm trying to do is not new for me. I've been using partition cloning techniques for many years to run windows (2000, XP) in a multiboot environment. The biggest problem I've had in those cases is that when you first boot the newly restored partition (at a different drive location) the system starts with the wrong drive letters assigned. However, this problem is easily resolved by simply editing the "MountedDevices" registry key to be what they should be. After that everything works great. My assumption was that, like Linux, windows uses the GUIDs associated with partitions for recognition purposes. I'd expect the GUID to be different whenever the device or location changes.

However, starting with Vista windows has a different mechanism for booting the computer. While, from my perspective, the new design is a big step backward for reasons I won't mention now, I had thought that was the problem I'd be needing to overcome. I wouldn't have imagined the W7, unlike XP and 2000, wouldn't even recognize a restored NTFS partition.

vanepp
Posts: 85
Joined: 22 Jun 2012, 02:24

Re: Cannot use restored NTFS partition on Windows 7

Postby vanepp » 29 Dec 2014, 05:00

As of Win7 they ran out of space in the vbr (the 63 sectors after the mbr) and moved their boot loader in to either a separate reserved partition (usually about 100 megs) or in to the windows system partition (I've seen installations both ways). As well we now have GBT(?) as well as msdos partition tables and eflh bios, I have a pair of new machines with both that I am currently struggling with although the tools (ntfsclone for ntfs, partclone for fat32 eflh and dd for something called msft(?)l that is some new microsoft monstor :-)) work and will backup and restore a system at least to the same places on an identical size disk. I however am lucky enough to have real MS install DVDs to reinstall from if needed to reduce the partition size to multiboot linux and/or freebsd. My brother has am acer machine that comes factory installed (no DVD and no code, it is in the file systemchm somewhere) which I have backed up using the tools but not so far tried to restore but he uses only Windows so as long as backup and restore works he is good.
I'd suggest using parted or gparted to look at the partition table and check the alignment of your partitions. I'd assumed that MS was using lba but if they are in fact still using chr amd your partition isn't chr aligned then Windows will likely not recognize the partition as ntfs as it is looking in the wrong place for the start of the partition. It may be a good idea to do a simple backup and restore in the same place (or to the same place on a different but same model and size disk) to make sure your tool chain works in that case if you haven't already done so.

Peter Van Epp

ajax
Posts: 6
Joined: 14 Sep 2010, 21:41

Re: Cannot use restored NTFS partition on Windows 7

Postby ajax » 29 Dec 2014, 22:08

Peter, clearly we're wrestling with the same bear.

Alignment is something, I must admit, I've never had to worry about but I have recently read some things somewhere which make it sound like it matters. It looks like I should plan to learn a bit about it. However, I'm pretty sure that the new partition (i.e., the third one) into which I am trying to restore the image created from the second partition was created by W7. I also think that I only allocated the space when creating the partition. In that, it was not formatted by W7. If so that would mean that both the partition from which the image was obtained and the one to which it is being restored were both created by W7 and therefore I'd think are similarly aligned. They are also both the same size.

I've also read where MS, starting with Vista, uses a different MBR as part of their start-up revisions. It is a bit astounding that MS is taking the position that they own the whole disk, which is implied by owning the MBR. While my own knowledge is pretty much limited to BIOS based computers (i.e., those that use a traditional MBR), one would think that the newer approaches are the appropriate way for a vendor to deal with whatever limitations might be perceived with the old fashioned MBR. Especially since it is old fashioned is a good reason to leave it that way. Why does MS think they should reinvent the MBR?

My W7 computer has a recovery partition (around 10GB) that is the one marked as active and serves as the boot manager. MS seems to want to call this the "System" partition even though it is for booting and then wants to call the partition the system operates from the "Boot" partition. Go figure? Anyway they also have the idea that MS Disk Management won't tell you what kind of partition it is nor allow W7 to assign a drive letter so that it can be inspected. However, with the help of System Rescue CD you can tell that it is an NTFS partition with very few files that appear to be their own proprietary archives.

While the idea of separate partition to act as the boot manager is something I've been doing for a long time (i.e., MS DOS running Bootmagic and also GRUB) it is a really lousy idea to have to depend on them for booting (i.e., they are for convenience) which appears to be the case for W7. I've always made sure the partition which contains an executable OS (DOS, Linux, Windows in my case) is completely self contained. In that, you should be able to make it active and boot it. Up to now that has worked well.

I did experiment with Partclone via the Clonezilla CD, without very good results. While Partclone uses an interactive approach (i.e., wizard style) that is similar to Partimage, which I'd say I like, I'd also say that theirs is terrible. I haven't yet found anything like it for Ntfsclone. Given what, I think, is a bit more critical need to get the correct specification for what you are trying to do, than for most things, I like the wizard approach. This is especially true given that I'm only wanting to do these things occasionally.

vanepp
Posts: 85
Joined: 22 Jun 2012, 02:24

Re: Cannot use restored NTFS partition on Windows 7

Postby vanepp » 31 Dec 2014, 23:04

I'm a luddite (and learned Unix in the late 80s on data center server machines with serial consoles usually no X) so I tend to use the command line versions of commands. As far as I know MS hasn't done anything to the partition table, they have just moved the win boot loader (or extended it, I haven't checked if the vbr is unused by win7) in to a separate hidden from windows ntfs boot partition (mine are around 100 megs in size about 20 megs in use). As well there is a new standard partition table called gpt (needed for 4 tb disks) that does replace the mbr. In addition there is a new bios standard called uefi which W7 can use to boot without having a dvd key (ie for factory installed OS). That (at least in my case) has a 100 meg fat32 formatted boot partition replacing the Win7 ntfs formatted boot partition and a 128 meg partition called msftres which none of the tools know and (I assume) contains the keys. I use dd to backup and restore this. The Win7 main partition is ntfs as usual.
As to your partition problem if you have just created a partition in unused space then you typically need to format the partition to ntfs before Windows (or ntfsclone) will recognize and use it. Windows and ntfs-3g appear to look for some data structure in the file system and are unhappy if it isn't formatted. I typically use gparted in X for that but I expect there is a command line equivelent as well inn ether parted or the ntfs-3g package or even in mkfs somewhere .
As to partclone, as far as I know it is command line only and doesn't use menu as partimage does. I expect that Clonezilla wraps the command line version in a perl script to give the wizard version and there isn't any reason you couldn't do the same using menu for the gui to make yourself a wizard although you would have to write it yourself.

Peter Van Epp

Peter Van Epp


Return to “Hard-disk partitioning and storage”

Who is online

Users browsing this forum: No registered users and 5 guests