LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Replace WinXP in multiboot with image from WinXP in single boot (https://www.linuxquestions.org/questions/linux-newbie-8/replace-winxp-in-multiboot-with-image-from-winxp-in-single-boot-4175476048/)

AppFzx 09-05-2013 10:57 AM

Replace WinXP in multiboot with image from WinXP in single boot
 
1 Attachment(s)
I started with a WinXP only system.
320Gb partitioned evenly 160 + 160.

I created a new system as follows:
Installed in this order WinXP, Win7x86, Win7x64, LinuxMint15x64
Screenshot of partitions is attached.

When I boot, first I go to Grub2

|Linux Mint 15 Cinnamon 64-bit, 3.8.0-19-generic (/dev/sda3)
|Linux Mint 15 Cinnamon 64-bit, 3.8.0-19-generic (/dev/sda3) -- recove
|Memory test (memtest86+)
|Memory test (memtest86+, serial console 115200)
|Windows Recovery Environment (loader) (on /dev/sda1)


choosing Linux of course goes directly to Linux. Choosing Windows loader gives:

|Windows Boot Manager
|Choose an operating blah blah blah...
|XP-32B
|W7-32B
|W7-64B


I made the XP partition big enough to copy in an image of my old standalone XP computer but when I copy it in with Clonezilla, the computer boots straight to XP. (not surprising since its SDA1)

Ideally, I'd like to copy XP in and have GRUB list all 4 operating systems.

I've tried a few methods to no avail. Any ideas how to get this working?

syg00 09-05-2013 05:53 PM

You can't do it like that because of the way the Windoze installer replaces the loader code when (M$oft interpretation of) "dual boot" is attempted.
If you "hide" each (all) of the prior Windoze partitions before each subsequent install, you might get what you want. Grub probably won't care whether they remain hidden or not, can't remember if the M$oft loader requires at least one to be un-hidden.

GlennsPref 09-05-2013 06:09 PM

Hi

Quote:

I've tried a few methods to no avail
What methods have you tried?

You should be able to re-install grub2 from mint to have all the OS's display at boot prompt.

Personally, I set a /boot partition of less than 400Mb, But I'm only dual booting.

Your Winxp restore is writing over the mbr, you can reset this with dd

Quote:

to clean/wipe mbr...including partition table....
dd if=/dev/zero of=/dev/foo7 bs=512 count=1

dd if=/dev/zero of=/dev/sd(x) bs=512 count=1

http://www.gnu.org/software/grub/grub.html

retain partition table...clear only first 446 bytes.
dd if=/dev/zero of=sd(x) bs=446 count=1

NOT sda1,
This link may help, from Arch-Linux wiki.

yancek 09-05-2013 07:05 PM

Windows needs its boot files on a primary partition and the only windows primary you have is the xp on sda1. I expect if you looked on sda1, you would find not only the xp boot files but also the windows 7 boot files. Windows bootloaders are backward compatible so that an install of windows 7 should detect and create a menu for xp but the reverse would have to be done manually.

http://www.sevenforums.com/tutorials...artitions.html

Grub2 also chainloads windows rather than directly booting it.

TobiSGD 09-05-2013 07:35 PM

Quote:

Originally Posted by GlennsPref (Post 5022657)
Your Winxp restore is writing over the mbr, you can reset this with dd

Restoring an image to sda1 can by definition not overwrite the MBR. The problem is here that the XP image does not contain the Windows 7 bootloader. For some unknown reason Microsofts insists on having the second stage of the bootloader on sda1.
The solution is actually straight-forward:
- Restore the XP image
- Use a Windows / DVD to repair the bootloader (this will overwrite your MBR)
- Use a Linux Live-CD to reinstall Grub

If you want to have all OSes in one boot menu you can't accomplish this with Grub, but you can accomplish this with the Windows bootloader. After you let Windows 7 repair the bootloader do not install Grub to the MBR, but to your /-partition. Now use software like EasyBCD to add Linux to your Windows bootloader.

John VV 09-05-2013 08:28 PM

for this
" WinXP, Win7x86, Win7x64, LinuxMint15x64"
i would install a VM on Linux Mint and run virtual installs of the old XP and 32 bit 7 and 64 bit 7

AppFzx 09-06-2013 10:15 AM

Methods I've tried all start with copy in old WinXP with Clonezilla and then:
-use EasyBCD but it fails to find the configuration file so:
-install WinXP bootloader to MBR from EasyBCD in WinXP
-install Win7 bootloader to MBR from EasyBCD in WinXP
-boot from live and try to install grub

@TobiSGD I'll try your suggestion today and post results.

AppFzx 09-10-2013 07:14 AM

Fail Fail Fail :(
All the following leads to fail.
I ended up restoring again and now I'm going to copy Old XP into another partition and have a 5 boot system. Owell.

Still posting what happened even though it didn't work:
-----------------------------------------------------------------
Starting with machine restored to configuration in screenshot and all OS's properly shut down.
Clonezilla backup of my old WinXP single boot machine.
Reboot to clonezilla live usb stick made with tuxboot 0.5
Restore Old WinXP in place of new. (sdc1, see screenshot in original post. That's WinXP)
Download and burn a Windows 7 Ultimate iso from digitalriver (yes, it's legal)
Make a bootable USB out of Win7 install disk using Universal-USB-Installer
Reboot computer after Clonezilla is done. (it goes straight to XP)

Download Install Run EasyBCD (it complains "The boot configuration data store could not be opened...Would you like to manually load a BCD registry... blah blah" -- NO
BCD Deployment (button on left side)
Bottom group: MBR Configuration Options - Install the Windows Vista/7 bootloader to the MBR - Click Write MBR
Restart ... Hope ... ... ... Curse ... ... ... Hope ... ... twiddle thumbs ... See WinXP again. Curse ... reboot with Win7 USB stick in drive
Click "Repair Your Computer" ... 'Searching for Windows installations...'
Windows found problems with your computer's startup options - view details - yep, it found all the windows installs. click "Repair and restart" -- "Failed to save startup options."
Manually do lots of command line things following several tutorials around the interwebs to try to rebuild c:\boot\bcd. Even copied it from the New XP image and that didn't work. (although it said missing NTLDR instead so I chased that one for a while. NTLDR was there the whole time but it didn't like it...)

Finally ran chkdsk with /f option and that fubar'd the drive.
Thank you Microshaft for "fixing" things for us.

GlennsPref 09-10-2013 09:03 PM

Windows can't boot from an extended partition.

Quote:

The old-school approach is to have only one primary partition, followed by an extended partition. This is no longer needed for NTFS volumes; in fact, if you’re setting up a dual-boot system, each OS must have its own primary partition.
ref. http://helpdeskgeek.com/windows-xp-t...cal-partition/

Quote:

You can have only 4 primary partitions (3 if you decide to have an extended partition), whereas you can have an arbitrary number of logical partitions. There are no OS-specific advantages other than older versions of Windows must be installed on a primary partition and that the legacy MBR bootloader can only boot from a primary partition.
ref. http://superuser.com/questions/33714...ical-partition

TobiSGD 09-10-2013 10:03 PM

Quote:

Originally Posted by GlennsPref (Post 5025564)
Windows can't boot from an extended partition.

Only true for XP or if you not use the recommended boot partition for Vista/7. Since XP lies on a primary partition here a separate boot partition for 7 is not needed, it will just use the XP partition as boot partition.

GlennsPref 09-10-2013 10:39 PM

Thanks for the input.

Seems like a lot of effort for 3 versions of win.

You'd have no probs if they (the Windows installs) were on separate drives.

I seen a few unsolved hdd partitioning threads of late(,windows?).

some trying to multi-boot flash-memory drives.

I'm still learning

cheers

to the op, when it comes to partitioning, ime, keep it simple.

Remove all the partitions and start with a plan, and end with a table of "consecutive" partitions. (nice and neat)

it may save you pain later.

John VV 09-10-2013 11:23 PM

I would install mint
then a VM
then the 3 different versions of windows on the VM


All times are GMT -5. The time now is 12:41 AM.