Bug#651106: grub-pc: Windows XP partition assigned wrong root partition
Chris Carr
rantingman at gmail.com
Wed Dec 7 20:44:00 UTC 2011
On Wed, 2011-12-07 at 12:25 +0000, Ian Campbell wrote:
> On Wed, 2011-12-07 at 11:40 +0100, Vladimir 'φ-coder/phcoder' Serbinenko
> wrote:
> > On 05.12.2011 22:31, Chris Carr wrote:
> > > ### BEGIN /etc/grub.d/30_otheros ###
> > There is no /etc/grub.d/30_otheros distributed by either upstream or
> > Debian which leads me to conclution that you created one yourself and it
> > contains the bug you report.
>
> The comment contains:
> # This entry automatically added by the Debian installer for a non-linux OS
> # on /dev/sde1
>
> which suggests that D-I created it and the bug is there, no? Looks like
> in particular it comes from grub-installer although the root bug might
> be in os-prober:
>
> $ cat grub-installer/grub-installer
> ...
> if [ -s $tmpfile ] ; then
> case $grub_version in
> [...]
> grub2)
> if ! $chroot $ROOT which os-prober >/dev/null 2>&1; then
> cat > $ROOT/etc/grub.d/30_otheros << EOF
> #!/bin/sh
> exec tail -n +3 \$0
> EOF
> cat $tmpfile >> $ROOT/etc/grub.d/30_otheros
> chmod +x $ROOT/etc/grub.d/30_otheros
> update_grub # propagate 30_otheros to grub.cfg
> fi
> ;;
> esac
> rm -f $tmpfile
> fi
> ...
>
> Chris said:
> > I can edit grub.cfg manually and it works fine,
> > but every time the package is updated, grub.cfg is regenerated and it
> > is detected incorrectly again.
>
> You can/should edit /etc/grub.d/30_otheros instead.
Many thanks Ian - apologies for my lack of understanding. This bug isn't
in grub, as update-grub is simply re-using the incorrect 30_otheros
every time. Is it ok to reassign it to os-prober, or do I need to do
some more testing first? Perhaps it's best to close it, and then reopen
it if I see the bug reappear on another install? (As I said in my first
post, it's been around for a year or two, so may well have been fixed in
d-i)
CC
More information about the Pkg-grub-devel
mailing list