Bug#813506: zipl-installer: set up re-IPL to boot newly installed Debian/Linux
Control: tags -1 + patch
On Tue, Feb 02, 2016 at 04:56:51PM +0100, Hendrik Brueckner wrote:
>
> Patches with changelog information will be added soon by me.
>
Attached patch to simply the call to zipl and chreipl using the
in-target command. The in-target command prepares an environment
with /dev, /sys, and /proc file systems mounted. This is necessary
for both, zipl and chreipl, for calling their helper programs for
mapped devices.
The second patch is just an update to the debian/changelog for
convenience.
Thanks and kind regards,
Hendrik
>From 799975b0ca9dd609929f23670475d2160e7ec145 Mon Sep 17 00:00:00 2001
From: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Date: Wed, 2 Dec 2015 11:17:23 +0100
Subject: [PATCH 1/2] zipl-installer: use in-target to run zipl and also setup
re-IPL settings
To IPL from device mapper devices, zipl runs its zipl_helper.device_mapper
to obtain IPL device information. To ensure /sys, /dev, and /proc are
properly mounted, use the "in-target" command. in-targe prepares a chroot
environment for running commands within the newly installed Linux instance.
The zipl command is called with -V to display verbose information about
the installed Linux kernels and boot map.
Also use the in-target to run chreipl to prepare the boot of newly
installed Linux instances at the end of the installation. Note that
chreipl also use a helper to detect the IPL device for linear mapped
devices, for example, LVM or multipath devices.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
---
debian/zipl-installer.install | 1 +
debian/zipl-installer.postinst | 7 ++-----
finish-install.d/70chreipl | 3 +++
3 files changed, 6 insertions(+), 5 deletions(-)
create mode 100644 debian/zipl-installer.install
create mode 100755 finish-install.d/70chreipl
diff --git a/debian/zipl-installer.install b/debian/zipl-installer.install
new file mode 100644
index 0000000..45307a4
--- /dev/null
+++ b/debian/zipl-installer.install
@@ -0,0 +1 @@
+finish-install.d usr/lib
diff --git a/debian/zipl-installer.postinst b/debian/zipl-installer.postinst
index 48e5e48..147776c 100755
--- a/debian/zipl-installer.postinst
+++ b/debian/zipl-installer.postinst
@@ -57,8 +57,5 @@ EOF
sed -e 's/^do_bootloader.*$/do_bootloader = yes/' < /target/etc/kernel-img.conf > /target/etc/kernel-img.conf.$$
mv /target/etc/kernel-img.conf.$$ /target/etc/kernel-img.conf
-mount -t proc none /target/proc || true
-
-log-output -t zipl-installer chroot /target /sbin/zipl
-
-umount /target/proc || true
+# Run zipl in the installed target instance
+in-target /sbin/zipl -V
diff --git a/finish-install.d/70chreipl b/finish-install.d/70chreipl
new file mode 100755
index 0000000..ff8bcb9
--- /dev/null
+++ b/finish-install.d/70chreipl
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+
+in-target chreipl /boot || true
--
2.7.0.rc3
>From 8bfc5c2087f8e1ac667b6bfa5b3c12511eb22e03 Mon Sep 17 00:00:00 2001
From: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Date: Mon, 18 Jan 2016 15:01:35 +0100
Subject: [PATCH 2/2] changelog: update changelog for 0.0.31
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
---
debian/changelog | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 9782ffb..a4b3b2f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,15 @@
zipl-installer (0.0.31) UNRELEASED; urgency=medium
+ [ Colin Watson ]
* Use HTTPS for Vcs-* URLs, and link to cgit rather than gitweb.
- -- Colin Watson <cjwatson@debian.org> Fri, 29 Jan 2016 13:35:24 +0000
+ [ Hendrik Brueckner ]
+ * postinst/finish-install: use in-target to run zipl and chreipl.
+ The chreipl command prepares and configures the re-IPL settings
+ to boot the newly installed Linux instance after installation.
+ (Closes: #813506)
+
+ -- Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Mon, 18 Jan 2016 14:54:44 +0100
zipl-installer (0.0.30) unstable; urgency=medium
--
2.7.0.rc3
Reply to: