1 |
Martins wrote: |
2 |
|
3 |
> it is possible with fdisk, i did it and it worked, and this is steps i |
4 |
> followed, step 7 wasnt necesary for me: |
5 |
> |
6 |
> |
7 |
> More info about the bug can be found here: |
8 |
> https://bugzilla.redhat.com/bugzill...g.cgi?id=115980 |
9 |
> https://bugzilla.redhat.com/bugzill...g.cgi?id=113201 |
10 |
|
11 |
|
12 |
Note that whatever web browser and method you are using to cut and paste |
13 |
URLs is producing broken links. Fortunately, at least the bug ID was |
14 |
intact so I was able to lookup the bugs. |
15 |
|
16 |
I don't see how either bug applies to Maxim, as he didn't get this after |
17 |
installing FC2, changing from kernel 2.4 to 2.6, or doing anything to |
18 |
his partiton table. He just moved the disk from primary master to |
19 |
(primary slave?). Also, AFAIK this has not been a problem for any |
20 |
Gentoo user using fdisk to partition his drives. |
21 |
|
22 |
> Device Boot Start End Blocks Id System |
23 |
> /dev/hda1 * 63 33732719 16866328+ 7 HPFS/NTFS |
24 |
> /dev/hda2 74692800 78140159 1723680 1c Hidden W95 FAT32 |
25 |
> (LBA) |
26 |
> /dev/hda3 35834400 74692799 19429200 83 Linux |
27 |
> /dev/hda4 33732720 35834399 1050840 82 Linux swap |
28 |
> |
29 |
So I recreated this partition table on a spare 100Gb USB disk: |
30 |
|
31 |
|
32 |
Command (m for help): p |
33 |
|
34 |
Disk /dev/sda: 100.0 GB, 100030242816 bytes |
35 |
16 heads, 63 sectors/track, 193821 cylinders |
36 |
Units = cylinders of 1008 * 512 = 516096 bytes |
37 |
|
38 |
Device Boot Start End Blocks Id System |
39 |
/dev/sda1 1 33465 16866328+ 83 Linux |
40 |
/dev/sda2 74101 77520 1723680 83 Linux |
41 |
/dev/sda3 35551 74100 19429200 83 Linux |
42 |
/dev/sda4 33466 35550 1050840 83 Linux |
43 |
|
44 |
Command (m for help): u |
45 |
Changing display/entry units to sectors |
46 |
|
47 |
Command (m for help): p |
48 |
|
49 |
Disk /dev/sda: 100.0 GB, 100030242816 bytes |
50 |
16 heads, 63 sectors/track, 193821 cylinders, total 195371568 sectors |
51 |
Units = sectors of 1 * 512 = 512 bytes |
52 |
|
53 |
Device Boot Start End Blocks Id System |
54 |
/dev/sda1 63 33732719 16866328+ 83 Linux |
55 |
/dev/sda2 74692800 78140159 1723680 83 Linux |
56 |
/dev/sda3 35834400 74692799 19429200 83 Linux |
57 |
/dev/sda4 33732720 35834399 1050840 83 Linux |
58 |
|
59 |
|
60 |
> |
61 |
> $ fdisk -H 255 /dev/hda # or 240 for some configurations |
62 |
> Command: o (create new partition table) |
63 |
> |
64 |
> 6. by now you have a newly generaed partition table, with the original |
65 |
> disk geometry. Recreate the partitions as they were before: |
66 |
> |
67 |
> Command: n (new partition) |
68 |
> Primary partition (p) |
69 |
> Partition number: 1 |
70 |
> First cylinder: 63 # beginning of first partition |
71 |
> Last cylinder or +size[...]: 33732719 # end of first partition |
72 |
> |
73 |
|
74 |
This doesn't work, because we are still working in cylinders: |
75 |
|
76 |
Partition number (1-4): 1 |
77 |
First cylinder (1-12161, default 1): 63 |
78 |
Last cylinder or +size or +sizeM or +sizeK (63-12161, default 12161): |
79 |
33732719 |
80 |
Value out of range. |
81 |
|
82 |
But I assume what you really meant is to switch to sectors. After |
83 |
recreating all of the partitions in sector mode, I have: |
84 |
|
85 |
Disk /dev/sda: 100.0 GB, 100030242816 bytes |
86 |
255 heads, 63 sectors/track, 12161 cylinders, total 195371568 sectors |
87 |
Units = sectors of 1 * 512 = 512 bytes |
88 |
|
89 |
Device Boot Start End Blocks Id System |
90 |
/dev/sda1 63 33732719 16866328+ 83 Linux |
91 |
/dev/sda2 74692800 78140159 1723680 83 Linux |
92 |
/dev/sda3 35834400 74692799 19429200 83 Linux |
93 |
/dev/sda4 33732720 35834399 1050840 83 Linux |
94 |
|
95 |
Ok, so this seems to work. I didn't know about the 'u' command for |
96 |
fdisk, so thanks for that. |
97 |
|
98 |
But I still have a problem with this from a sanity standpoint. Note the |
99 |
output of sfdisk for the 16-heads vs 255-heads tables: |
100 |
|
101 |
carcharias rjf # sfdisk -l /dev/sda |
102 |
|
103 |
Disk /dev/sda: 193821 cylinders, 16 heads, 63 sectors/track |
104 |
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0 |
105 |
|
106 |
Device Boot Start End #cyls #blocks Id System |
107 |
/dev/sda1 0+ 33464 33465- 16866328+ 83 Linux |
108 |
/dev/sda2 74100 77519 3420 1723680 83 Linux |
109 |
/dev/sda3 35550 74099 38550 19429200 83 Linux |
110 |
/dev/sda4 33465 35549 2085 1050840 83 Linux |
111 |
|
112 |
Disk /dev/sda: 12161 cylinders, 255 heads, 63 sectors/track |
113 |
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 |
114 |
|
115 |
Device Boot Start End #cyls #blocks Id System |
116 |
/dev/sda1 0+ 2099- 2100- 16866328+ 83 Linux |
117 |
/dev/sda2 4649+ 4863 215- 1723680 83 Linux |
118 |
/dev/sda3 2230+ 4649- 2419- 19429200 83 Linux |
119 |
/dev/sda4 2099+ 2230- 131- 1050840 83 Linux |
120 |
|
121 |
Notice all of the extra '+' and '-' signs...those mean that the |
122 |
partitions do not line up with cylinder boundaries, and we probably |
123 |
should have left the partition table at 16-heads. Fdisk may (now) |
124 |
handle this ok, but it is not standard and less intelligent partition |
125 |
tools are likely to throw a fit. Actually, this is what most of the bug |
126 |
reports regarding parted and disk druid are about...they couldn't handle |
127 |
the misalignment. |
128 |
|
129 |
Anyway, my information about fdisk was defintely out of date...the last |
130 |
time I had a direct problem with 255 vs 16 heads was in 1999 or so. |
131 |
Thanks for pointing out that fdisk has more capability that I had given |
132 |
it credit for. |
133 |
|
134 |
-Richard |
135 |
|
136 |
-- |
137 |
gentoo-user@g.o mailing list |