Bug#603832: grub-common: Xen hypervisor not default after installation

2012-04-29 Thread Ian Campbell
Package: grub-common
Version: 1.99-21
Followup-For: Bug #603832

I've just been looking at this again. I think the best overall solution would
be to move 20_linux_xen to a priority before 10_linux (e.g. 08_linux_xen). If
someone has gone to the effort of installing Xen then it is very likely that
the want to boot it. Simply modifying GRUB_DEFAULT is unsatisfactory since any
new kernel which is installed will buimp the Xen entries up and require
modification.

If changing the priority of the Xen scriptlet is not acceptable then perhaps it
could be made easier for folks to locally change the priority in a way which is
visible to the package manager and conffile handling? I've enhanced my previous
patch somewhat, with this it is sufficient to:

ln -s /etc/grub.d/20_linux_xen /etc/grub.d/08_linux_xen
add GRUB_PRIORITY_XEN=08 to /etc/default/grub.

Another option might be to make all files under /etc/grub.d symlinks to some
other location (still under /etc for conffile tracking) in order to allow
admins to tweak the priority ordering by renaming the symlinks while still
leaving the actual scriptlets visible to the package manager.

Either way I think it is important to fix this issue for Wheezy.

Cheers,
Ian.

The patch, I couldn't figure out the Makefile.util.def stuff sufficiently well
to add the 08_linux_xen symlink by default...


=== modified file 'util/grub-mkconfig.in'
--- util/grub-mkconfig.in   2011-04-08 09:53:17 +
+++ util/grub-mkconfig.in   2012-04-29 10:46:45 +
@@ -241,6 +241,7 @@
   GRUB_CMDLINE_XEN_DEFAULT \
   GRUB_CMDLINE_NETBSD \
   GRUB_CMDLINE_NETBSD_DEFAULT \
+  GRUB_PRIORITY_XEN \
   GRUB_TERMINAL_INPUT \
   GRUB_TERMINAL_OUTPUT \
   GRUB_SERIAL_COMMAND \

=== modified file 'util/grub.d/20_linux_xen.in'
--- util/grub.d/20_linux_xen.in 2011-04-13 11:57:26 +
+++ util/grub.d/20_linux_xen.in 2012-04-29 10:40:14 +
@@ -26,6 +26,11 @@
 export TEXTDOMAIN=@PACKAGE@
 export TEXTDOMAINDIR=@localedir@
 
+scriptname=$(basename $0) 
+if [ ${scriptname:0:2} != ${GRUB_PRIORITY_XEN:-20} ] ; then
+exit 0
+fi
+
 CLASS=--class gnu-linux --class gnu --class os --class xen
 
 if [ x${GRUB_DISTRIBUTOR} = x ] ; then


-- System Information:
Debian Release: wheezy/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-common depends on:
ii  gettext-base0.18.1.1-5
ii  libc6   2.13-30
ii  libdevmapper1.02.1  2:1.02.67-2
ii  libfreetype62.4.9-1
ii  libfuse22.8.7-2
ii  zlib1g  1:1.2.6.dfsg-2

Versions of packages grub-common recommends:
ii  os-prober  1.52

Versions of packages grub-common suggests:
pn  desktop-base   6.0.7
pn  grub-emu   none
pn  multiboot-doc  none
pn  xorrisonone

-- Configuration Files:
/etc/grub.d/20_linux_xen changed [not included]

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/sbin/grub-mkconfig (from grub-common package)



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#603832: grub-common: Xen hypervisor not default after installation

2012-04-29 Thread Ian Campbell
On Sun, 2012-04-29 at 13:14 +0100, Ian Campbell wrote:
 Package: grub-common
 Version: 1.99-21
 Followup-For: Bug #603832
 
 I've just been looking at this again. I think the best overall solution would
 be to move 20_linux_xen to a priority before 10_linux (e.g. 08_linux_xen).

Immediately after hitting send on the previous mail it occurred to me
that dpkg-divert might offer the ideal interface for local admins to
tweak the priority ordering from the defaults.

And indeed: 
# dpkg-divert --divert /etc/grub.d/08_linux_xen --rename 
/etc/grub.d/20_linux_xen

Does exactly what is required and:

# dpkg-divert --rename --remove /etc/grub.d/20_linux_xen

and undoes things (on Squeeze and Wheezy).

For some reason I had it in my head that dpkg-divert didn't work for
conffiles, but on reflection I can't see any reason why that should be
the case.

In the absence of a change or default ordering this seems like by far
the preferable solution, I shall probably update
http://wiki.debian.org/Xen to reflect this fairly soon.

This info would make a nice addition to README.Debian but otherwise I
reckon this bug can be closed.

Ian.
-- 
Ian Campbell

BOFH excuse #346:

Your/our computer(s) had suffered a memory leak, and we are waiting for them to 
be topped up.




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#603832: grub-common: Xen hypervisor not default after installation

2011-11-24 Thread Matthew Baker
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

+1

Maybe have a selection in /etc/default/grub, e.g.:

GRUB_XEN_DEFAULT=1

Then have 09_linux_xen_before script with a selector at the top.

if let $GRUB_XEN_DEFAULT ;then
/etc/grub.d/20_linux_xen
fi

Matt
- -- 

 Matthew Baker :: Senior Systems Administrator :: University of Bristol
+--+
| Infrastructure, Systems and Operations  it-sys...@bristol.ac.uk  |
| T: Berkeley Square:  +44(0)117 3314325  (Mon, Thur  Fri)|
| T: Computer Centre:  +44(0)117 3317467  (Tue, Wed)   |
| A: Uni of Bristol, Computer Centre, Tyndal Ave, Bristol. BS81UD  |
+--+
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk7OJKUACgkQLvm7pB/aicOCbgCggRDXSLESS3OIVTgmQQPO0aoT
zsMAn0QqXU6fIiGO8ZUtq6vjHEEo04iL
=S1EG
-END PGP SIGNATURE-



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#603832: grub-common: Xen hypervisor not default after installation

2011-11-24 Thread Ian Campbell
On Thu, 2011-11-24 at 11:04 +, Matthew Baker wrote:
 +1
 
 Maybe have a selection in /etc/default/grub, e.g.:
 
 GRUB_XEN_DEFAULT=1
 
 Then have 09_linux_xen_before script with a selector at the top.
 
 if let $GRUB_XEN_DEFAULT ;then
   /etc/grub.d/20_linux_xen
 fi

You'd also want to suppress 20_linux_xen in its original priority.

FWIW what I do is ln 20_linux_xen /etc/grub.d/09_linux_xen and add to
the top:

case $(basename $0) in
09*)
#echo ALLOWING $0 12
;;
*) 
#echo SKIPPING $0 12
exit 0
;;
esac

You could do something similar comparing basename to
$GRUB_XEN_PRIORITY=09|20?

Ian.

-- 
Ian Campbell
Current Noise: Judas Priest - A Touch Of Evil

Spock: We suffered 23 casualties in that attack, Captain.




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#603832: grub-common: Xen hypervisor not default after installation

2011-05-28 Thread Markus Hochholdinger
Hello,

I just also stumbled over this bug. I suggest:
mv /etc/grub.d/20_linux_xen /etc/grub.d/09_linux_xen
update-grub

Could the order be changed in the package grub-common?


-- 
greetings

eMHa


signature.asc
Description: This is a digitally signed message part.


Bug#603832: grub-common: Xen hypervisor not default after installation

2010-11-17 Thread Daniel Walrond

Package: grub-common
Version: 1.98+20100804-8
Severity: normal

Hello,

I have just done a fresh install using the Squeeze Beta1 release. After
the installation was completed I installed: xen-hypervisor-4.0-amd64,
linux-image-2.6-xen-amd64. Upon rebooting I ended up with the image
vmlinuz-2.6.32-5-xen-amd64 booting rather than xen-4.0-amd64.gz with
the Linux kernel as a module.

For me to boot a working Xen system, I have to manually choose the Xen
image from the grub menu, which is okay for a test machine, but not so
good for a remote machine.

It looks like I can set GRUB_DEFAULT in /etc/default/grub, but it
would be nice if Xen was choosen automatically like in Lenny. Also
it appears to me that by using the GRUB_DEFAULT option it will not
use the most up to date version after a kernel security update.

Dan

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-common depends on:
ii  base-files  5.9  Debian base system miscellaneous f
ii  dpkg1.15.8.5 Debian package management system
ii  gettext-base0.18.1.1-3   GNU Internationalization utilities
ii  install-info4.13a.dfsg.1-6   Manage installed documentation in 
ii  libc6   2.11.2-7 Embedded GNU C Library: Shared lib
ii  libdevmapper1.02.1  2:1.02.48-4  The Linux Kernel Device Mapper use
ii  libfreetype62.4.2-1  FreeType 2 font engine, shared lib
ii  zlib1g  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages grub-common recommends:
pn  os-prober none (no description available)

Versions of packages grub-common suggests:
pn  grub-emu  none (no description available)
pn  multiboot-doc none (no description available)
pn  xorriso   none (no description available)

-- no debconf information




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org