Commit 87176b05 authored by Philipp Kern's avatar Philipp Kern

Use mapdevfs to find the device of the root filesystem.

This no longer forces the device path for the root system to be a DASD.
Instead it infers the root device like on any other platform. (The
code is mostly the one lilo-installer uses.)

This requires sysconfig-hardware (>= 0.0.10+nmu3, or feature-equivalent)
in the target system to set the relevant DASDs online by using
configuration stored in the initrd. It is copied into the final system
by s390-sysconfig-writer.
parent 6051656a
zipl-installer (0.0.28) UNRELEASED; urgency=medium
* Use mapdevfs to find the device of the root filesystem.
-- Philipp Kern <pkern@debian.org> Sat, 19 Sep 2015 23:41:42 +0200
zipl-installer (0.0.27) unstable; urgency=medium zipl-installer (0.0.27) unstable; urgency=medium
* Log the output of zipl to syslog. * Log the output of zipl to syslog.
......
...@@ -2,19 +2,23 @@ ...@@ -2,19 +2,23 @@
. /usr/share/debconf/confmodule . /usr/share/debconf/confmodule
findfs () { log() {
logger -t zipl-installer "$@"
}
info() {
log "info: $@"
}
findfs() {
mount | grep "on /target${1%/} " | tail -n1 | cut -d' ' -f1 mount | grep "on /target${1%/} " | tail -n1 | cut -d' ' -f1
} }
ROOT_PLAIN="$(findfs /)" rootfs_devfs="$(findfs /)"
name="${ROOT_PLAIN#/dev/}" rootfs="$(mapdevfs $rootfs_devfs)"
disk="${name%%[0-9]*}" log "Root filesystem on ${rootfs} (${rootfs_devfs})"
part="${name#$disk}"
devpath=/sys/block/$disk/$(readlink /sys/block/$disk/device)
dev=${devpath##*/}
ROOT=/dev/disk/by-path/ccw-$dev-part$part
PARAMETER="root=$ROOT" PARAMETER="root=${rootfs}"
cat > /target/etc/zipl.conf << EOF cat > /target/etc/zipl.conf << EOF
[defaultboot] [defaultboot]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment