GNOME Bugzilla – Bug 307524
boot-admin vandalizes grub's menu.lst
Last modified: 2008-01-08 09:30:26 UTC
Distribution: Debian 3.1 Package: gnome-system-tools Severity: major Version: GNOME2.10.1 1.2.x Gnome-Distributor: Debian Synopsis: boot-admin vandalizes grub's menu.lst Bugzilla-Product: gnome-system-tools Bugzilla-Component: boot-admin Bugzilla-Version: 1.2.x Description: Description of Problem: boot-admin appears to implement only a subset of grub's syntax. Without notice, it removes any commands from menu.lst that it does not recognize. In the case of my box, with devastating consequences. This is my kernels/OS listing BEFORE boot-admin touched it: ### BEGIN AUTOMAGIC KERNELS LIST ## lines between the AUTOMAGIC KERNELS LIST markers will be modified ## by the debian update-grub script except for the default options 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=root=/dev/hda1 ro # kopt=root=/dev/hda5 ro resume2=swap:/dev/hda8 ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd0,4) ## should update-grub create alternative automagic boot options ## e.g. alternative=true ## alternative=false # alternative=true ## should update-grub lock alternative automagic boot options ## e.g. lockalternative=true ## lockalternative=false # lockalternative=false ## altoption boot targets option ## multiple altoptions lines are allowed ## e.g. altoptions=(extra menu suffix) extra boot options ## altoptions=(recovery mode) single # altoptions=(console mode) init 3 # altoptions=(maintenance mode) single noresume ## 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=all ## howmany=7 # howmany=all ## should update-grub create memtest86 boot option ## e.g. memtest86=true ## memtest86=false # memtest86=false ## ## End Default Options ## splashimage=(hd0,4)/boot/grub/splash.xpm.gz title Debian GNU/Linux, kernel 2.6.11-swsusp2 root (hd0,4) kernel /boot/vmlinuz-2.6.11-swsusp2 root=/dev/hda5 ro resume2=swap:/dev/hda8 initrd /boot/initrd.img-2.6.11-swsusp2 savedefault boot title Debian GNU/Linux, kernel 2.6.11-swsusp2 (console mode) root (hd0,4) kernel /boot/vmlinuz-2.6.11-swsusp2 root=/dev/hda5 ro resume2=swap:/dev/hda8 init 3 initrd /boot/initrd.img-2.6.11-swsusp2 savedefault boot title Debian GNU/Linux, kernel 2.6.11-swsusp2 (maintenance mode) root (hd0,4) kernel /boot/vmlinuz-2.6.11-swsusp2 root=/dev/hda5 ro resume2=swap:/dev/hda8 single noresume initrd /boot/initrd.img-2.6.11-swsusp2 savedefault boot title Debian GNU/Linux, kernel 2.6.8-2-k7 root (hd0,4) kernel /boot/vmlinuz-2.6.8-2-k7 root=/dev/hda5 ro resume2=swap:/dev/hda8 initrd /boot/initrd.img-2.6.8-2-k7 savedefault boot title Debian GNU/Linux, kernel 2.6.8-2-k7 (console mode) root (hd0,4) kernel /boot/vmlinuz-2.6.8-2-k7 root=/dev/hda5 ro resume2=swap:/dev/hda8 init 3 initrd /boot/initrd.img-2.6.8-2-k7 savedefault boot title Debian GNU/Linux, kernel 2.6.8-2-k7 (maintenance mode) root (hd0,4) kernel /boot/vmlinuz-2.6.8-2-k7 root=/dev/hda5 ro resume2=swap:/dev/hda8 single noresume initrd /boot/initrd.img-2.6.8-2-k7 savedefault boot ### END DEBIAN AUTOMAGIC KERNELS LIST title Debian GNU/Hurd 0.3 pre savedefault root (hd0,8) kernel /boot/gnumach.gz root=device:hd0s9 #module /boot/serverboot.gz module /hurd/ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T typed ${root} $(task-create) $(task-resume) module /lib/ld.so.1 /hurd/exec $(exec-task=task-create) title Syllable savedefault rootnoverify (hd0,1) chainloader +1 #kernel /atheos/sys/kernel.so root=/dev/disk/ata/hda/1 enable_ata_lba48=true #module /atheos/sys/config/kernel.cfg #module /atheos/sys/drivers/bus/pci #module /atheos/sys/drivers/bus/ata #module /atheos/sys/drivers/dev/hcd/ata_pci #module /atheos/sys/drivers/fs/afs title VSTa 1.6.8 savedefault root (hd0,0) kernel /vsta/boot/vsta module /vsta/boot/cons module /vsta/boot/namer module /vsta/boot/wd d0:readp module /vsta/boot/dos -d //disk/wd:wd0_dos0 -n fs/root module /vsta/boot/init #lock title ReactOS root (hd0,0) makeactive chainloader /bootsect.ros savedefault title BeOS 5.0.4 PE lock rootnoverify (hd0,2) chainloader +1 savedefault title Windows/DOS root (hd0,0) chainloader +1 savedefault title Von Diskette booten lock rootnoverify (fd0) chainloader +1 savedefault # Change the colors. # title Farbschema 1 # color light-gray/magenta white/green # title Farbschema 2 # color light-green/brown red/blue # title Farbschema 3 # color magenta/blue black/magenta # title Farbschema 4 # color 0x17 0x70 title memtest86+ root (hd0,4) kernel /boot/memtest86+.bin This is, what was left afterwards: ### BEGIN AUTOMAGIC KERNELS LIST ## lines between the AUTOMAGIC KERNELS LIST markers will be modified ## by the debian update-grub script except for the default options 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=root=/dev/hda1 ro # kopt=root=/dev/hda5 ro resume2=swap:/dev/hda8 ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd0,4) ## should update-grub create alternative automagic boot options ## e.g. alternative=true ## alternative=false # alternative=true ## should update-grub lock alternative automagic boot options ## e.g. lockalternative=true ## lockalternative=false # lockalternative=false ## altoption boot targets option ## multiple altoptions lines are allowed ## e.g. altoptions=(extra menu suffix) extra boot options ## altoptions=(recovery mode) single # altoptions=(console mode) init 3 # altoptions=(maintenance mode) single noresume ## 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=all ## howmany=7 # howmany=all ## should update-grub create memtest86 boot option ## e.g. memtest86=true ## memtest86=false # memtest86=false ## ## End Default Options ## splashimage=(hd0,4)/boot/grub/splash.xpm.gz title Debian GNU/Linux, kernel 2.6.11-swsusp2 root (hd0,4) kernel /boot/vmlinuz-2.6.11-swsusp2 root=/dev/hda5 ro resume2=swap:/dev/hda8 initrd /boot/initrd.img-2.6.11-swsusp2 title Debian GNU/Linux, kernel 2.6.11-swsusp2 (console mode) root (hd0,4) kernel /boot/vmlinuz-2.6.11-swsusp2 root=/dev/hda5 ro resume2=swap:/dev/hda8 init 3 initrd /boot/initrd.img-2.6.11-swsusp2 title Debian GNU/Linux, kernel 2.6.11-swsusp2 (maintenance mode) root (hd0,4) kernel /boot/vmlinuz-2.6.11-swsusp2 root=/dev/hda5 ro resume2=swap:/dev/hda8 single noresume initrd /boot/initrd.img-2.6.11-swsusp2 title Debian GNU/Linux, kernel 2.6.8-2-k7 root (hd0,4) kernel /boot/vmlinuz-2.6.8-2-k7 root=/dev/hda5 ro resume2=swap:/dev/hda8 initrd /boot/initrd.img-2.6.8-2-k7 title Debian GNU/Linux, kernel 2.6.8-2-k7 (console mode) root (hd0,4) kernel /boot/vmlinuz-2.6.8-2-k7 root=/dev/hda5 ro resume2=swap:/dev/hda8 init 3 initrd /boot/initrd.img-2.6.8-2-k7 title Debian GNU/Linux, kernel 2.6.8-2-k7 (maintenance mode) root (hd0,4) kernel /boot/vmlinuz-2.6.8-2-k7 root=/dev/hda5 ro resume2=swap:/dev/hda8 single noresume initrd /boot/initrd.img-2.6.8-2-k7 title Debian GNU/Hurd 0.3 pre root (hd0,8) kernel /boot/gnumach.gz root=device:hd0s9 module /hurd/ext2fs.static title Syllable rootnoverify (hd0,1) makeactive chainloader +1 title VSTa 1.6.8 root (hd0,0) kernel /vsta/boot/vsta module /vsta/boot/cons title ReactOS rootnoverify (hd0,0) makeactive chainloader +1 title BeOS 5.0.4 PE rootnoverify (hd0,2) makeactive chainloader +1 title Windows/DOS rootnoverify (hd0,0) makeactive chainloader +1 title Von Diskette booten rootnoverify (fd0) makeactive chainloader +1 title memtest86+ root (hd0,4) kernel /boot/memtest86+.bin title ReactOS root (hd0,0) makeactive chainloader /bootsect.ros savedefault title Windows/DOS root (hd0,0) chainloader +1 savedefault Thus, boot-admin has broken menu.lst in manyfold ways: - It has removed the ###END AUTOMATIC KERNELS LIST line which is required by Debian's update-grub script. Result: (re-)configuration of kernel-image packages will fail. - From the Debian GNU/Hurd boot configuration it has removed a) the second "module" command and b) the parameters that were passed to the modules. - The same happened to the VSta boot config: All but one module were removed, all parameters dropped. - In the reactos boot config "chainloader /bootsect.ros" was changed to "chainloader +1". This will boot a different OS as ReactOS' boot sector is stored in the named file. - For some funny reason, boot-admin has duplicated the Windows and ReactOS boot stanzas at the end of the file, this time in their original form. - All "savedefault" lines were silently dropped - all "root" commands were indiscriminately replaced by "rootnoverify" Expected Results: boot-admin should not touch what it does not understand, at least not without giving an explicit prior warning. Additional Information: Debian Sarge ------- Bug moved to this database by unknown@bugzilla.gnome.org 2005-06-13 15:18 UTC -------
Ubuntu bug about that: https://bugzilla.ubuntu.com/show_bug.cgi?id=14320
Mass closing of remaining disks-admin and boot-admin bugs, sorry for the spam. Both tools are bitrotting, and no development is likely to happen on them.
Has the code been removed from the release tarballs or is it prevented from being built by default? Else I feel it would be premature to close this bug which is about a very real and serious misbehaviour.
Yes, since the switch to system-tools-backends 2.x, boot-admin doesn't have any possibility to work, the code is still around in svn, but it's not included in the tarballs, nor could compile in any way without tweaking the makefiles