Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Trying to restore/move a Windows7 installation partition

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
andoru
Posts: 272
Joined: 2014-03-14 16:59

Trying to restore/move a Windows7 installation partition

#1 Post by andoru »

I'm not really sure where to post this, as it's not 100% related to Debian, but it's more about manipulating a Windows 7 partition within Debian.

So previously I had an older PC on which I had two SATA drives and an IDE one and on the latter I had Windows 7 installed (I kept it on that drive since I'm not using Windows 7 that often, I'm primarily using Debian as my daily go-to OS), but since then I got a new PC which has no connectivity for IDE, so I had to decommision the drive, and before I did that, I backed up the Windows 7 partition (and the second partition which I used mostly for storing sofware and stuff that I wouldn't want to get wiped after a fresh Windows install) using dd.
Not reading up on this on the internet, doing so with the intention to restore the partition image on the same spot on the disk, but since the SSD is larger than the IDE drive, I made the partitions on it bigger, so there's no chance the Windows 7 partition to be on the same spot on the disk. I tried booting into Windows 7 from GRUB after it successfully detected the Win7 install on the second partition on the SSD, but it just leaves me with a blank screen with a blinking white cursor, so I'm guessing it's not going to fly again. So my question to you: is it possible to ressurect the Windows 7 installation, avoiding having to reinstall Windows? (which would severly complicate things, having to backup and wipe the Debian install I have on the first partition...)

So far I've tried this to fix the Windows 7 install by pointing at the right disk "coordinates": https://superuser.com/questions/349255/ ... 277#349277 (fixntfs.c), but I can't seem to get it to work, all I get is some error in regards to not being able to detect the disk's geometry (I think it was the number heads I couldn't figure out to input in the command line), so I couldn't fix it.

Any other suggestions?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Trying to restore/move a Windows7 installation partition

#2 Post by Head_on_a_Stick »

Add this stanza to the end of the file at /etc/grub/40_custom (*do not* just overwrite the file):

Code: Select all

menuentry "Windows" {
	insmod chain
	insmod ntfs
	set root=(hd0,1)
	chainloader +1
}
You will have to change the "set root=(hd0,1)" bit to match your set up -- in the example above hd0,1 translates as /dev/sda1 because GRUB counts the drives from zero and the partitions from one.

After you have modified 40_custom, run `update-grub` to generate the custom menu entry.
deadbang

andoru
Posts: 272
Joined: 2014-03-14 16:59

Re: Trying to restore/move a Windows7 installation partition

#3 Post by andoru »

I did that, but unfortunately the same thing happens.
Also, I think you meant /etc/grub.d/40_custom :P

Post Reply