On Sunday 08 April 2007 15:53:32 [EMAIL PROTECTED] wrote: > Looking at the ebuild, the only thing I see that could do that is the call > to grub itself, and it's probably a serious bug, possibly writing a bit or > byte to the wrong block of the drive.
It's changing the file-system field from 0x83 to 0x93. Perhaps an XOR with 0xC0. (My 1974 assembler days are showing!) > This looks similar: > http://www.computing.net/linux/wwwboard/forum/28589.html Hm. Perhaps, though I'd say it wasn't quite the same. > I would suggest narrowing it down by running 'fsdisk' in the ebuild > directly before and after the grub invocation: > > fdisk -l /dev/hda; sleep 3 Actually, I used "fdisk -l /dev/hda; sleep 3 | \"; otherwise the script hung at that point. > /sbin/grub --batch \ > --device-map="${dir}"/grub/device.map \ > > > /dev/null > > fdisk -l /dev/hda; sleep 3 Ok, I tried that and the partition table was left untouched - the behaviour had changed by instrumenting it. So I deleted the first call to fdisk, remerged grub-static and got my problem back. Looks like we have (someone has) a timing problem. > and if that does, indeed, change the partition table, then file a bug > with the grub: > http://www.gnu.org/software/grub/grub-legacy-bugs.en.html You don't think I should file a bug on gentoo first? > > Now I'm going to have to boot a CD and run fdisk to delete and > > re-create /dev/hda1, then chroot to the root partition and run grub to > > reinstall itself. > > So long as you don't restart, just running 'fdisk' and resetting the > type should do the trick. The kernel won't recognize the change > immediately, but that's ok -- it will be written to disk (for better or > worse, this is exactly what grub's doing). So you should be able to > test this without having to restart. A useful short-cut - thanks! What's more, it works. > From the look of the ebuild, there is no 64-bit version -- it builds a > 32-bit version unconditionally. I may be misreading that, though. I suppose what I meant was "the standard version that can be compiled on a multi-lib system that's mostly 64-bit", rather than a precompiled version (which is 32-bit). Thanks for the help, Justin, Duncan and Jean-Marc. -- Rgds Peter Humphrey Linux Counter 5290, Aug 93 -- [email protected] mailing list
