0

I have an disk image with 3 partitions: first partition (hd0,0) is boot-able with GRUB1 with the following configuration GRUB file:

default=0
timeout=5
title Bank A
        root (hd0,1)
        chainloader +1

title Bank B
        root (hd0,2)
        chainloader +1

The partitions (hd0,1) and (hd0,2) are also boot-able. I'm trying to clone partition (hd0,1) to (hd0,2) by creating device map using kpartx and copying whole partition using dd command.

The problem is: after partition cloning, the cloned partition did not boot (but all files are OK). What the wrong?

I need both partitions to bee identical (I'm using them for fail-over purposes into embedded device)

Dima
  • 485
  • 3
  • 7
  • 15
  • Define "did not boot". What were the observed symptoms? What were the error messages? – JdeBP Jun 30 '11 at 13:25
  • I did not see any error message, when I selecting boot from "Bank B" (hd0,2) I see "press any key to continue" message number of times and immediately after I see GRUB menu with Bank A/Bank B selection (the same menu as in (hd0,0) partition) – Dima Jun 30 '11 at 14:19

2 Answers2

1

I'm suspecting that you have to re-grub the boot sector on hd0,2 since the physical locations of the special boot files are different between hd0,1 and hd0,2. This would be a logical reason that a dd copy of hd0,1 to hd0,2 would not boot hd0,2.

mdpc
  • 11,856
  • 28
  • 53
  • 67
  • Can I do something with it? To modify pointer to "new" boot sector or something like that? – Dima Jun 30 '11 at 14:21
0

Check to make sure 'hd0,2' is not partitioned as extended logical. You cannot boot from logical partitions. Alternatively if it has worked previously?! Then try booting from live CD and repair MBR.

Bitmap
  • 125
  • 6
  • All partitions are primary. The MBR is OK because I can boot and run boot on (hd0,1) partition. – Dima Jun 29 '11 at 23:09