File: 10-mkinitrd

package info (click to toggle)
python-diskimage-builder 3.39.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 5,704 kB
  • sloc: sh: 7,474; python: 6,454; makefile: 37
file content (24 lines) | stat: -rwxr-xr-x 718 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# The base image created by kiwi does not contain an initrd so create one
# here.

if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
    set -x
fi
set -eu
set -o pipefail

# 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=${DIB_ROOT_FSTYPE}" > /etc/sysconfig/initrd

# ToDo: This it not really clear to me.
#       Let's see which error occurs.
# 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