OSInside / kiwi

KIWI - Appliance Builder Next Generation
https://osinside.github.io/kiwi
GNU General Public License v3.0
292 stars 148 forks source link

Calamares (live ISO installer) won't work on live ISO build with KIWI. (dracut module 'kiwi-live' cannot be found or installed) #1228

Closed kevinsmia1939 closed 4 years ago

kevinsmia1939 commented 4 years ago

So I have been trying to create live ISO with KIWI and calamares as live ISO installer. KIWI: 9.18.16-1.1 Calamares: 3.2.14

So I build the live ISO with KIWI, which was working perfectly as intended to be. But the issue is when I try to install the live ISO with Calamares while the live ISO is running on QEMU.

The process to install live ISO with KIWI is straight forward, Start Calamares as root (sudo -E calamares -d) Proceed to select language, timezone, username, password. Install the live ISO by "Delete everything" during partitioning which will just add EXT4 partition.

I believe this is part due to Calamares' fault, but I'm not sure.

The Calamares failed with the errors as shown. I think the relevant part is:


[02:43:43 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "dracut", "-f") 
02:43:44 [0]: Finished. Exit code: 1 
02:43:44 [0]: Target cmd ("dracut", "-f") 
02:43:44 [0]: Target out "dracut: Executing: /usr/bin/dracut -f\ndracut: dracut module 'caps' will not be installed, because command 'capsh' could not be found!\ndracut: dracut module 'multipath' will not be installed, because it's in the list to be omitted!\ndracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' could not be found!\ndracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!\ndracut: dracut module 'kiwi-live' cannot be found or installed." 
02:43:44 [0]: Installation failed: 
02:43:44 [0]: - message: "Failed to run dracut on the target" 
02:43:44 [0]: - details: "The exit code was 1" 
02:43:44 [0]: Calamares will quit when the dialog closes. 
02:43:44 [1]: FinishedPage::setUpRestart() 
02:46:04 [8]: Shutting down Calamares... 
02:46:04 [8]: Finished shutdown. 

I did include package name="dracut-kiwi-live" into config.xml, so it should work but it doesn't my guess is that calamares can't find it(??) The similar issue I found is #1199 but the author close it as it solve itself, which doesn't for me.

The full log


tux@localhost:~> sudo -E calamares -d

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for root: 
No protocol specified
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
02:40:22 [1]: Calamares version: 3.1.11 
Translation: Calamares: Using system locale: "en_US"
02:40:22 [1]: Default font ===== 
Pixel size:    -1 
Point size:    10 
Point sizeF:   10 
Font family:   "Noto Sans" 
Metric height: 18 
02:40:22 [1]: Font height: 18 
02:40:22 [1]: Available languages: ("ar", "ast", "bg", "ca", "cs_CZ", "da", "de", "el", "en", "en_GB", "es_MX", "es", "eu", "fr", "he", "hr", "hu", "id", "is", "it_IT", "ja", "lt", "nl", "pl", "pt_BR", "pt_PT", "ro", "ru", "sk", "sv", "th", "tr_TR", "zh_CN", "zh_TW") 
02:40:22 [1]: CalamaresApplication thread: 0x5620bb086a60 
02:40:22 [1]: Using log file: "/root/.cache/Calamares/Calamares/Calamares.log" 
02:40:22 [1]: Using Calamares settings file at "/usr/share/calamares/settings.conf" 
02:40:23 [1]: Using Calamares branding file at "/usr/share/calamares/branding/default/branding.desc" 
02:40:23 [1]: WARNING: the selected branding component does not ship translations. 
02:40:23 [1]: Loaded branding component "default" 
02:40:23 [1]: STARTUP: initQmlPath, initSettings, initBranding done 
02:40:23 [1]: STARTUP: initModuleManager: module init started 
02:40:23 [1]: STARTUP: initModuleManager: all modules init done 
02:40:23 [1]: STARTUP: initJobQueue done 
02:40:23 [1]: Available size QSize(1024, 732) 
02:40:23 [1]:   Proposed window size: 1024 648 
02:40:23 [1]: STARTUP: CalamaresWindow created; loadModules started 
02:40:23 [1]: Initial locale  "en_US" 
02:40:23 [8]: Translation: Calamares: Using system locale: "en_US"
02:40:23 [1]: Welcome string false "Linux" 
02:40:23 [1]: ViewModule "welcome@welcome" loading complete. 
02:40:23 [1]: WARNING: guessLocaleConfiguration can't guess from an empty list. 
02:40:23 [1]: ViewModule "locale@locale" loading complete. 
No protocol specified
02:40:24 [1]: ViewModule "keyboard@keyboard" loading complete. 
02:40:24 [8]: Loaded backend plugin:  "pmlibpartedbackendplugin"
02:40:24 [1]: ViewModule "partition@partition" loading complete. 
02:40:24 [1]: ViewModule "users@users" loading complete. 
02:40:24 [1]: ViewModule "summary@summary" loading complete. 
02:40:24 [1]: Module "partition@partition" already loaded. 
02:40:24 [1]: QML import paths: ("/usr/share/calamares/qml", "/usr/bin", "qrc:/qt-project.org/imports", "/usr/lib64/qt5/qml") 
02:40:24 [1]: Module "locale@locale" already loaded. 
02:40:24 [1]: Module "keyboard@keyboard" already loaded. 
02:40:24 [1]: Module "users@users" already loaded. 
02:40:24 [1]: FinishedPage() 
02:40:24 [1]: ViewModule "finished@finished" loading complete. 
02:40:24 [1]: STARTUP: loadModules for all modules done 
02:40:24 [1]: STARTUP: Window now visible and ProgressTreeView populated 
02:40:25 [1]: WARNING: guessLocaleConfiguration can't guess from an empty list. 
21:40:25 [1]: WARNING: guessLocaleConfiguration can't guess from an empty list. 
21:40:25 [1]: WARNING: guessLocaleConfiguration can't guess from an empty list. 
21:40:25 [1]: WARNING: guessLocaleConfiguration can't guess from an empty list. 
21:40:25 [1]: Cannot open file "/etc/locale.gen" . Assuming the supported languages are already built into the locale archive. 
21:40:25 [1]: Need at least storage bytes: 5905580032 
21:40:25 [1]: Need at least ram bytes: 1073741824 
21:40:25 [1]: enoughStorage, enoughRam, hasPower, hasInternet, isRoot:  true true true false true 
No protocol specified
21:40:25 [1]: xkbmap selection changed to:  "us" - "" 
21:40:25 [8]: getting smart status failed for  "/dev/vda" :  Operation not supported
21:40:25 [1]: Removing unsuitable devices: 1 candidates. 
21:40:25 [1]: LIST OF DETECTED DEVICES: 
21:40:25 [1]: node      capacity        name    prettyName 
21:40:25 [1]: "/dev/vda" 10733990400 "Virtio Block Device" "Virtio Block Device – 10.00 GiB (/dev/vda)" 
21:40:25 [1]: .. 1 devices detected. 
21:40:26 [1]: "Osprober lines, clean:\n" 
21:40:26 [1]: Updating partitioning state widgets. 
21:40:26 [0]: QObject::setParent: Cannot set parent, new parent is in a different thread
21:40:26 [1]: Required  storage B: 8589934592 "(8GB)" 
21:40:26 [1]: Available storage B: 10459521024 "(9GB)" for "/dev/vda1"    length: 20962776    sectorsUsed: 534024    fsType: "ext4" 
21:40:26 [1]: Partition "/dev/vda1" authorized for resize + autopartition install. 
21:40:26 [1]: Required  storage B: 6442450944 "(6GB)" 
21:40:26 [1]: Storage capacity  B: 10732941312 "(9GB)" for "/dev/vda1"    length: 20962776 
21:40:26 [1]: Partition "/dev/vda1" authorized for replace install. 
21:40:26 [1]: Updating partitioning preview widgets. 
02:40:42 [1]: CreatePartitionTableJob::createTable trying to make table for device "/dev/vda" 
02:40:42 [1]: Suggested swap size: 6.11955 GiB 
02:40:42 [1]: # Queue: 
02:40:42 [1]: ## Device: "Virtio Block Device" 
02:40:42 [1]: - "Create new msdos partition table on /dev/vda." 
02:40:42 [1]: - "Create new 10235MB partition on /dev/vda (Virtio Block Device) with file system ext4." 
02:40:42 [1]: Updating partitioning preview widgets. 
02:40:43 [1]: PCM::setBootLoaderInstallPath "/dev/vda" 
02:40:49 [0]: QLayout: Attempting to add QLayout "" to QWidget "", which already has a layout
02:40:49 [0]: QObject::setParent: Cannot set parent, new parent is in a different thread
02:40:49 [1]: Creating FillGlobalStorageJob with bootLoader path "/dev/vda" 
02:40:49 [1]: PartitionCodeModule has been asked for jobs. About to return: "Clear all temporary mounts.\nClear mounts for partitioning operations on /dev/vda\nCreate new msdos partition table on /dev/vda.\nCreate new 10235MB partition on /dev/vda (Virtio Block Device) with file system ext4.\nSet partition information" 
02:40:49 [1]: Gathering UUIDs for partitions that exist now. 
02:40:49 [1]: QHash(("", "")) 
02:40:49 [1]: Writing to GlobalStorage["partitions"] 
02:40:49 [1]: "" mtpoint: "/" fs: QVariant(QString, "ext4") ( QVariant(QString, "ext4") ) "" 
02:40:49 [8]: QVariant(QString, "") "" "/" "ext4"
02:40:49 [1]: Gathering UUIDs for partitions that exist now. 
02:40:49 [1]: QHash(("", "")) 
02:40:49 [1]: Writing to GlobalStorage["partitions"] 
02:40:49 [1]: "" mtpoint: "/" fs: QVariant(QString, "ext4") ( QVariant(QString, "ext4") ) "" 
02:40:49 [8]: QVariant(QString, "") "" "/" "ext4"
02:40:49 [1]: Summary widget is larger than viewport, enlarge by 9 to QSize(822, 605) 
02:40:52 [1]: Creating FillGlobalStorageJob with bootLoader path "/dev/vda" 
02:40:52 [1]: PartitionCodeModule has been asked for jobs. About to return: "Clear all temporary mounts.\nClear mounts for partitioning operations on /dev/vda\nCreate new msdos partition table on /dev/vda.\nCreate new 10235MB partition on /dev/vda (Virtio Block Device) with file system ext4.\nSet partition information" 
02:40:52 [0]: Starting job "Clear all temporary mounts." 
02:40:52 [1]: Opened mtab. Lines: 
02:40:52 [1]: "sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0" 
02:40:52 [1]: "proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0" 
02:40:52 [1]: "devtmpfs /dev devtmpfs rw,nosuid,size=1422856k,nr_inodes=355714,mode=755 0 0" 
02:40:52 [1]: "securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0" 
02:40:52 [1]: "tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0" 
02:40:52 [1]: "devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0" 
02:40:52 [1]: "tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0" 
02:40:52 [1]: "tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0" 
02:40:52 [1]: "cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0" 
02:40:52 [1]: "pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0" 
02:40:52 [1]: "bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0" 
02:40:52 [1]: "cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0" 
02:40:52 [1]: "/dev/sr0 /run/initramfs/live iso9660 ro,relatime,nojoliet,check=s,map=n,blocksize=2048 0 0" 
02:40:52 [1]: "/dev/loop0 /run/initramfs/squashfs_container squashfs ro,relatime 0 0" 
02:40:52 [1]: "/dev/loop1 /run/rootfsbase ext4 ro,relatime 0 0" 
02:40:52 [1]: "LiveOS_rootfs / overlay rw,relatime,lowerdir=/run/rootfsbase,upperdir=/run/overlayfs/rw,workdir=/run/overlayfs/work 0 0" 
02:40:52 [1]: "rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0" 
02:40:52 [1]: "systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=22280 0 0" 
02:40:52 [1]: "hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0" 
02:40:52 [1]: "mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0" 
02:40:52 [1]: "debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0" 
02:40:52 [1]: "tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=291672k,mode=700,uid=1000,gid=1000 0 0" 
02:40:52 [1]: "gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0" 
02:40:52 [1]: "tracefs /sys/kernel/debug/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0" 
02:40:52 [1]: ClearTempMountsJob finished. Here's what was done:
 "" 
02:40:52 [0]: Starting job "Clear mounts for partitioning operations on /dev/vda" 
02:40:53 [1]: ClearMountsJob finished. Here's what was done:
 "" 
02:40:53 [0]: Starting job "Create new msdos partition table on /dev/vda." 
02:40:53 [1]: CreatePartitionTableJob::createTable trying to make table for device "/dev/vda" 
02:40:53 [1]: Creating new partition table of type "msdos" , uncommitted yet:
 true 
02:40:53 [1]: lsblk:
 "NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT\nloop0    7:0    0  1.4G  1 loop /run/initramfs/squashfs_container\nloop1    7:1    0  6.8G  1 loop /run/rootfsbase\nsr0     11:0    1  1.5G  0 rom  /run/initramfs/live\nvda    253:0    0   10G  0 disk \n\xE2\x94\x94\xE2\x94\x80vda1 253:1    0   10G  0 part \n" 
02:40:53 [1]: mount:
 "sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)\nproc on /proc type proc (rw,nosuid,nodev,noexec,relatime)\ndevtmpfs on /dev type devtmpfs (rw,nosuid,size=1422856k,nr_inodes=355714,mode=755)\nsecurityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)\ntmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)\ndevpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)\ntmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)\ntmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)\ncgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)\ncgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)\npstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)\nbpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)\ncgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)\ncgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)\ncgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)\ncgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)\ncgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)\ncgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)\ncgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)\ncgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)\ncgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)\ncgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)\ncgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)\n/dev/sr0 on /run/initramfs/live type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)\n/run/initramfs/live/LiveOS/squashfs.img on /run/initramfs/squashfs_container type squashfs (ro,relatime)\n/run/initramfs/squashfs_container/LiveOS/rootfs.img on /run/rootfsbase type ext4 (ro,relatime)\nLiveOS_rootfs on / type overlay (rw,relatime,lowerdir=/run/rootfsbase,upperdir=/run/overlayfs/rw,workdir=/run/overlayfs/work)\nrpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)\nsystemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=22280)\nhugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)\nmqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)\ndebugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)\ntmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=291672k,mode=700,uid=1000,gid=1000)\ngvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)\ntracefs on /sys/kernel/debug/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)\n" 
02:40:53 [0]: Starting job "Create new 10235MB partition on /dev/vda (Virtio Block Device) with file system ext4." 
02:40:53 [0]: Starting job "Set partition information" 
02:40:53 [1]: Gathering UUIDs for partitions that exist now. 
02:40:53 [1]: QHash(("/dev/vda1", "b023842c-ed75-4954-a33e-43cc615e40b8")) 
02:40:53 [1]: Writing to GlobalStorage["partitions"] 
02:40:53 [1]: "/dev/vda1" mtpoint: "/" fs: QVariant(QString, "ext4") ( QVariant(QString, "ext4") ) "b023842c-ed75-4954-a33e-43cc615e40b8" 
02:40:53 [1]: FillGlobalStorageJob writing bootLoader path: QVariant(QVariantMap, QMap(("installPath", QVariant(QString, "/dev/vda")))) 
02:40:53 [0]: Starting job "mount" 
02:40:53 [1]: Job file "/usr/lib64/calamares/modules/mount/main.py" 
02:40:53 [1]: Job "mount" (doc) -> "Define mountpoints." 
02:40:53 [0]: Starting job "unpackfs" 
02:40:53 [1]: Job file "/usr/lib64/calamares/modules/unpackfs/main.py" 
02:40:53 [1]: Job "unpackfs" (doc) -> "Unsquash filesystem." 
02:43:39 [0]: Starting job "machineid" 
02:43:39 [1]: Standard paths ("/home/tux", "/usr/bin", "/usr/share/locale") 
02:43:39 [1]: Checking "en_GB.utf8" in "/home/tux" 
02:43:39 [1]: Checking "en_GB.utf8" in "/usr/bin" 
02:43:39 [1]: Checking "en_GB.utf8" in "/usr/share/locale" 
02:43:39 [1]: Checking "en_GB" in "/home/tux" 
02:43:39 [1]: Checking "en_GB" in "/usr/bin" 
02:43:39 [1]: Checking "en_GB" in "/usr/share/locale" 
02:43:40 [1]: Job file "/usr/lib64/calamares/modules/machineid/main.py" 
02:43:40 [1]: Job "machineid" (func) -> "Generate machine-id." 
02:43:41 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "systemd-machine-id-setup") 
02:43:41 [0]: Finished. Exit code: 0 
02:43:41 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "ln", "-s", "/etc/machine-id", "/var/lib/dbus/machine-id") 
02:43:41 [0]: Finished. Exit code: 0 
02:43:41 [0]: Starting job "fstab" 
02:43:41 [1]: Job file "/usr/lib64/calamares/modules/fstab/main.py" 
02:43:41 [1]: Job "fstab" (doc) -> "Configures fstab." 
02:43:41 [0]: Starting job "Set timezone to Europe/London" 
02:43:41 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "rm", "-f", "/etc/localtime") 
02:43:41 [0]: Finished. Exit code: 0 
02:43:41 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "ln", "-s", "/usr/share/zoneinfo/Europe/London", "/etc/localtime") 
02:43:41 [0]: Finished. Exit code: 0 
02:43:41 [0]: Starting job "Set keyboard model to pc105, layout to us-" 
02:43:41 [1]: Executing SetKeyboardLayoutJob 
02:43:41 [1]: Found legacy keymap "us" with score 11 
02:43:41 [1]: Found legacy keymap "us-acentos" with score 11 
02:43:41 [1]: Found legacy keymap "dvorak" with score 11 
02:43:41 [1]: Found legacy keymap "dvorak" with score 11 
02:43:41 [1]: Written KEYMAP= "us" to vconsole.conf 
02:43:41 [1]: Written XkbLayout "us" ; XkbModel "pc105" ; XkbVariant "" to X.org file "/tmp/calamares-root-ynln0amm/etc/X11/xorg.conf.d/00-keyboard.conf" 
02:43:41 [1]: Written XKBMODEL "pc105" ; XKBLAYOUT "us" ; XKBVARIANT "" to /etc/default/keyboard file "/tmp/calamares-root-ynln0amm/etc/default/keyboard" 
02:43:41 [0]: Starting job "localecfg" 
02:43:41 [1]: Job file "/usr/lib64/calamares/modules/localecfg/main.py" 
02:43:41 [1]: Job "localecfg" (doc) -> "Create locale" 
02:43:41 [0]: Starting job "Create user dfg" 
02:43:41 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "groupadd", "network") 
02:43:42 [0]: Finished. Exit code: 0 
02:43:42 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "groupadd", "storage") 
02:43:42 [0]: Finished. Exit code: 0 
02:43:42 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "groupadd", "autologin") 
02:43:42 [0]: Finished. Exit code: 0 
02:43:42 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "useradd", "-m", "-s", "/bin/bash", "-U", "-c", "dfg", "dfg") 
02:43:42 [0]: Finished. Exit code: 0 
02:43:42 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "usermod", "-aG", "users,lp,video,network,storage,wheel,audio,autologin", "dfg") 
02:43:42 [0]: Finished. Exit code: 0 
02:43:42 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "chown", "-R", "dfg:dfg", "/home/dfg") 
02:43:42 [0]: Finished. Exit code: 0 
02:43:42 [0]: Starting job "Set password for user dfg" 
02:43:42 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "usermod", "-p", "$6$uUM98fRTSBrFCMef$DjXI/MK2sMZgtqRGSIQohZ7SKpm3WUYcpRhBy0ThU7sNePWuvD1AxnqJDsb17547BtfzcgHNba8hCQs3gnNLQ.", "dfg") 
02:43:42 [0]: Finished. Exit code: 0 
02:43:42 [0]: Starting job "Set password for user root" 
02:43:42 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "usermod", "-p", "$6$yBFKJR2euJPp9Pnw$6OlMryDP48rqs6PwCb.uvMDLscKqOvksmNhWSzugPuRmV3gzqK8tmewQjbzNr2G0LxmldyDTzri3yyBXgRyuK/", "root") 
02:43:42 [0]: Finished. Exit code: 0 
02:43:42 [0]: Starting job "Set hostname dfg-pc" 
02:43:42 [0]: Starting job "displaymanager" 
02:43:42 [1]: Job file "/usr/lib64/calamares/modules/displaymanager/main.py" 
02:43:42 [1]: Job "displaymanager" (doc) -> "Configure display managers." 
02:43:42 [1]: [PYTHON JOB]:  "Setting up autologin for user dfg." 
02:43:42 [0]: Starting job "networkcfg" 
02:43:42 [1]: Job file "/usr/lib64/calamares/modules/networkcfg/main.py" 
02:43:42 [1]: Job "networkcfg" (doc) -> "Setup network configuration" 
02:43:42 [1]: [PYTHON JOB]:  "Couldn't remove /tmp/calamares-root-ynln0amm/etc/resolv.conf: [Errno 2] No such file or directory: '/tmp/calamares-root-ynln0amm/etc/resolv.conf'" 
02:43:42 [0]: Starting job "hwclock" 
02:43:42 [1]: Job file "/usr/lib64/calamares/modules/hwclock/main.py" 
02:43:42 [1]: Job "hwclock" (doc) -> "Set hardware clock." 
02:43:42 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "hwclock", "--systohc", "--utc") 
02:43:43 [0]: Finished. Exit code: 0 
02:43:43 [1]: [PYTHON JOB]:  "Hwclock set using RTC method." 
02:43:43 [0]: Starting job "dracut" 
02:43:43 [1]: Job file "/usr/lib64/calamares/modules/dracut/main.py" 
02:43:43 [1]: Job "dracut" (doc) -> "Starts routine to create initramfs. It passes back the exit code" 
02:43:43 [0]: Running "chroot" ("/tmp/calamares-root-ynln0amm", "dracut", "-f") 
02:43:44 [0]: Finished. Exit code: 1 
02:43:44 [0]: Target cmd ("dracut", "-f") 
02:43:44 [0]: Target out "dracut: Executing: /usr/bin/dracut -f\ndracut: dracut module 'caps' will not be installed, because command 'capsh' could not be found!\ndracut: dracut module 'multipath' will not be installed, because it's in the list to be omitted!\ndracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' could not be found!\ndracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!\ndracut: dracut module 'kiwi-live' cannot be found or installed." 
02:43:44 [0]: Installation failed: 
02:43:44 [0]: - message: "Failed to run dracut on the target" 
02:43:44 [0]: - details: "The exit code was 1" 
02:43:44 [0]: Calamares will quit when the dialog closes. 
02:43:44 [1]: FinishedPage::setUpRestart() 
02:46:04 [8]: Shutting down Calamares... 
02:46:04 [8]: Finished shutdown. 
02:46:04 [0]: QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
02:46:04 [0]: QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
kevinsmia1939 commented 4 years ago

Content of config.xml

<?xml version="1.0" encoding="utf-8"?>

<image schemaversion="6.8" name="BananaOS">
    <description type="system">
        <author>Banana</author>
        <contact>Banana</contact>
        <specification>
            Banana
        </specification>
    </description>
    <preferences>
        <type image="iso" primary="true" flags="overlay" hybrid="true" hybridpersistent_filesystem="ext4" hybridpersistent="true"/>
        <version>1.99.1</version>
        <packagemanager>zypper</packagemanager>
        <locale>en_US</locale>
        <keytable>us</keytable>
        <timezone>Asia/Bangkok</timezone>
        <rpm-excludedocs>true</rpm-excludedocs>
        <rpm-check-signatures>false</rpm-check-signatures>
        <bootsplash-theme>bgrt</bootsplash-theme>
        <bootloader-theme>openSUSE</bootloader-theme>
    </preferences>
    <preferences>
        <type image="vmx" filesystem="ext4" bootloader="grub2" kernelcmdline="splash" firmware="efi"/>
        <type image="oem" filesystem="ext4" initrd_system="dracut" installiso="true" bootloader="grub2" kernelcmdline="splash" firmware="efi">
            <oemconfig>
                <oem-systemsize>2048</oem-systemsize>
                <oem-swap>true</oem-swap>
                <oem-device-filter>/dev/ram</oem-device-filter>
                <oem-multipath-scan>false</oem-multipath-scan>
                <oem-unattended>false</oem-unattended>
            </oemconfig>
            <machine memory="512" guestOS="suse" HWversion="4">
                <vmdisk id="0" controller="ide"/>
                <vmnic driver="e1000" interface="0" mode="bridged"/>
            </machine>
        </type>
    </preferences>
    <users>
        <user password="1234" pwdformat="plain" home="/root" name="root" groups="root"/>
        <user password="1234" pwdformat="plain" home="/home/tux" name="tux" groups="tux"/>
    </users>
    <repository type="yast2" alias="Tumbleweed-Oss" imageinclude="true" priority="99">
        <source path="http://download.opensuse.org/tumbleweed/repo/oss"/>
    </repository>
    <repository type="yast2" alias="openSUSE-Tumbleweed-Non-Oss" imageinclude="true" priority="99">
        <source path="http://download.opensuse.org/tumbleweed/repo/non-oss/"/>
    </repository>
    <repository type="yast2" alias="openSUSE-Tumbleweed-Update" imageinclude="true" priority="99">
        <source path="http://download.opensuse.org/update/tumbleweed/"/>
    </repository>
    <repository type="yast2" alias="Science" imageinclude="true" priority="90">
        <source path="https://download.opensuse.org/repositories/science/openSUSE_Tumbleweed/"/>
    </repository>
    <repository type="yast2" alias="MultiMedia" imageinclude="true" priority="100">
        <source path="https://download.opensuse.org/repositories/multimedia:/apps/openSUSE_Tumbleweed/"/>
    </repository>
    <repository type="rpm-md" alias="VSCodium" imageinclude="true" priority="99">
        <source path="https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/repos/rpms/"/>
    </repository>
    <repository type="rpm-md" alias="NVIDIA" imageinclude="true" priority="99">
        <source path="https://download.nvidia.com/opensuse/tumbleweed/"/>
    </repository>
    <packages type="image" patternType="plusRecommended">
        <namedCollection name="base"/>    
        <namedCollection name="enhanced_base"/>    
        <namedCollection name="x11"/>  
        <namedCollection name="kde"/>  
        <namedCollection name="kde_plasma"/>
        <namedCollection name="yast2_basis"/>
        <package name="calamares"/>
        <package name="update-desktop-files"/>
        <package name="desktop-data-openSUSE-extra"/>
        <package name="yast2-qt-branding-openSUSE"/>
        <package name="yast2-control-center"/>
        <package name="yast2-fonts"/>
        <package name="htop"/>
        <package name="ksystemlog"/>
        <package name="testdisk"/>
        <package name="kate"/>
        <package name="psmisc"/>
        <package name="command-not-found"/>
        <package name="sudo"/>
        <package name="libsecret-1-0"/>
        <package name="iproute2"/>
        <package name="python2-SecretStorage"/>
        <package name="xorg-x11-server"/>
        <package name="fuse-exfat"/>
        <package name="exfat-utils"/>
        <package name="python"/>
        <package name="perl"/>
        <package name="patterns-openSUSE-base"/>
        <package name="grub2-branding-openSUSE"/>
        <package name="ifplugd"/>
        <package name="iputils"/>
        <package name="vim"/>
        <package name="grub2"/>
        <package name="grub2-i386-pc"/>
        <package name="grub2-x86_64-efi" arch="x86_64"/>
        <package name="syslinux"/>
        <package name="lvm2"/>
        <package name="plymouth"/>
        <package name="plymouth-theme-bgrt"/>
        <package name="plymouth-dracut"/>
        <package name="fontconfig"/>
        <package name="fonts-config"/>
        <package name="curl"/>
        <package name="w3m"/>
        <package name="cabextract"/>
        <package name="tar"/>
        <package name="unzip"/>
        <package name="gzip"/>
        <package name="parted"/>
        <package name="openssh"/>
        <package name="iproute2"/>
        <package name="sensors"/>
        <package name="libQt5Sensors5"/>
        <package name="libsensors4"/>
        <package name="hddtemp"/>
        <package name="less"/>
        <package name="bash-completion"/>
        <package name="dhcp-client"/>
        <package name="which"/>
        <package name="kernel-default"/>
        <package name="timezone"/>
    </packages>
    <packages type="iso">
        <package name="gfxboot-branding-openSUSE"/>
        <package name="dracut-kiwi-live"/>
    </packages>
    <packages type="oem">
        <package name="gfxboot-branding-openSUSE"/>
        <package name="dracut-kiwi-oem-repart"/>
        <package name="dracut-kiwi-oem-dump"/>
    </packages>
    <packages type="bootstrap">
        <package name="udev"/>
        <package name="filesystem"/>
        <package name="glibc-locale"/>
        <package name="cracklib-dict-full"/>
        <package name="ca-certificates"/>
        <package name="ca-certificates-mozilla"/>
        <package name="openSUSE-release"/>
    </packages>
</image>
kevinsmia1939 commented 4 years ago

config.sh


#!/bin/bash
#================
# FILE          : config.sh
#----------------
# PROJECT       : OpenSuSE KIWI Image System
# COPYRIGHT     : (c) 2006 SUSE LINUX Products GmbH. All rights reserved
#               :
# AUTHOR        : Marcus Schaefer <ms@suse.de>
#               :
# BELONGS TO    : Operating System images
#               :
# DESCRIPTION   : configuration script for SUSE based
#               : operating systems
#               :
#               :
# STATUS        : BETA
#----------------
#======================================
# Functions...
#--------------------------------------
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile

#======================================
# Greeting...
#--------------------------------------
echo "Configure image: [$kiwi_iname]..."

#======================================
# Mount system filesystems
#--------------------------------------
baseMount

#======================================
# Setup baseproduct link
#--------------------------------------
suseSetupProduct

#======================================
# Add missing gpg keys to rpm
#--------------------------------------
suseImportBuildKey 
rpm --import /keys/nvidia.key
rpm --import /keys/codium.gpg
rpm --import /keys/geo.key
rpm --import /keys/graphics.key
rpm --import /keys/multimedia.key
rpm --import /keys/nvidia.key
rpm --import /keys/opensuse-oss.key
rpm --import /keys/packman.key
rpm --import /keys/science.key
#======================================
# Disable services
#--------------------------------------
baseRemoveService wicked
baseRemoveService wickedd
baseRemoveService wickedd-auto4
baseRemoveService wickedd-dhcp4
baseRemoveService wickedd-dhcp5
baseRemoveService wickedd-nanny
#======================================
# Activate services
#--------------------------------------
suseInsertService sshd
baseInsertService apparmor
baseInsertService appstream-sync-cache
baseInsertService auditd
baseInsertService avahi-daemon
baseInsertService bluetooth
baseInsertService cron
baseInsertService display-manager
baseInsertService firewalld
baseInsertService getty@tty1
baseInsertService haveged
baseInsertService irqbalance
baseInsertService iscsi
baseInsertService kbdsettings
baseInsertService mcelog
baseInsertService ModenManager
baseInsertService NetworkManager
baseInsertService NetworkManager-dispatcher
baseInsertService NetworkManager-wait-online
baseInsertService nscd
baseInsertService purge-kernels
baseInsertService smartd
baseInsertService systemd-remount-fs
baseInsertService systemd-timesyncd
baseInsertService YaST2-Firstboot
baseInsertService YaST2-Second-Stage

#======================================
# Setup default target, multi-user
#--------------------------------------

#==========================================
# remove package docs
#------------------------------------------
rm -rf /usr/share/doc/packages/*
rm -rf /usr/share/doc/manual/*
rm -rf /opt/kde*

#======================================
# only basic version of vim is
# installed; no syntax highlighting
#--------------------------------------
sed -i -e's/^syntax on/" syntax on/' /etc/vimrc

#======================================
# SuSEconfig
#--------------------------------------
baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM plasma5
baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER sddm
baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER_AUTOLOGIN tux
baseSetRunlevel 5
suseConfig

#==========================================
# configure flatpak
#------------------------------------------
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -vv --ostree-verbose flathub net.openra.OpenRA
flatpak install -vv --ostree-verbose flathub com.slack.Slack
#======================================
# Remove yast if not in use
#--------------------------------------

#======================================
# Umount kernel filesystems
#--------------------------------------
baseCleanMount

exit 0
davidcassany commented 4 years ago

I believe this is not a KIWI issue but a Calamares issue. I don't know how the installation procedure for Calamares works, but it looks like it is calling dracut -f using the live-cd dracut configuration file but without including the live-cd root tree that has the kiwi-live module. Try to remove /etc/dracut.conf.d/02-livecd.conf file before calling Calamares, probably it does the trick.

However from the calamares logs I don't understand what is actually doing and under which assumptions and context it is calling dracut -f.

You should investigate how /tmp/calamares-root-ynln0amm is created and what is in there, dracut is called in chroot in that temporary directory, so in that place I assume you can find the root-tree of the system to install. So dracut kiwi-live module should be in /tmp/calamares-root-ynln0amm/usr/lib/dracut/modules.d/90kiwi-live if this is requested in /tmp/calamares-root-ynln0amm/etc/dracut.conf.d/*

kevinsmia1939 commented 4 years ago

I believe this is not a KIWI issue but a Calamares issue. I don't know how the installation procedure for Calamares works, but it looks like it is calling dracut -f using the live-cd dracut configuration file but without including the live-cd root tree that has the kiwi-live module. Try to remove /etc/dracut.conf.d/02-livecd.conf file before calling Calamares, probably it does the trick.

However from the calamares logs I don't understand what is actually doing and under which assumptions and context it is calling dracut -f.

You should investigate how /tmp/calamares-root-ynln0amm is created and what is in there, dracut is called in chroot in that temporary directory, so in that place I assume you can find the root-tree of the system to install. So dracut kiwi-live module should be in /tmp/calamares-root-ynln0amm/usr/lib/dracut/modules.d/90kiwi-live if this is requested in /tmp/calamares-root-ynln0amm/etc/dracut.conf.d/*

Thanks, I found similar issue on https://github.com/calamares/calamares/issues/1245

davidcassany commented 4 years ago

Thanks for the feedback.

I see that in https://github.com/calamares/calamares/issues/1245 they also suggest to get rid of /etc/dracut.conf.d/02-livecd.conf.

Just to put some more light on this topic. The above mentioned file configures dracut to request kiwi-live inclusion in initrd. kiwi-live is used for Live systems, thus it doesn't make any sense for a regular host installation. Why or how Calameres is pulling the dracut configuration of a Live system for host installation is out of my knowledge. Also the reason why during Calamares installation you don't see the dracut-kiwi-live as part of the image is unknown to me looks like a Calamares specific issue, since you already have

<packages type="iso">
    <package name="dracut-kiwi-live"/>
</packages>

The kiwi-live module is part of your OS running Calamares. IMHO this lools like either a Calamares configuration issue or Calamares bug. Closing feel free to reopen if needed.

vinyanalista commented 4 years ago

Yes, @davidcassany, you are right! That is just a matter of configuring Calamares for openSUSE specifics.

Just out of curiosity, do you know where /etc/dracut.conf.d/02-livecd.conf comes from?

Somehow, KIWI knows about it. See kiwi/builder/live.py line 196:

        # create dracut initrd for live image
        log.info('Creating live ISO boot image')
        live_dracut_module = Defaults.get_live_dracut_module_from_flag(
            self.live_type
        )
        self.boot_image.include_module('pollcdrom')
        self.boot_image.include_module(live_dracut_module)
        self.boot_image.omit_module('multipath')
        self.boot_image.write_system_config_file(
            config={
                'modules': ['pollcdrom', live_dracut_module],
                'omit_modules': ['multipath']
            },
            config_file=self.root_dir + '/etc/dracut.conf.d/02-livecd.conf'
        )
        self.boot_image.create_initrd(self.mbrid)

Running:

$ rpm -qf /etc/dracut.conf.d/02-livecd.conf

inside the Live system says that file is not owned by any package.

davidcassany commented 4 years ago

@vinyanalista this dracut configuration file is created by KIWI at build time, you actually found the relevant lines. This configuration file is not owned by any package. It just states to include the selected live module (overlay|dmsquash) in initrd.