Bug#268828: grubconf: Destroys/Overwrites menu.lst without notice
Ralf Heiringhoff
Ralf Heiringhoff <ralf@frosty-geek.net>, 268828@bugs.debian.org
Fri, 17 Sep 2004 02:37:44 +0200
--qFgkTsE6LiHkLPZw
Content-Type: multipart/mixed; boundary="bajzpZikUji1w+G9"
Content-Disposition: inline
--bajzpZikUji1w+G9
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi,
>Keep in mind that Grubconf is meant to be simple and is meant for those
>who don't want to touch the actual configuration file. As much as
>possible should be handled transparently, including the notion of saving
>a file. They shouldn't even know that it is a file they are writing to.
>I personally don't use Grubconf because its just not for me. But its up
>to us to write the GUI tools so those who can't.
>The close button will automatically save changes if any were made. The
>fact that you checked and then unchecked a checkbox constitutes as a
>change as Grubconf does not determine if you changed it back to the
>original value. This I feel is not an issue at this time, as the
>benefits are outweighed by the required additions.
Mhh ... right you've got a point here, but on the other Hand for those
who don't know anything about what is happening in the background it
should be even more clear that when they press the "Close" Button they
will overwrite something.
Since I (using Debian since '97) even made that mistake and accidently
destroyed my config.
>What you can do is hit the revert button, then close; and your
>configuration will not be overwritten.
Right... I didn't do that since I thought that "Close" would just
close the program. Now I'm aware that the "X" Button does what I=20
actually wanted.
>Also, before the configuration is written (when close button is
>pressed), your original configuration file is copied to [filename]~. So
>if Grubconf did in fact incorrectly write your configuration file, you
>can recover it.
Nope ... that didn't work it left me with an empty menu.lst~ and a
broken menu.lst... Please find attached my working menu.lst and
what grubconf did to it.
>Also, if you did not see a "save" button, how would you expect to save
>your configuration?=20
Right ... I might have expected that the Name of the "Close" Button=20
would Change itself so "Save+Close" or something like that... But
see above.
>The Grubconf manual does explain the functionality of the buttons under
>section 3.1. See
>[http://grubconf.sourceforge.net/manual/x87.html#skomf-controls].
Right ... But after flying over the manpage:
---cut---
CONTROLS
REVERT
Clicking this button will restore the configuration that existed
when GrubConf started the current execution.
OK
Clicking this button accepts the current configuration, saves a
backup of the previous configuration file to /boot/grub/menu.lst~
or config_file~ if specified with =E2=80=90f, writes the current
information then exits. This is the ONLY time that information
will be written.
CANCEL
Clicking this button will exit the program without writing
configuration.
---cut---
So at least the manpages should reflect what is stated in the URL
above.
>I don't know anything about the destroying of the comment needed by the
>update-grub command. If it is a debian-only bug I would suggest that a
>separate bug be filed and a debian-only patch be written.
I also agree on this point if it is too hard for upstream to keep track/
include this. I would like to point out that this would even more greatly
improve the usability for newbie users.
>Now, on to what Grubconf did to your menu.lst. ...
>I would need to see the original menu.lst (should be menu.lst~ after
>Grubconf was run), the new menu.lst that Grubconf created, and the
>expected results.
The expected result would be to not touch it ;)
>I am also not clear on whether Grubconf crashed. If it did I would need
>your hard disk configuration (fdisk -l /dev/hda), any console output,
>add a gdb trace. And just to make sure, Grubconf didn't completely erase
>your configuration, right?
Right and it didn't crash see attached the informartion you might need
for further debugging.
Hope this helps to reproduce what happend... Again I'm also not going
to use this software but I wanted to point this out so nobody else=20
gets hurt using this software ;)
>Thanks!
> - Joe
Ralf
--=20
www: http://www.frosty-geek.net mobile: +49-179-1111437
fingerprint =3D BC6C BCB5 5F3D 6F82 1F8E 0FBF 65DF 34C0 2B5F 85E3
panic: shut her down Scotty, she's sucking mud again.
--bajzpZikUji1w+G9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="menu.lst"
Content-Transfer-Encoding: quoted-printable
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, a=
nd
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default en=
try
# is the entry saved with the command 'savedefault'. =20
default 1
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default e=
ntry
# (normally the first entry defined).
timeout 5
# Pretty colours
color cyan/blue white/blue
# Splash Image
splashimage=3D(hd0,6)/boot/grub/splashimages/debsplash.xpm.gz
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive edit=
ing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=3D/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
title Windows XP
root (hd0,0)
makeactive
chainloader +1
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=3Droot=3D/dev/hda1 ro
# kopt=3Droot=3D/dev/hdb7 ro
## default grub root device
## e.g. groot=3D(hd0,0)
# groot=3D(hd0,6)
## should update-grub create alternative automagic boot options
## e.g. alternative=3Dtrue
## alternative=3Dfalse
# alternative=3Dtrue
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=3Dtrue
## lockalternative=3Dfalse
# lockalternative=3Dfalse
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=3D(extra menu suffix) extra boot options
## altoptions=3D(recovery mode) single
# altoptions=3D(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=3Dall
## howmany=3D7
# howmany=3Dall
## ## End Default Options ##
title Debian GNU/Linux, kernel 2.6.8-1-686=20
root (hd0,6)
kernel /boot/vmlinuz-2.6.8-1-686 root=3D/dev/hdb7 ro=20
initrd /boot/initrd.img-2.6.8-1-686
savedefault
boot
title Debian GNU/Linux, kernel 2.6.8-1-686 (recovery mode)
root (hd0,6)
kernel /boot/vmlinuz-2.6.8-1-686 root=3D/dev/hdb7 ro single
initrd /boot/initrd.img-2.6.8-1-686
savedefault
boot
title Debian GNU/Linux, kernel 2.6.7-1-686=20
root (hd0,6)
kernel /boot/vmlinuz-2.6.7-1-686 root=3D/dev/hdb7 ro=20
initrd /boot/initrd.img-2.6.7-1-686
savedefault
boot
title Debian GNU/Linux, kernel 2.6.7-1-686 (recovery mode)
root (hd0,6)
kernel /boot/vmlinuz-2.6.7-1-686 root=3D/dev/hdb7 ro single
initrd /boot/initrd.img-2.6.7-1-686
savedefault
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
--bajzpZikUji1w+G9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="menu.lst-grubconf"
Content-Transfer-Encoding: quoted-printable
# Generated by grubconf-0.5.1
default=3D1
timeout=3D5
color cyan/blue white/blue
title Windows XP
#:1 <-- type: 0 =3D> linux, 1 =3D> windows, 2 =3D> other
rootnoverify (hd0,0)
makeactive
chainloader +1
title Debian GNU/Linux, kernel 2.6.8-1-686=20
#:0 <-- type: 0 =3D> linux, 1 =3D> windows, 2 =3D> other
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-1-686 root=3D/dev/hda1 ro=20
initrd /boot/initrd.img-2.6.8-1-686
savedefault
boot
title Debian GNU/Linux, kernel 2.6.8-1-686 (recovery mode)
#:0 <-- type: 0 =3D> linux, 1 =3D> windows, 2 =3D> other
root (hd0,0)
kernel /boot/vmlinuz-2.6.8-1-686 root=3D/dev/hda1 ro single
initrd /boot/initrd.img-2.6.8-1-686
savedefault
boot
title Debian GNU/Linux, kernel 2.6.7-1-686=20
#:0 <-- type: 0 =3D> linux, 1 =3D> windows, 2 =3D> other
root (hd0,0)
kernel /boot/vmlinuz-2.6.7-1-686 root=3D/dev/hda1 ro=20
initrd /boot/initrd.img-2.6.7-1-686
savedefault
boot
title Debian GNU/Linux, kernel 2.6.7-1-686 (recovery mode)
#:0 <-- type: 0 =3D> linux, 1 =3D> windows, 2 =3D> other
root (hd0,0)
kernel /boot/vmlinuz-2.6.7-1-686 root=3D/dev/hda1 ro single
initrd /boot/initrd.img-2.6.7-1-686
savedefault
boot
--bajzpZikUji1w+G9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=fdisk
Disk /dev/hda: 40.0 GB, 40020664320 bytes
16 heads, 63 sectors/track, 77545 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 77545 39082648+ 83 Linux
Disk /dev/hdb: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 522 4192933+ 7 HPFS/NTFS
/dev/hdb2 523 9963 75834832+ f W95 Ext'd (LBA)
/dev/hdb5 523 3133 20972826 7 HPFS/NTFS
/dev/hdb6 3134 3196 506016 82 Linux swap
/dev/hdb7 3197 3228 257008+ 83 Linux
/dev/hdb8 3229 3291 506016 83 Linux
/dev/hdb9 3292 3914 5004216 83 Linux
/dev/hdb10 3915 4039 1004031 83 Linux
/dev/hdb11 4040 9963 47584498+ 83 Linux
--bajzpZikUji1w+G9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="device.map"
(fd0) /dev/fd0
(hd0) /dev/hdb
(hd1) /dev/hda
--bajzpZikUji1w+G9--
--qFgkTsE6LiHkLPZw
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBSjHXZd80wCtfheMRAiW8AKCGbsEh0mp2Zdn3WDjLiWkbW1gPXwCgl4vI
tBCfI91u0POjLSPNLo6Clsg=
=UmLf
-----END PGP SIGNATURE-----
--qFgkTsE6LiHkLPZw--