Closed kevinsmia1939 closed 5 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>
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
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/*
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
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.
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.
@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.
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:
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