On Wednesday 18 July 2007 23:54, Frans Pop wrote: > > Also, unlike the expert boot turning it back on, even choosing to > > boot in recovery mode in grub won't avoid the quiet mode. > > After looking at menu.lst, I see that for grub this could be fixed by > only setting the quiet option in "# defoptions=" and not in > "# altoptions=". This would mean special casing it in grub-installer > and maybe ignoring it in lilo-installer. s/altoptions/kopt/ The patch below will split out "quiet" from other options and place it in "# defoptions", which will only be added to the first entry per kernel, and not to any alternative entries. It also allows any other entries to be moved there. I thought a bit about doing this for "vga=", but decided not to in case that option was added because it was required to get any display on a certain system. If there are no comments, I will commit this. Index: grub-installer =================================================================== --- grub-installer (revision 48456) +++ grub-installer (working copy) @@ -571,11 +571,28 @@ rm -f /tmp/menu.lst.password fi -user_params=$(echo $(user-params)) || true +# Add user parameters to menu.list; some options are only added to the +# default entry for a kernel instead of all entries +user_params=$(user-params) || true +defopt_params="" +kopt_params="" +for u_param in "$user_params"; do + case "$u_param" in + quiet) + defopt_params=${defopt_params:+$defopt_params }$u_param ;; + *) + kopt_params=${kopt_params:+$kopt_params }$u_param ;; + esac +done +if [ "$defopt_params" ]; then + sed -i "s!^\(# defoptions=.*\)!\1 $defopt_params!" $ROOT/boot/grub/$menu_file +fi +if [ "$kopt_params" ]; then + sed -i "s!^\(# kopt=.*\)!\1 $kopt_params!" $ROOT/boot/grub/$menu_file +fi +# In either case, update the Debian kernel entries if [ "$user_params" ]; then - # Modify menu.lst to include user parameters. - sed -i "s!^\(# kopt=.*\)!\1 $user_params!" $ROOT/boot/grub/$menu_file - update_grub # again, to add new options to all the Debian kernel entries + update_grub fi if [ "$serial" ] ; then
Attachment:
pgpFclC8YpBP3.pgp
Description: PGP signature