On Sunday 03 February 2008, Frans Pop wrote:
> I have been quite disappointed that there was no real follow-up to my
> mails, which now leaves us in the situation that there is basically no
> support yet to select the correct kernel for etch+1/2.
Being the sucker that I am, I did start to look into this after venting
my frustration in the previous mail. I've looked at several options and
initially the conclusion was that supporting selection for the etch+1/2
kernel was far from trivial and very likely to be messy.
However, after some false starts that were all way to complex, failure prone
and ugly, I decided to drag out an old invention: the "etch-support udeb".
Sorry for the long explanation below, but I really want people to understand
what is happening and why so we are agreed on this implementation and don't
have nasty surprises after the point release.
The required patches for the installer are attached. I have successfully
tested them using a custom built netinst CD that had both the 2.6.18 and
2.6.22-686 kernels on it.
Because of changes in the installation procedure since I implemented
the "sarge-support" udeb, I first needed to ensure installation of the
etch-support udeb is queued in cdrom-detect and iso-scan. With that, we
will have the following situation:
- cdrom-detect: queues etch-support for netinst and full CDs
- iso-scan: queues etch-support for hd-media
- choose-mirror: queues etch-support for netboot/floppy-net/businesscard CD
The trick in this is that the udeb will be automatically installed _only_ if
etch is being installed _and_ the lenny installer is being used.
This is the case if:
- the user is using an Etch netinst or full CD that has the Lenny installer
on it (this is option 4 from [1])
- the user uses a netboot image or businesscard CD and boots the installer
with 'suite=etch' or 'suite=stable', or (at medium/low prio) selects
stable (this is option 3 from [1])
I then added a hack in base-installer which does the following.
If the (new) debconf template "base-installer/kernel/altmeta" has a value
(e.g. 'etchnhalf'), it will add new potential kernel defaults before the
the "normal" kernel defaults, with that value postfixed.
I.e, if the normal possible defaults are:
linux-image-2.6-686
linux-image-2.6-486
this now becomes:
linux-image-2.6-686-etchnhalf
linux-image-2.6-486-etchnhalf
linux-image-2.6-686
linux-image-2.6-486
Finally I created the etch-support udeb which does two things:
1) add an early base-installer hook script that sets the 'altmeta'
template
2) add an partman init.d hook script that changes the default
inode_size from 256 to 128 (only for i386 and amd64) [2]
The result of 1) is IMO exactly what we want:
- the installer will automagically prefer the Etch+1/2 kernel [4]
(preseeding of the exact image as mentioned in [1] is /not/ needed)
- the installer will also prefer the correct flavor (which was the main
issue with my earlier attempts)
- the installer will also install the etch+1/2 kernel meta package, which
ensures users will automatically get ABI-changing security updates
- if for some reason the etchnhalf kernels are not available, the installer
will fall back to the 2.6.18 kernels
- all this only happens if the Lenny installer is used and thus installs
using the regular (updated) Etch installer are not changed at all
There is one issue, which I will detail in a follow-up mail to debian-boot
only. The short summary is that for arm the etchnhalf kernel meta packages
are currently not considered "installable", so as things stand now the
above would not work for arm.
There are still things to decide, and IMO consensus on this should be
reached soon!
- The naming of the etch+1/2 kernel meta packages is now suddenly essential
for the installer and should thus be decided on ASAP.
- There has as yet been no discussion about exactly which "Etch + Lenny D-I"
CD images to create and exactly what should be included on them [3].
(Hell, the whole "Etch + Lenny D-I" concept hasn't even really been OKed.)
Because of mirror space issues _and_ because of required preparations on
the debian-cd side this _really_ needs to be discussed with Sledge
urgently.
- The changes in the installer need to be implemented and uploaded,
preferably before the upcoming Beta release, i.e. *very quickly*.
One final remark.
Because of the use of the Lenny installer, the installation procedure will
be slightly different (improved!) from the Etch installer.
Most relevant changes:
- automatic hardware clock update from NTP server
- by default addition of volatile.d.o besides security.d.o
- slightly changed installation order
- support for installation from multiple CDs from CD/DVD sets
- more targeted prompts for whether or not to use a mirror
- various cleanups and fixes, especially in partman
- some preseeding changes (users should consult the Lenny installation
guide for preseeding!)
Cheers,
FJP
[1] http://lists.debian.org/debian-boot/2007/12/msg00234.html
[2] The reason this is needed is that grub in Etch does not support the
new default inode size of 256 and will fail to install. See #463236
and #463123 for background.
[3] IMO we can do this only for selected arches, possibly only either
netinst CD + full CD _or_ netinst CD + DVD, and with sets limited to
only the first image.
[4] Screenshot of kernel selection at medium priority:
http://alioth.debian.org/~fjp/tmp/D-I_etchnhalf.png
Index: cdrom-detect/debian/changelog
===================================================================
--- cdrom-detect/debian/changelog (revision 51164)
+++ cdrom-detect/debian/changelog (working copy)
@@ -1,3 +1,10 @@
+cdrom-detect (1.26) UNRELEASED; urgency=low
+
+ * If the base-system is installable from CD, queue <codename>-support udeb
+ for installation (choose-mirror will do the same for businesscard).
+
+ -- Frans Pop <fjp@debian.org> Sun, 03 Feb 2008 16:24:11 +0100
+
cdrom-detect (1.25) unstable; urgency=low
[ Joey Hess ]
Index: cdrom-detect/debian/cdrom-detect.postinst
===================================================================
--- cdrom-detect/debian/cdrom-detect.postinst (revision 51164)
+++ cdrom-detect/debian/cdrom-detect.postinst (working copy)
@@ -175,6 +175,10 @@
anna-install choose-mirror || true
else
anna-install apt-cdrom-setup || true
+
+ # Install <codename>-support udeb (if available).
+ db_get cdrom/codename
+ anna-install $RET-support || true
fi
exit 0
Index: iso-scan/debian/changelog
===================================================================
--- iso-scan/debian/changelog (revision 51164)
+++ iso-scan/debian/changelog (working copy)
@@ -5,8 +5,10 @@
* Look for Release file in whatever dists/* directories are on the CD,
rather than relying on the stable/unstable/etc symlinks. Prefer the name
listed in /etc/default-release. (See also cdrom-detect 1.25.)
+ * If the base-system is installable from CD, queue <codename>-support udeb
+ for installation (choose-mirror will do the same for businesscard).
- -- Frans Pop <fjp@debian.org> Sun, 03 Feb 2008 13:34:48 +0100
+ -- Frans Pop <fjp@debian.org> Sun, 03 Feb 2008 16:26:38 +0100
iso-scan (1.22) unstable; urgency=low
Index: iso-scan/debian/iso-scan.postinst
===================================================================
--- iso-scan/debian/iso-scan.postinst (revision 51164)
+++ iso-scan/debian/iso-scan.postinst (working copy)
@@ -41,10 +41,10 @@
db_set cdrom/suite $suite
db_set cdrom/codename $codename
db_subst iso-scan/success SUITE $suite
-
+
description=`sed -n 's/^Description: *//p' $relfile`
db_subst iso-scan/success DESCRIPTION $description
-
+
return 0
fi
done
@@ -77,6 +77,10 @@
anna-install choose-mirror || true
else
anna-install apt-cdrom-setup || true
+
+ # Install <codename>-support udeb (if available).
+ db_get cdrom/codename
+ anna-install $RET-support || true
fi
exit 0
else
Index: base-installer/debian/bootstrap-base.templates
===================================================================
--- base-installer/debian/bootstrap-base.templates (revision 51164)
+++ base-installer/debian/bootstrap-base.templates (working copy)
@@ -82,6 +82,12 @@
The list shows the available kernels. Please choose one of them in order
to make the system bootable from the hard drive.
+Template: base-installer/kernel/altmeta
+Type: text
+Description: for internal use; can be preseeded
+ Optional postfix for kernel meta packages; can be used for example to
+ support installation of an updated kernel for stable
+
Template: base-installer/kernel/skip-install
Type: boolean
Default: false
Index: base-installer/debian/changelog
===================================================================
--- base-installer/debian/changelog (revision 51164)
+++ base-installer/debian/changelog (working copy)
@@ -14,8 +14,10 @@
[ Frans Pop ]
* Whitespace cleanup: reduce indentation in kernel selection scripts.
* Update kernel tests for i386.
+ * Add hack that allows default selection of kernel meta packages with a
+ postfix added to the name, for example for updated kernels for stable.
- -- Frans Pop <fjp@debian.org> Sun, 03 Feb 2008 14:15:15 +0100
+ -- Frans Pop <fjp@debian.org> Sun, 03 Feb 2008 16:29:30 +0100
base-installer (1.86) unstable; urgency=low
Index: base-installer/library.sh
===================================================================
--- base-installer/library.sh (revision 51164)
+++ base-installer/library.sh (working copy)
@@ -366,7 +366,15 @@
db_fset base-installer/kernel/image seen false || true
if [ -n "$FLAVOUR" ]; then
- arch_kernel=$(arch_get_kernel "$FLAVOUR")
+ arch_kernel="$(arch_get_kernel "$FLAVOUR")"
+
+ # Hack to support selection of meta packages for
+ # updated kernels in stable.
+ if db_get base-installer/kernel/altmeta && [ "$RET" ]; then
+ arch_kernel="$(echo "$arch_kernel" | \
+ sed "s/$/-$RET/"; \
+ echo "$arch_kernel")"
+ fi
else
arch_kernel=""
fi
Index: etch-support/debian/control
===================================================================
--- etch-support/debian/control (revision 0)
+++ etch-support/debian/control (revision 0)
@@ -0,0 +1,14 @@
+Source: etch-support
+Section: debian-installer
+Priority: standard
+Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
+Uploaders: Frans Pop <fjp@debian.org>
+Build-Depends: debhelper (>= 5.0)
+Vcs-Svn: svn://svn.debian.org/d-i/trunk/packages/etch-support
+
+Package: etch-support
+XC-Package-Type: udeb
+Architecture: all
+Priority: extra
+Depends: ${misc:Depends}
+Description: Adds backwards compatibility to the installer for installing Etch
Index: etch-support/debian/dirs
===================================================================
--- etch-support/debian/dirs (revision 0)
+++ etch-support/debian/dirs (revision 0)
@@ -0,0 +1,2 @@
+usr/lib/base-installer.d
+lib/partman/init.d
Index: etch-support/debian/compat
===================================================================
--- etch-support/debian/compat (revision 0)
+++ etch-support/debian/compat (revision 0)
@@ -0,0 +1 @@
+5
Index: etch-support/debian/changelog
===================================================================
--- etch-support/debian/changelog (revision 0)
+++ etch-support/debian/changelog (revision 0)
@@ -0,0 +1,8 @@
+etch-support (0.01) UNRELEASED; urgency=low
+
+ * First release.
+ * Support installation of 'etchnhalf' kernel meta packages.
+ * Change the default inode_size for mke2fs to 128 as grub in Etch does not
+ support the new default of 256.
+
+ -- Frans Pop <fjp@debian.org> Sun, 03 Feb 2008 16:13:51 +0100
Index: etch-support/debian/copyright
===================================================================
--- etch-support/debian/copyright (revision 0)
+++ etch-support/debian/copyright (revision 0)
@@ -0,0 +1,5 @@
+etch-support is written by Frans Pop <fjp@debian.org>.
+
+This package is under the GNU General Public License, version 2, which
+can usually be found in /usr/share/common-licenses/GPL-2 on Debian
+systems.
Index: etch-support/debian/rules
===================================================================
--- etch-support/debian/rules (revision 0)
+++ etch-support/debian/rules (revision 0)
@@ -0,0 +1,41 @@
+#!/usr/bin/make -f
+
+DESTDIR = debian/etch-support
+
+scripts = \
+ base-installer.d/01kernel_etchnhalf
+
+build:
+ dh_testdir
+
+clean:
+ dh_testdir
+ dh_testroot
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_installdirs
+ set -e; for file in $(scripts); do \
+ install -m0755 $$file $(DESTDIR)/usr/lib/$$file; \
+ done
+ set -e; install -m0755 partman_init.d/01mke2fs_inode_size \
+ $(DESTDIR)/lib/partman/init.d/01mke2fs_inode_size
+
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ #dh_installdebconf
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_builddeb
+
+binary-arch: build install
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
Property changes on: etch-support/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Index: etch-support/debian/source.lintian-overrides
===================================================================
--- etch-support/debian/source.lintian-overrides (revision 0)
+++ etch-support/debian/source.lintian-overrides (revision 0)
@@ -0,0 +1 @@
+no-standards-version-field
Index: etch-support/base-installer.d/01kernel_etchnhalf
===================================================================
--- etch-support/base-installer.d/01kernel_etchnhalf (revision 0)
+++ etch-support/base-installer.d/01kernel_etchnhalf (revision 0)
@@ -0,0 +1,6 @@
+#! /bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+db_set base-installer/kernel/altmeta etchnhalf
Index: etch-support/partman_init.d/01mke2fs_inode_size
===================================================================
--- etch-support/partman_init.d/01mke2fs_inode_size (revision 0)
+++ etch-support/partman_init.d/01mke2fs_inode_size (revision 0)
@@ -0,0 +1,11 @@
+#! /bin/sh
+set -e
+
+case $(archdetect) in
+ i386/*|amd64/*)
+ if grep -q "inode_size = 256" /etc/mke2fs.conf; then
+ sed -ir "s/(inode_size =) 256/\1 128/" /etc/mke2fs.conf
+ logger -t partman "Default inode size for mk2efs changed to 128"
+ fi
+ ;;
+esac
Index: etch-support/README
===================================================================
--- etch-support/README (revision 0)
+++ etch-support/README (revision 0)
@@ -0,0 +1,9 @@
+This udeb modifies the Lenny installer to support Etch installations.
+
+The udeb will be installed automatically by either cdrom-detect,
+iso-scan or choose-mirror if Etch is selected for installation.
+
+FEATURES
+========
+- make base-installer select the 'etchnhalf' kernel meta packages
+ (if available)
Attachment:
signature.asc
Description: This is a digitally signed message part.