--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: base-installer: [i386] Select appropriate kernel when installing in a virtualised (Xen) environment.
- From: Ian Campbell <ijc@hellion.org.uk>
- Date: Wed, 07 May 2008 21:55:36 +0100
- Message-id: <20080507205536.14248.19131.reportbug@localhost.localdomain>
Package: base-installer
Severity: wishlist
Tags: patch
Please consider the attached patch which causes the installer to select
a -bigmem kernel when the processors support PAE and the installer is
itself running a -bigmem kernel.
This is necessary to support running the installer in a para-virtualised
environment (specifically Xen) where the kernel must use PAE if the
hypervisor does or if the hypervisor is 64 bit.
This was discussed in the mailing list thread starting at [0] and the
patch is the same as the patch at [1] except for the additional comment
requested by Frans and the debian/changelog entry.
Cheers,
Ian.
[0] http://lists.debian.org/debian-boot/2008/04/msg01016.html
[1] http://lists.debian.org/debian-boot/2008/05/msg00049.html
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.18.8-xen (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Index: kernel/README
===================================================================
--- kernel/README (revision 53021)
+++ kernel/README (working copy)
@@ -61,6 +61,8 @@
The major version of the running kernel, e.g. 2.6.
KERNEL_VERSION
The full version of the running kernel, e.g. 2.6.8.
+ KERNEL_FLAVOUR
+ The flavour of the running kernel, e.g. 486, 686-bigmem or ixp4xx.
MACHINE
The machine hardware name (as returned by uname -m).
NUMCPUS
Index: kernel/i386.sh
===================================================================
--- kernel/i386.sh (revision 53021)
+++ kernel/i386.sh (working copy)
@@ -2,16 +2,26 @@
VENDOR=`grep '^vendor_id' "$CPUINFO" | head -n1 | cut -d: -f2`
FAMILY=`grep '^cpu family' "$CPUINFO" | head -n1 | cut -d: -f2`
MODEL=`grep '^model[[:space:]]*:' "$CPUINFO" | head -n1 | cut -d: -f2`
+
+ # Only offer bigmem is the system supports pae and the
+ # installer itself is already using a bigmem kernel.
+ if grep '^flags' "$CPUINFO" | grep -q pae ; then
+ case "$KERNEL_FLAVOUR" in
+ 686-bigmem*) BIGMEM="-bigmem" ;;
+ *) ;;
+ esac
+ fi
+
case "$VENDOR" in
" AuthenticAMD"*)
case "$FAMILY" in
- " 6"|" 15") echo k7 ;;
+ " 6"|" 15") echo k7$BIGMEM ;;
*) echo 486 ;;
esac
;;
" GenuineIntel")
case "$FAMILY" in
- " 6"|" 15") echo 686 ;;
+ " 6"|" 15") echo 686$BIGMEM ;;
*) echo 486 ;;
esac
;;
@@ -19,7 +29,7 @@
case "$FAMILY" in
" 6")
case "$MODEL" in
- " 9"|" 10") echo 686 ;;
+ " 9"|" 10") echo 686$BIGMEM ;;
*) echo 486 ;;
esac
;;
@@ -39,8 +49,8 @@
if echo "$1" | grep -Eq -- "-486(-.*)?$"; then return 0; fi
if [ "$2" = 486 ]; then return 1; fi
if echo "$1" | grep -Eq -- "-686(-.*)?$"; then return 0; fi
- if [ "$2" = 686 ]; then return 1; fi
- if [ "$2" = k7 ]; then
+ if [ "$2" = 686 ] || [ "$2" = 686-bigmem ]; then return 1; fi
+ if [ "$2" = k7 ] || [ "$2" = k7-bigmem ] ; then
if echo "$1" | grep -Eq -- "-k7(-.*)?$"; then return 0; fi
return 1
fi
@@ -53,11 +63,21 @@
arch_get_kernel () {
imgbase=linux-image
+ if [ "$1" = k7-bigmem ]; then
+ echo "$imgbase-$KERNEL_MAJOR-686-bigmem"
+ set k7
+ fi
+
if [ "$1" = k7 ]; then
echo "$imgbase-$KERNEL_MAJOR-k7"
set 486
fi
+ if [ "$1" = 686-bigmem ]; then
+ echo "$imgbase-$KERNEL_MAJOR-686-bigmem"
+ set 686
+ fi
+
if [ "$1" = 686 ]; then
echo "$imgbase-$KERNEL_MAJOR-686"
set 486
Index: kernel/tests/i386/cittagazze-bigmem.test
===================================================================
--- kernel/tests/i386/cittagazze-bigmem.test (revision 0)
+++ kernel/tests/i386/cittagazze-bigmem.test (revision 0)
@@ -0,0 +1,17 @@
+cpuinfo cittagazze.cpuinfo
+majors 2.6
+flavour k7-bigmem
+kernel-2.6 \
+ linux-image-2.6-686-bigmem \
+ linux-image-2.6-k7 \
+ linux-image-2.6-486
+usable \
+ linux-image-2.6-486 \
+ linux-image-2.6-686 \
+ linux-image-2.6-686-bigmem \
+ linux-image-2.6-k7 \
+ linux-image-2.6.18-1-486 \
+ linux-image-2.6.18-1-686 \
+ linux-image-2.6.18-1-686-bigmem \
+ linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 686-bigmem
Index: kernel/tests/i386/cittagazze.test
===================================================================
--- kernel/tests/i386/cittagazze.test (revision 53021)
+++ kernel/tests/i386/cittagazze.test (working copy)
@@ -13,3 +13,4 @@
linux-image-2.6.18-1-686 \
linux-image-2.6.18-1-686-bigmem \
linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/via-c7-Samuel.test
===================================================================
--- kernel/tests/i386/via-c7-Samuel.test (revision 53021)
+++ kernel/tests/i386/via-c7-Samuel.test (working copy)
@@ -15,3 +15,4 @@
linux-image-2.6.18-1-686-bigmem \
linux-image-2.6.18-1-686 \
linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/via-c7-Esther.test
===================================================================
--- kernel/tests/i386/via-c7-Esther.test (revision 53021)
+++ kernel/tests/i386/via-c7-Esther.test (working copy)
@@ -16,3 +16,4 @@
unusable \
linux-image-2.6-k7 \
linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/oqo1.test
===================================================================
--- kernel/tests/i386/oqo1.test (revision 53021)
+++ kernel/tests/i386/oqo1.test (working copy)
@@ -14,3 +14,4 @@
linux-image-2.6.18-1-686-bigmem \
linux-image-2.6.18-1-686 \
linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/pentium-3.test
===================================================================
--- kernel/tests/i386/pentium-3.test (revision 53021)
+++ kernel/tests/i386/pentium-3.test (working copy)
@@ -15,3 +15,4 @@
unusable \
linux-image-2.6-k7 \
linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/pentium-d-2p.test
===================================================================
--- kernel/tests/i386/pentium-d-2p.test (revision 53021)
+++ kernel/tests/i386/pentium-d-2p.test (working copy)
@@ -15,3 +15,4 @@
unusable \
linux-image-2.6-k7 \
linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/pentium.test
===================================================================
--- kernel/tests/i386/pentium.test (revision 53021)
+++ kernel/tests/i386/pentium.test (working copy)
@@ -15,3 +15,4 @@
linux-image-2.6.18-1-686-bigmem \
linux-image-2.6.18-1-686 \
linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: kernel/tests/i386/pentium-4M-bigmem.test
===================================================================
--- kernel/tests/i386/pentium-4M-bigmem.test (revision 0)
+++ kernel/tests/i386/pentium-4M-bigmem.test (revision 0)
@@ -0,0 +1,20 @@
+cpuinfo pentium-4M.cpuinfo
+machine i686
+majors 2.6
+flavour 686-bigmem
+env SPEAKUP /nonexistent
+kernel-2.6 \
+ linux-image-2.6-686-bigmem \
+ linux-image-2.6-686 \
+ linux-image-2.6-486
+usable \
+ linux-image-2.6-486 \
+ linux-image-2.6-686 \
+ linux-image-2.6-686-bigmem \
+ linux-image-2.6.18-1-486 \
+ linux-image-2.6.18-1-686 \
+ linux-image-2.6.18-1-686-bigmem
+unusable \
+ linux-image-2.6-k7 \
+ linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 686-bigmem
Index: kernel/tests/i386/pentium-4M.test
===================================================================
--- kernel/tests/i386/pentium-4M.test (revision 53021)
+++ kernel/tests/i386/pentium-4M.test (working copy)
@@ -16,3 +16,4 @@
unusable \
linux-image-2.6-k7 \
linux-image-2.6.18-1-k7
+env KERNEL_FLAVOUR 486
Index: debian/changelog
===================================================================
--- debian/changelog (revision 53021)
+++ debian/changelog (working copy)
@@ -10,6 +10,11 @@
cases the fact that the CD is already mounted on /cdrom can prevent the CD
from being scanned. Closes: #475639.
+ [ Ian Campbell ]
+ * i386: If the installer is running a -bigmem kernel and the processors
+ support PAE then select a -bigmem kernel for installation. For
+ compatibility with runnign under Xen.
+
[ Updated translations ]
* Amharic (am.po) by tegegne tefera
* Arabic (ar.po) by Ossama M. Khayat
Index: library.sh
===================================================================
--- library.sh (revision 53021)
+++ library.sh (working copy)
@@ -17,6 +17,7 @@
KERNEL_MAJOR="$(uname -r | cut -d . -f 1,2)"
KERNEL_VERSION="$(uname -r | cut -d - -f 1)"
KERNEL_ABI="$(uname -r | cut -d - -f 1,2)"
+KERNEL_FLAVOUR=$(uname -r | cut -d - -f 3-)
MACHINE="$(uname -m)"
NUMCPUS=$(cat /var/numcpus 2>/dev/null) || true
CPUINFO=/proc/cpuinfo
--- End Message ---
--- Begin Message ---
Source: base-installer
Source-Version: 1.93
We believe that the bug you reported is fixed in the latest version of
base-installer, which is due to be installed in the Debian FTP archive:
base-installer_1.93.dsc
to pool/main/b/base-installer/base-installer_1.93.dsc
base-installer_1.93.tar.gz
to pool/main/b/base-installer/base-installer_1.93.tar.gz
base-installer_1.93_all.udeb
to pool/main/b/base-installer/base-installer_1.93_all.udeb
bootstrap-base_1.93_amd64.udeb
to pool/main/b/base-installer/bootstrap-base_1.93_amd64.udeb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 480054@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Otavio Salvador <otavio@debian.org> (supplier of updated base-installer package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Tue, 29 Jul 2008 12:08:43 -0300
Source: base-installer
Binary: base-installer bootstrap-base
Architecture: source all amd64
Version: 1.93
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Otavio Salvador <otavio@debian.org>
Description:
base-installer - base system installation framework (udeb)
bootstrap-base - Install the base system (udeb)
Closes: 480054 490542
Changes:
base-installer (1.93) unstable; urgency=low
.
[ Frans Pop ]
* Improve kernel selection for AMD64. All k8 and most k7 systems support the
686 kernel flavor. Only older k7 systems without SSE support need 486.
Based on documentation the divider seems to be at family 6, model 6.
Closes: #490542.
* Avoid locale related errors up to the point where locales gets installed
by setting IT_LANG_OVERRIDE=C for apt-install.
.
[ Ian Campbell ]
* i386: If the installer is running a -bigmem kernel and the processors
support PAE then select a -bigmem kernel for installation. For
compatibility with running under Xen. Closes: #480054.
.
[ Updated translations ]
* Finnish (fi.po) by Esko Arajärvi
* Croatian (hr.po) by Josip Rodin
* Italian (it.po) by Milo Casagrande
* Portuguese (Brazil) (pt_BR.po) by Felipe Augusto van de Wiel (faw)
* Slovak (sk.po) by Ivan Masár
* Turkish (tr.po) by Mert Dirik
Checksums-Sha1:
eadeb860f20384cdbf9fd46c4984454a0e4b850d 1091 base-installer_1.93.dsc
6ed4c00c921d5928ac593687f03e97ac5ce25229 216565 base-installer_1.93.tar.gz
53f089a21a4dc65fb7eefb7d41239d34cfa99b43 39046 base-installer_1.93_all.udeb
bc6af58aeb512c1f3aed79f52c094d4359e6b3cb 131780 bootstrap-base_1.93_amd64.udeb
Checksums-Sha256:
edbda58fa2a3799007102ebf8d4708ce0c544ceb418f6f46be550dc5a6c024f3 1091 base-installer_1.93.dsc
e87d55312570c778b28a2bb42bf4b6a177646bd545d423c3c8c65befc1d877b5 216565 base-installer_1.93.tar.gz
c358602676594dcb9ef16218868a266b51360a36040c1bbff9c9133a4319dec3 39046 base-installer_1.93_all.udeb
d5b785357711fa5b9f1690113e8ef09e0a92b7e51ef882bb08500a669d65b7b1 131780 bootstrap-base_1.93_amd64.udeb
Files:
78f945080506b4bc3f02b393e6b994b9 1091 debian-installer required base-installer_1.93.dsc
5edfa03663db7b479c4c167a06f514ba 216565 debian-installer required base-installer_1.93.tar.gz
c630979b2ad9b99bb446773eb4bb2d9d 39046 debian-installer required base-installer_1.93_all.udeb
0c5903c7aa43bda6621122e2a8beede2 131780 debian-installer required bootstrap-base_1.93_amd64.udeb
Package-Type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkiPMy0ACgkQLqiZQEml+FUn3gCguHbdAPwiBEvIefL9Jo3F/T37
pWcAn3GXdyQE0GPKa+2eN6veQNNO6k1q
=N8rO
-----END PGP SIGNATURE-----
--- End Message ---