[Resolved]Windows 7 failed to start after cloning (dual boot

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

[Resolved]Windows 7 failed to start after cloning (dual boot

Post by nonferrousbueller »

Sorry this is complicated. Hey it involves Windows!

I've recently bought a refurb Dell with a fresh 64-bit Win7Pro install. I ran all updates and installed a fair bit of software. This OS is installed on a 160GB hard drive, and I want this OS on my 1TB WD with a Mint install alongside it for dual-booting. I want a large NTFS partition to share media files between the two. I am hesitant to reinstall W7 as I have downloaded almost a gig of updates and software on metered broadband.

Here's what I've done so far:

-wiped 1TB drive (everything backed up twice...).

-using excellent instructions here: http://nilbus.com/linux/disk-copy.php I created Windows partitions using fdisk matching the first two on the factory drive, down to the block counts. Then I used dd to copy the boot code to new drive, then ntfsclone to copy the actual OS over.

After this I attempted a boot, and got the Windows error "Windows failed to start - boot selection failed because a required device is inaccessible". After a bit of Googling, I decided it was likely that after I installed Mint, GRUB would take care of this, so I went ahead and created an extended partition with /, /home, and /swap, as well as an NTFS partition for media, and installed Mint. Just to confuse things, I shrank the Win7OS partition at the same time using gparted, which I now learn might not have been so bright (there was still about 20GB of overhead after the resize, and I had defragged the Windows partition very recently). I don't think this is causing my current issue, but may soon complicate things.

Now GRUB comes up, and choosing Mint gets me into Mint, but choosing Win7 from the GRUB menu gives me a black screen, a few seconds delay, and then GRUB comes back up.

What have I done wrong?

I installed bootinfo as suggested in another LMF post, and here's the output at pastebin: http://pastebin.com/T6HJYgxz
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Windows 7 failed to start after cloning (dual boot)

Post by austin.texas »

Please post the result of
sudo parted -l
It seems like you had Windows installed in UEFI on a GPT drive, and moved it to a non-GPT (msdos) drive.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by nonferrousbueller »

austin.texas wrote:Please post the result of
sudo parted -l
It seems like you had Windows installed in UEFI on a GPT drive, and moved it to a non-GPT (msdos) drive.
Here's the output:

Model: ATA WDC WD10EARS-00Z (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 368MB 367MB primary ntfs boot
2 368MB 78.4GB 78.0GB primary ntfs
3 78.4GB 236GB 157GB extended
5 78.4GB 120GB 41.8GB logical ext4
6 120GB 227GB 107GB logical ext4
7 227GB 236GB 8772MB logical linux-swap(v1)
4 236GB 1000GB 765GB primary ntfs


I can't figure out how I'd tell UEFI/GPT from this info. I should add I've never dealt with a UEFI computer at all and know nothing about it other than it makes installing Linux a bit trickier.

EDIT - I've had a look through all the BIOS settings and can't see any reference to UEFI, for whatever that's worth.
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Windows 7 failed to start after cloning (dual boot)

Post by austin.texas »

irst, I would recommend that you leave Windows on the 160GB drive, and install Mint on the big drive. That helps keep things separate and easier to deal with. It is not mandatory, of course. It is just what I would do.

The line "Partition Table: msdos" shows msdos partitioning on that drive.
The results you posted show only the big drive. Where is the 160GB drive?
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
mintybits

Re: Windows 7 failed to start after cloning (dual boot)

Post by mintybits »

You seem to have used a convoluted way to clone Windows from your 160GB drive to your 1TB drive.

What you might have done is to just clone one to the other and made sure the clone booted ok. After that, add Mint and a shared data partition.

Using a live dvd, to clone sdx to sdy

Code: Select all

sudo dd if=/dev/sdx of=/dev/sdy bs=1M
Disconnect sdx before rebooting as the duplicate partition UUIDs will confuse the OS
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by nonferrousbueller »

austin.texas wrote:irst, I would recommend that you leave Windows on the 160GB drive, and install Mint on the big drive.
Reasons I haven't done this:
-The 160G drive is dated 2009. Statistically it will fail soon. I've had three <2yo WD Caviars die on me in a six month period, I simply don't trust hard drives.
-Fewer drives - less noise, power, heat
-In addition to fortnightly backups to external HD, I plan on mirroring the entire 1TB drive to another 1TB drive I have. Did I mention I don't trust HDs? Once burned...
austin.texas wrote: The results you posted show only the big drive. Where is the 160GB drive?
Not plugged in when I ran that. I'll reboot under Mint in a while and post that.
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by nonferrousbueller »

mintybits wrote:You seem to have used a convoluted way to clone Windows from your 160GB drive to your 1TB drive.

What you might have done is to just clone one to the other and made sure the clone booted ok. After that, add Mint and a shared data partition.

Using a live dvd, to clone sdx to sdy

Code: Select all

sudo dd if=/dev/sdx of=/dev/sdy bs=1M
Disconnect sdx before rebooting as the duplicate partition UUIDs will confuse the OS
I guess one thing I'm not clear on is what happens when you dd a partition of a certain size to another drive. What happens if the receiving partition is bigger?

Should I create one big NTFS partition on the 1TB drive before doing this or wipe all the partitions first, letting dd create the partition as it copies?
mintybits

Re: Windows 7 failed to start after cloning (dual boot)

Post by mintybits »

You don't need to do any preparation of the 1TB disk.
The dd command I gave does a sector by sector copy starting at sector 0. Afterwards, the 1TB will look as if you took your 160GB drive and added more disk platters to it. You can then expand or add new partitions as you wish.
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by Mark Phelps »

I guess one thing I'm not clear on is what happens when you dd a partition of a certain size to another drive. What happens if the receiving partition is bigger?
You're not copying partitions, you're cloning the entire drive.

If you don't want to erase the contents of the receiving drive, then don't use "dd".
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by nonferrousbueller »

Okay, another six hours or so down the track. I attempted to dd the Windows partition to a 1TB drive with no partitions on it. Couldn't get it to boot. Used all sorts of Windows tricks , bootrec.exe /fixmbr, etc., nothing worked. Finally realised I'm throwing good time after bad and decide to go with a bare install. That gave me heaps of trouble, failing totally the first time. Working the second after some really long waits. I can't believe after all these years Windows still reboots multiple times on an install. Have installed *buntus many times and it's always been a breeze in comparison!

SOOOOoo, I got Win7 installed on its own partition on the 1TB drive (The only other partition now on that drive is a 100MB one Windows put there when it installed). Now I want to shrink that to about 70GB. I tried the Disk Managment tools, but that would only let me shrink the drive to 500GB, even after defragging. Apparently this has something to do with where Windows writes the partition table or something (ie, puts it in the middle of the drive and refuses to move it). I have read various things about using Gparted to resize NTFS partitions, including a dire warning from Mark Phelps (same fella as in this thread?) on Ubuntu forums. I tried anyway, but using Gparted either from a live Mint Distro or from Gparted Live I was unable to make any changes to the NTFS partition. Gparted said I needed to install two other packages, one of which the OS said was already installed and the other which the repos said "didn't have an install candidate". Now I'm not keen to go buying Windows partitioning software that may or may not work - anyone have any suggestions now?
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by nonferrousbueller »

Mark Phelps wrote: You're not copying partitions, you're cloning the entire drive.

If you don't want to erase the contents of the receiving drive, then don't use "dd".
So, if I was to do

Code: Select all

dd if=/dev/sda2 of=/dev/sdb3
what would happen, if anything, to data on partitions sdb1 and sdb2? Or does dd only work on whole drives?
mintybits

Re: Windows 7 failed to start after cloning (dual boot)

Post by mintybits »

nonferrousbueller wrote:Okay, another six hours or so down the track. I attempted to dd the Windows partition to a 1TB drive with no partitions on it. Couldn't get it to boot. Used all sorts of Windows tricks , bootrec.exe /fixmbr, etc., nothing worked.
That's very strange. Did you disconnect the 160GB drive before trying to boot the 1TB drive?


Try this http://www.partitionwizard.com/free-par ... nager.html to shrink your Windows partition. Don't overshrink it...leave at least 20% free.
Mark Phelps
Level 7
Level 7
Posts: 1869
Joined: Mon Jun 10, 2013 4:39 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by Mark Phelps »

what would happen, if anything, to data on partitions sdb1 and sdb2? Or does dd only work on whole drives?
Personally, I don't use "dd" to do cloning or partitioning mainly because if any mistake is made in the command, it's likely to wipe out the destination.

But, the command you wrote SHOULD leave the first two partitions alone.
BlackVeils

Post by BlackVeils »

I just wrote a reply and it got lost.

use gparted from a linux live disc. to "copy" and "paste" the partition, if this is for Windows, include the first small reserved partition.

switch disks via the top-right selector.

copy each one into partitions you created on the destination disk, with the relevant format and size - which should be a bit bigger to make sure it will fit.

Windows needs the boot flag set on one of those partitions, I just can't remember which. you may or may not need to use Windows DVD for startup repair etc.

nothing will happen in gparted until you click the "apply" button at the top.

I have done this myself, its simple and the best you will get without cloning the whole disk.

--- Sent from my Moto G using Tapatalk ---
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by nonferrousbueller »

Mark Phelps wrote: Personally, I don't use "dd" to do cloning or partitioning mainly because if any mistake is made in the command, it's likely to wipe out the destination.
Don't they say dd stands for "disk destroyer"?
Mark Phelps wrote: But, the command you wrote SHOULD leave the first two partitions alone.
Thanks, thought so. And I wouldn't dream of using dd on any disk on which I didn't have a backup of every partition!
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re:

Post by nonferrousbueller »

BlackVeils wrote:I just wrote a reply and it got lost.
Same thing happened to me last night, was composing a post here and my fresh install of Win7 slowed to an absolute crawl. Rebooted, it forced its way into repair mode but of course, it won't repair itself, and won't recognise my password to give me a command line. Re-installing now. Don't know whether to suspect a bad drive or a bad Win7 image, or just "one of those Windows things".

Will try your method for cloning my known good install of Win7 if this doesn't work, thanks for the writeup.

This whole disaster started when I got sick of trying to get Sketchup working again under WINE. Ran fine for two years, then suddenly stopped, and I couldn't get it to reinstall again. Argh.
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by nonferrousbueller »

mintybits wrote:
nonferrousbueller wrote:Okay, another six hours or so down the track. I attempted to dd the Windows partition to a 1TB drive with no partitions on it. Couldn't get it to boot. Used all sorts of Windows tricks , bootrec.exe /fixmbr, etc., nothing worked.
That's very strange. Did you disconnect the 160GB drive before trying to boot the 1TB drive?
Yup. Realised that I had installed Mint on another drive on this machine before the cloning, and grub had probably made changes to the 160GB drive (boot sector? MBR? Don't know correct terminology). So I'm assuming that got copied with the Windows OS, which saw it on bootup and threw up its hands.
mintybits wrote: Try this http://www.partitionwizard.com/free-par ... nager.html to shrink your Windows partition. Don't overshrink it...leave at least 20% free.
Thanks for that, I had legit copy of Partition Magic, but it was 15 years old!
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

Re: Windows 7 failed to start after cloning (dual boot)

Post by nonferrousbueller »

Update.

-Successfully installed Win7Pro to blank 1TB HD (It took three tries, won't bore with details)
-Used Partition Wizard as per suggestion of MintyBits to shrink W7P partition to 70GB. Rebooted Windows, success.
-Booted live Mint USB, with Gparted took unused space after Windows install and added a 150GB Linux Extended partition with /, /home, /swap, and a 700GB+ NTFS media partition. Didn't touch Windows OS partition or the protected 100MB before it. I have NOT yet installed Mint.
-Windows now refuses to boot. Tried all the variations of Bootrec with zero success.

Questions:

-Are there any tools to "rescue" the Windows install? Knoppix? There's nothing of value on that install, but I'd like to know for the next time I hash things up.
-If I end up having to start over, is it likely I would have better luck doing the third step above exclusively with Partition Wizard? I don't see how it should matter, but obviously Gparted did SOMETHING that Windows didn't like.
EDIT - Alternatively, would I be better off (as my wife has suggested) laying out all the partitions FIRST, then installing W7?
Last edited by nonferrousbueller on Fri Dec 12, 2014 3:24 pm, edited 1 time in total.
kukamuumuka

Re: Windows 7 failed to start after cloning (dual boot)

Post by kukamuumuka »

Just a comment:
I have successfully copied Windowses using Grsync. After grsyncing have to remove innecessary desktop.ini file and defragment Windows. Of cource Windows´s boot loader have to install using Windows recovery disk or MS-SYS command. Innnecessary desktop.ini files can remove using the next command:

Code: Select all

cd /media/windows
find . -name "desktop.ini" -exec rm -rf {} \; 
nonferrousbueller
Level 1
Level 1
Posts: 46
Joined: Tue Apr 09, 2013 7:12 pm

[Resolved] Windows 7 failed to start after cloning (dual boo

Post by nonferrousbueller »

Update -

Finally gave up on trying to "fix" anything. With partitions that had been put in place, I formatted the small NTFS partition, wiping out the W7 install. Then reinstalled W7. Rebooted - success. Installed Mint 17 to ext4 partition, rebooted into both. Success.

So now I know that despite what I read on the internet :shock: , it's WAY easier to rebuild a hard drive by reinstalling the OS(s) and all software, then putting the data on it. Some people are slow learners. I wasted easily a dozen hours on this one. Thanks to all who tried to help.
Locked

Return to “Installation & Boot”