1 |
On Sunday 08 April 2007 15:53:32 dustin@×××××××.us wrote: |
2 |
|
3 |
> Looking at the ebuild, the only thing I see that could do that is the call |
4 |
> to grub itself, and it's probably a serious bug, possibly writing a bit or |
5 |
> byte to the wrong block of the drive. |
6 |
|
7 |
It's changing the file-system field from 0x83 to 0x93. Perhaps an XOR with |
8 |
0xC0. (My 1974 assembler days are showing!) |
9 |
|
10 |
> This looks similar: |
11 |
> http://www.computing.net/linux/wwwboard/forum/28589.html |
12 |
|
13 |
Hm. Perhaps, though I'd say it wasn't quite the same. |
14 |
|
15 |
> I would suggest narrowing it down by running 'fsdisk' in the ebuild |
16 |
> directly before and after the grub invocation: |
17 |
> |
18 |
> fdisk -l /dev/hda; sleep 3 |
19 |
|
20 |
Actually, I used "fdisk -l /dev/hda; sleep 3 | \"; otherwise the script hung |
21 |
at that point. |
22 |
|
23 |
> /sbin/grub --batch \ |
24 |
> --device-map="${dir}"/grub/device.map \ |
25 |
> |
26 |
> > /dev/null |
27 |
> |
28 |
> fdisk -l /dev/hda; sleep 3 |
29 |
|
30 |
Ok, I tried that and the partition table was left untouched - the behaviour |
31 |
had changed by instrumenting it. So I deleted the first call to fdisk, |
32 |
remerged grub-static and got my problem back. Looks like we have (someone |
33 |
has) a timing problem. |
34 |
|
35 |
> and if that does, indeed, change the partition table, then file a bug |
36 |
> with the grub: |
37 |
> http://www.gnu.org/software/grub/grub-legacy-bugs.en.html |
38 |
|
39 |
You don't think I should file a bug on gentoo first? |
40 |
|
41 |
> > Now I'm going to have to boot a CD and run fdisk to delete and |
42 |
> > re-create /dev/hda1, then chroot to the root partition and run grub to |
43 |
> > reinstall itself. |
44 |
> |
45 |
> So long as you don't restart, just running 'fdisk' and resetting the |
46 |
> type should do the trick. The kernel won't recognize the change |
47 |
> immediately, but that's ok -- it will be written to disk (for better or |
48 |
> worse, this is exactly what grub's doing). So you should be able to |
49 |
> test this without having to restart. |
50 |
|
51 |
A useful short-cut - thanks! What's more, it works. |
52 |
|
53 |
> From the look of the ebuild, there is no 64-bit version -- it builds a |
54 |
> 32-bit version unconditionally. I may be misreading that, though. |
55 |
|
56 |
I suppose what I meant was "the standard version that can be compiled on a |
57 |
multi-lib system that's mostly 64-bit", rather than a precompiled version |
58 |
(which is 32-bit). |
59 |
|
60 |
Thanks for the help, Justin, Duncan and Jean-Marc. |
61 |
|
62 |
-- |
63 |
Rgds |
64 |
Peter Humphrey |
65 |
Linux Counter 5290, Aug 93 |
66 |
-- |
67 |
gentoo-amd64@g.o mailing list |