eed131c373
This patch updates the openSuse element to work with the new base image file format. It should be noted that the base image file name has changed several times while updating this element, and and may need to be set manually via the "BASE_IMAGE_NAME" env var. Change-Id: I4dac8bf9a4bf76a00d4a04cbf063fd245b11f3d6
24 lines
657 B
Bash
Executable File
24 lines
657 B
Bash
Executable File
#!/bin/bash
|
|
# The base image created by kiwi does not contain an initrd so create one
|
|
# here.
|
|
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
# To have access to FS_TYPE
|
|
_LIB="/tmp/opensuse-extras"
|
|
source $_LIB/img-defaults
|
|
|
|
# This is to tell mkinitrd to include the right tools for the root filesystem
|
|
# that will actually be used for the final image. This is likely something
|
|
# different than what the chroot is currently on (which might currently be a
|
|
# tmpfs even).
|
|
echo "rootfstype=$FS_TYPE" > /etc/sysconfig/initrd
|
|
|
|
# openSuse mkinitrd requires a valid root device be in fstab.
|
|
sed -i 's/vda1/sda1/' /etc/fstab
|
|
mkinitrd -A -B
|
|
|
|
# And cleanup again
|
|
rm /etc/sysconfig/initrd
|