I just got a new PC (HP P7-1380T) with Windows 7 preinstalled. The machine is set up for EFI booting without 'secure boot'. I had planned to install my old SATA drive (dual-boot XP and Linux with grub in the MBR) as a secondary drive to copy both windows and linux files over to the new drive - and then leave it in as a backup device. The problem is that I can't install the old drive in a way that both Windows and Linux can see it.
The machine came with its hard drive in SATA0 and a DVD/ROM drive in SATA2. SATA1 and SATA3 are free.
When I plug my old drive into SATA1, I can't boot Windows 7. The EFI bootloader tries to boot from the old SATA1 drive instead of the new SATA0 drive. It gets as far as loading up the grub boot menu, at which point I power off to prevent further mischief. In SATA1, the old drive shows up in the BIOS, and when I boot Linux from a live CD, it sees it as /dev/sdb.
When I plug my old drive into SATA3, it doesn't show up in the BIOS, and when I boot the live linux CD, it does not see the drive either. But with the drive in SATA3, Windows 7 boots, and it sees the old XP partition and makes it available as drive F:.
I would prefer to use SATA1, obviously, so Linux can use the drive, but so far, I can only have Windows or Linux see it, but not both. Why would the EFI Windows bootloader try to boot off of a secondary drive, when it's obviously set up to boot off of SATA0? Is there some tool I can use to change this behavior?
31 Answer
Since it's got Windows XP on it, your old drive almost certainly uses MBR partitions and a BIOS boot loader. Unfortunately, there's no standardization in how modern EFI systems react when they're shown two disks, one of which uses GPT and an EFI boot loader and the other of which uses MBR and a BIOS boot loader. You may be able to get the disk to be ignored by fiddling with firmware settings or the boot order, but that might not be enough. Along those lines, look for boot order options or options to disable "CSM" or "legacy" support. You might also try enabling "fast boot" support.
If none of this works, you might consider an alternative:
- Install both disks.
- Boot an emergency Linux system from the optical drive. Something like System Rescue CD or Parted Magic should work well.
- Use the emergency system to copy all your files from the old disk to the new disk.
- Optionally, power down, remove the old disk, boot up using your new installations, and check that your files are all accessible. Reboot into the emergency system.
- Launch
parted, GParted, orgdiskon the old disk. - Create a new (empty) GUID partition table on the old disk. You do this in
partedwith themklabelcommand, in GParted by using the Device->Create Partition Table dialog box and its Advanced option, and ingdiskby typingoin the main menu and then saving the changes withw. This should render the disk unbootable in BIOS mode, so it won't present the problem you're having now. - Create new partitions and filesystems on the old disk. Be sure to use a GPT-aware tool, such as
parted, GParted, orgdisk; do not usefdisk,cfdisk, orsfdisk! - In the emergency system or after rebooting into your regular installation, begin using the old disk as a backup disk.
Of course, this procedure means that you won't be able to boot Windows XP or your old Linux installation. If you want to retain the ability to boot Windows XP, you'll need to look harder for a firmware-based solution; or perhaps you could do an image backup of the XP partition and try to run it using a virtual machine -- but a complete re-installation of XP makes more sense in that case.
5