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