1 |
Hi list! |
2 |
|
3 |
I've just completed migrating my system from one hard disk to another. |
4 |
Although the new disk reports 512 byte blocks just like the old one, I |
5 |
thought it would be a good idea to re-align the partitions anyway. I've |
6 |
done it this way: |
7 |
|
8 |
1. Create new partitions with gparted, at least as large as the old ones |
9 |
(rounded up to full MiB). |
10 |
|
11 |
2. `dd` from the old to the new disk. |
12 |
|
13 |
3. `resize2fs` to match the new sizes. |
14 |
|
15 |
4. Install grub ("root (hd1,4); setup (hd1); setup (hd1,4)") |
16 |
|
17 |
4. Swap disks and reboot. |
18 |
|
19 |
Unfortunately, the system failed to find the boot loader. There was no |
20 |
grub error. The disk was simply skipped, as if it was unformatted. |
21 |
|
22 |
The following steps were taken: |
23 |
|
24 |
1. Verified that the `dd`ed partitions were sane. |
25 |
|
26 |
2. Reinstalled grub from live-CD chroots several times. |
27 |
|
28 |
3. Installed grub on a memory stick and booted from that. |
29 |
|
30 |
At this point, my partition table looked like this: |
31 |
|
32 |
Number Start End Size Type File system Flags |
33 |
1 1049kB 316MB 315MB primary ntfs |
34 |
2 316MB 750GB 750GB extended |
35 |
5 317MB 424MB 107MB logical ext2 boot |
36 |
6 425MB 22.4GB 22.0GB logical ext3 |
37 |
7 22.4GB 28.9GB 6441MB logical linux-swap(v1) |
38 |
8 28.9GB 750GB 721GB logical |
39 |
|
40 |
The first logical partition was the boot partition. The first primary |
41 |
partition was a laptop-specific recovery partition. This setup was |
42 |
identical to the old one except that I removed a primary partition which |
43 |
resided /after/ the end of the extended partition. |
44 |
|
45 |
At this point, I've reformatted the first primary partition as ext2 and |
46 |
moved boot to this partition. This solved my problem. |
47 |
|
48 |
Now, my question is: Why does this work and the old solution doesn't? |
49 |
Why can't grub boot from a logical partition when it's MiB-aligned? I've |
50 |
changed nothing that should affect the MBR. Then why wasn't at least the |
51 |
stage 1 detected? |
52 |
|
53 |
Thanks in advance! |
54 |
Florian Philipp |