X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-autoinstaller.git/blobdiff_plain/26fe2bd2474d668fb77526efb35dae239bab8765..0075cd9598b004555699090b2b71bc5efbcbc320:/common/usr/lib/xen-tools/debian.d/93-setup-grub diff --git a/common/usr/lib/xen-tools/debian.d/93-setup-grub b/common/usr/lib/xen-tools/debian.d/93-setup-grub index 2539e6b..ce54ad6 100755 --- a/common/usr/lib/xen-tools/debian.d/93-setup-grub +++ b/common/usr/lib/xen-tools/debian.d/93-setup-grub @@ -24,9 +24,19 @@ logMessage Script $0 starting # Install the xen kernel. linux-image-xen is in ubuntu, # linux-image-xen-{amd64,686} in debian. # -installDebianPackage ${prefix} linux-image-xen-amd64 -installDebianPackage ${prefix} linux-image-xen-686 -installDebianPackage ${prefix} linux-image-xen + +installDebianPackage ${prefix} lsb-release + +if [ "$(chroot ${prefix} lsb_release -is)" = "Ubuntu" ]; then + if dpkg --compare-versions "$(chroot ${prefix} lsb_release -rs)" ge 8.10; then + installDebianPackage ${prefix} linux-image-virtual + else + installDebianPackage ${prefix} linux-image-xen + fi +else + installDebianPackage ${prefix} linux-image-xen-amd64 + installDebianPackage ${prefix} linux-image-xen-686 +fi installDebianPackage ${prefix} grub @@ -48,6 +58,34 @@ for patch in $dir/patches/*; do done # +# If this is a pv_ops kernel, then we need to make some more changes +# to make the console work right +# +if [ "$(chroot ${prefix} lsb_release -is)" = "Ubuntu" ] && \ + dpkg --compare-versions "$(chroot ${prefix} lsb_release -rs)" ge 8.10; then + sed -i -e 's/xvc0/hvc0/' /etc/event.d/tty1 + sed -i -e 's/console=ttyS0[^ ]*/console=hvc0/' /boot/grub/menu.lst +fi + +# +# If this is a Jaunty machine, the fix from LP #291256 caused our +# patch to update-grub to not work, so let's use that mechanism +# instead. +# +# Since we haven't run update-grub yet, we need to generate the +# skeleton of a Debian menu.lst so that update-grub extracts the +# options correctly +# +cat >/boot/grub/menu.lst <