[patch] update-grub: savedefault can cause problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub (Debian) |
New
|
Unknown
|
|||
grub (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This bug was originally reported using reportbug. Filing by proxy.
The original bug report follows:
From: Peter Cordes <email address hidden>
To: Ubuntu Bug Tracking System <email address hidden>, <email address hidden>
Subject: update-grub: savedefault can cause problems
Date: Sat, 14 Oct 2006 18:08:03 -0300
User-Agent: Mutt/1.5.9i
X-Mailer: reportbug 3.18ubuntu1
Package: grub
Version: 0.97-1ubuntu9
Severity: normal
(CC'ing Debian BTS, because I would have had the same problem with Sarge
instead of Dapper. Ubuntu's reportbug doesn't handle this very well...)
I have a system using dmraid and booting grub from the Windows boot loader.
Using savedefault prevents grub from booting Linux. Selecting the menu
entry for the Ubuntu kernel, the "kernel" and "initrd" lines show, but then
I see:
....
savedefault
Error 15: File not found
and I have to press return to go back to the main grub menu. If I hit 'e'
and take out the savedefault, it boots normally.
The menu.lst entry wass generated by update-grub:
title Ubuntu, kernel 2.6.15-27-k7
root (hd0,6)
kernel /boot/vmlinuz-
initrd /boot/initrd.
savedefault
boot
As I said, this machine doesn't boot grub the normal way. The machine is
an Athlon XP on an Asus A7V600, with 2 160GB SATA hard drives using
BIOS-driven RAID1. It runs win2k, but I left 5GB at the end of the drives
to play around with; hence Ubuntu. I installed mostly using
http://
real pain compared to setting up /target and using the normal ubiquity
installer...)
I put GRUB on the boot sector of my ext3 partition, not the MBR, using
grub
device (hd0) /dev/mapper/
root (hd0,6)
setup (hd0,6)
And then, instead of somehow chainloading that partition, I did
dd if=/dev/
and after booting into win2k I copied that file to c:\grub.img, and told the
windows bootloader about it with boot.ini:
....
c:\grub.img="GRUB"
So I don't know where grub could save defaults to, and I'm not shocked that
savedefault doesn't work. I've always been suspicious about by default
writing to the hard drive while booting, but this is the first time
savedefault has ever actually caused a problem. My opinion is that it's not
such a great default. The standard grub menu.lst doesn't use the saved
default anyway. I would suggest making savedefault another
automagic-comment configurable item, defaulting to off.
Thanks,
Peter Cordes
-- System Information:
Debian Release: testing/unstable
APT prefers dapper-security
APT policy: (500, 'dapper-security'), (500, 'dapper')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-27-k7
Locale: LANG=C, LC_CTYPE=C (charmap=
Versions of packages grub depends on:
ii libc6 2.3.6-0ubuntu20 GNU C Library: Shared libraries an
ii libncurses5 5.5-1ubuntu3 Shared libraries for terminal hand
grub recommends no packages.
-- no debconf information
Related branches
Changed in grub: | |
status: | Unconfirmed → Confirmed |
Changed in grub: | |
status: | Unknown → Unconfirmed |
Changed in grub: | |
assignee: | ubuntu-bugs → blueyed |
Changed in grub: | |
assignee: | blueyed → nobody |
Changed in grub: | |
status: | New → Fix Released |
Changed in grub: | |
status: | Fix Released → New |
Changed in grub: | |
status: | New → Fix Released |
Changed in grub: | |
status: | Fix Released → New |
On Sun, Oct 15, 2006 at 12:02:14PM +0200, Robert Millan wrote:
>
> Btw, your Mail-followup-to header screwed my reply. Please don't use that
> header when submitting bugs to BTS.
Sorry; I used Ubuntu's reportbug and then changed some headers without
realizing all the headers it sets. Hopefully I'm not causing more problems
by CC'ing Ubuntu's BTS on this. :>
Also sorry for the delay; enough computer problems at work that I didn't
want to look at this one again :(
> On Sun, Oct 15, 2006 at 12:00:39PM +0200, Robert Millan wrote:
> > On Sat, Oct 14, 2006 at 06:08:03PM -0300, Peter Cordes wrote:
> > >
> > > So I don't know where grub could save defaults to, and I'm not shocked that
> > > savedefault doesn't work. I've always been suspicious about by default
> > > writing to the hard drive while booting, but this is the first time
> > > savedefault has ever actually caused a problem. My opinion is that it's not
> > > such a great default. The standard grub menu.lst doesn't use the saved
> > > default anyway. I would suggest making savedefault another
> > > automagic-comment configurable item, defaulting to off.
> >
> > Yes indeed, savedefault is implemented by writing into MBR. Unfortunately, we
> > had to diverge from upstream on this, and it resulted into a handful of problems
> > I'd rather not get into. Given that it's not enabled by default, though, I
> > think it's safe to do another release with it.
It actually is enabled by default. It's the savedefault in every entry
that's the problem, not when reading it by specifying "default saved".
update-grub always writes savedefault in every entry (except the "alternate"
ones), right?
Maybe update-grub could have an option for including savedefault or not, or
it could include it only if it sees a "default saved" or "fallback saved"?
That sounds likely to confuse anyone who actually wanted to figure out what
was going on, but might "just work" for more people.
The error message I included was for Ubuntu's default boot menu, which has
no noticeable difference from Debian's. (no surprise there...)
> > For etch+1 this will all be taken over by GRUB 2.
Happy hacking :)
--
#define X(x,y) x##y
Peter Cordes ; e-mail: X(peter@cor , des.ca)
"The gods confound the man who first found out how to distinguish the hours!
Confound him, too, who in this place set up a sundial, to cut and hack
my day so wretchedly into small pieces!" -- Plautus, 200 BC