Comment 3 for bug 282037

Revision history for this message
Evan (ev) wrote :

Notes from IRC:

< cjwatson> evand: I think your general approach in bug 282037 is fine, although I'm not absolutely sure about the grub-installer patch there. Is it possible that it should look more like the bootremovable stuff in the state=1 branch?
< cjwatson> evand: and how does said bootremovable stuff interact with ubiquity's boot device display? Maybe we ought to rip that out and do the whole thing differently, but we'd still have to make sure to cover both state=1 (only) and state=2 branches ...
< evand> cjwatson: Do you mean by default installing grub to the disk you're installing Ubuntu to, or only doing so when we know hd0 isn't correct, when it would be installing to the installation medium MBR?
< evand> state=1?
< cjwatson> well, I meant that it seems that in state=2 you want the default to be "install to MBR"
< cjwatson> which is the same as what you want if you answer true to the question in state=1
< cjwatson> I mean the 'if [ "$state" = 1 ]' conditional that starts at line 592
< cjwatson> so it seems that both of those cases ought to be handled the same way
< cjwatson> I suspect the reason we didn't notice what was wrong for years was that we thought we'd handled it with that $bootremovable business, but actually that only applies if state=1 is taken
< cjwatson> while it might actually be bypassed
< evand> ah
< cjwatson> like I say I think your basic idea is right though
< evand> can you clarify which one though? I proposed two options, one to always go with the device Ubuntu is being installed to, and the other to go with the device Ubuntu is being installed to if hd0 is the installation medium.
< evand> I suspect the latter, but I want to be sure.
< cjwatson> oh, right, um.
< cjwatson> given the difficulty of detecting what hd0 is it's really hard to say.
< cjwatson> for the time being, I think it may make some sense to special-case installs from USB disks, since then we know that the installation medium is about to be removed and putting the boot loader there will be bad
< cjwatson> i.e. I think your second option is probably better
< cjwatson> an example where the first option would fall down would be if you're installing to a second hard disk, where I think the sensible default is to put the boot loader where the BIOS is actually going to boot from, i.e. the first hard disk
< cjwatson> of course this won't please everyone and some people will call me names for saying the above is the sensible default, but that's why we make it selectable :)
< evand> indeed, that's the exact example I was thinking of. Ok, noted. I'll rework the patch to accomodate this and take another look at handling all states in grub-installer.