Bug#239111: Grub is shockingly bad code

2009-01-13 Thread Robert Millan
tags 239111 patch thanks Hi, Please could you try the attached patch, and confirm that it works? Thanks -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert Millan
On Mon, Jan 12, 2009 at 07:57:44PM +, Robert McQueen wrote: > I didn't test that, I was basing on my experiences of installing GRUB > manually. I usually do: > > mkdir /boot/grub > cp -a /usr/lib/grub/i386-pc/* /boot/grub > vi /boot/grub/device.map > grub --device-map=/boot/grub/device.map > #

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert Millan
On Mon, Jan 12, 2009 at 08:13:52PM +, Robert McQueen wrote: > > - sync is not enough > > (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=239111#53) > > Correct. This is a property of XFS. As I said, it considers that putting > metadata into the journal, and knowing it's flushed the

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert McQueen
Robert Millan wrote: > It would seem that running sync would suffice for that. Unfortunately, it > seems that: > > - sync is not enough > (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=239111#53) Correct. This is a property of XFS. As I said, it considers that putting metadata into

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert McQueen
Robert Millan wrote: > Grmf. I was making wrong assumptions. This is not about block lists > (I still think block lists suck, but let's be fair...): ... > So we freeze the filesystem and afterwards try to write to it. Not a > good idea... Indeed not. > #239111 initial report claims GRUB hangs

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert Millan
On Mon, Jan 12, 2009 at 08:28:19PM +0100, Robert Millan wrote: > > It's not the log file. Joeyh tried that (see the bug log). > > I'm almost certain it's the fwrite() call in install_func. I could be > wrong, but I still don't see why we would want to use xfs_freeze anyway. > > And if we _real

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert Millan
On Mon, Jan 12, 2009 at 06:57:55PM +, Robert McQueen wrote: > > So no, it's nothing to do with where I'm trying to install GRUB to, the > problem is the Debian patch to grub-install did xfs_freeze on my root > filesystem and then did various crap including trying to write to the > log file (an

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert Millan
On Mon, Jan 12, 2009 at 07:32:49PM +0100, Robert Millan wrote: > > I (and upstream in general) believe that the only right way to rely on a > hardcoded list of blocks that live inside a filesystem is _not to_. Grmf. I was making wrong assumptions. This is not about block lists (I still think bl

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert McQueen
Robert Millan wrote: > Rob, > > Did you hit this problem when installing GRUB to a partition, or to the > whole disk? I was upgrading from etch to lenny on a box where / is XFS and /boot and /var are on the same partition. GRUB is installed into the MBR. I know you can't install bootloaders onto

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert Millan
Rob, Did you hit this problem when installing GRUB to a partition, or to the whole disk? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your dat

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert McQueen
Robert Millan wrote: > Hi Rob, Hi Robert, > You just convinced me that this is completely fucked up. This is not the > first time someone claims to have fixed this problem, only to discover that > it wasn't, and I'm not going to gamble with ioctls, freeze/unfreeze combos > or Linux version check

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert Millan
On Mon, Jan 12, 2009 at 06:15:52PM +, Robert McQueen wrote: > severity 239111 grave > thanks > > Robert Millan wrote: > > The whole approach is wrong, so maybe it makes sense to avoid it, or maybe > > it's too late for that, and we should issue a critical debconf warning when > > XFS is detect

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Steve McIntyre
On Mon, Jan 12, 2009 at 07:00:58PM +0100, Robert Millan wrote: >On Sun, Jan 11, 2009 at 05:16:03PM +, Steve McIntyre wrote: >> Yes, I've looked at the grub2 source and I'm much happier. It doesn't >> look like a novice had written it, which is a major improvement. I'm >> still curious WTH anybo

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert McQueen
severity 239111 grave thanks Robert Millan wrote: > The whole approach is wrong, so maybe it makes sense to avoid it, or maybe > it's too late for that, and we should issue a critical debconf warning when > XFS is detected. > > I will have to think about it. The problem is that Debian's patch to

Bug#239111: Grub is shockingly bad code

2009-01-12 Thread Robert Millan
On Sun, Jan 11, 2009 at 05:16:03PM +, Steve McIntyre wrote: > Yes, I've looked at the grub2 source and I'm much happier. It doesn't > look like a novice had written it, which is a major improvement. I'm > still curious WTH anybody would think the nested functions are a good > thing, though...

Bug#239111: Grub is shockingly bad code

2009-01-11 Thread Steve McIntyre
On Sun, Jan 11, 2009 at 12:26:48PM +0100, Robert Millan wrote: >severity 239111 important >clone 239111 -1 >retitle -1 should refuse to install on XFS unless embedding can be used >reassign -1 grub2 >thanks > >On Sun, Jan 04, 2009 at 02:25:28AM +, Steve McIntyre wrote: >> >> After several hour

Bug#239111: Grub is shockingly bad code

2009-01-11 Thread Robert Millan
severity 239111 important clone 239111 -1 retitle -1 should refuse to install on XFS unless embedding can be used reassign -1 grub2 thanks On Sun, Jan 04, 2009 at 02:25:28AM +, Steve McIntyre wrote: > > After several hours of working through the source, I give up. It's a > total mess and I'd

Bug#239111: Grub is shockingly bad code

2009-01-03 Thread Steve McIntyre
Thanks to Rob McQueen for doing a lot of research into this for his mail about this bug on 12 Dec 2008. Based on that mail, I've looked through the code in an attempt to find a way to implement a reasonable fix: using FIBMAP as he suggested. After several hours of working through the source, I giv