Hi list!

I've just completed migrating my system from one hard disk to another.
Although the new disk reports 512 byte blocks just like the old one, I
thought it would be a good idea to re-align the partitions anyway. I've
done it this way:

1. Create new partitions with gparted, at least as large as the old ones
(rounded up to full MiB).

2. `dd` from the old to the new disk.

3. `resize2fs` to match the new sizes.

4. Install grub ("root (hd1,4); setup (hd1); setup (hd1,4)")

4. Swap disks and reboot.

Unfortunately, the system failed to find the boot loader. There was no
grub error. The disk was simply skipped, as if it was unformatted.

The following steps were taken:

1. Verified that the `dd`ed partitions were sane.

2. Reinstalled grub from live-CD chroots several times.

3. Installed grub on a memory stick and booted from that.

At this point, my partition table looked like this:

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  316MB   315MB   primary   ntfs
 2      316MB   750GB   750GB   extended
 5      317MB   424MB   107MB   logical   ext2            boot
 6      425MB   22.4GB  22.0GB  logical   ext3
 7      22.4GB  28.9GB  6441MB  logical   linux-swap(v1)
 8      28.9GB  750GB   721GB   logical

The first logical partition was the boot partition. The first primary
partition was a laptop-specific recovery partition. This setup was
identical to the old one except that I removed a primary partition which
resided /after/ the end of the extended partition.

At this point, I've reformatted the first primary partition as ext2 and
moved boot to this partition. This solved my problem.

Now, my question is: Why does this work and the old solution doesn't?
Why can't grub boot from a logical partition when it's MiB-aligned? I've
changed nothing that should affect the MBR. Then why wasn't at least the
stage 1 detected?

Thanks in advance!
Florian Philipp

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to