I have Fedora workstation 38 (GNOME) installed on my laptop, I want to create an ISO file so that whenever I use that ISO file to install Fedora back then all my files, apps and extensions are there and there is no need to install them again. (basically, duplicating my system into an ISO) It is no problem if I can’t back up my files due to not enough storage (on the USB drive), I can back them up separately they are not really an issue. The main issue is my apps and extensions.
I’m interested to.
Files and data are not neccesary for me. but i would like to define my “work-environment” with installed stuff etc. and reuse it later or on other machines. this would be nice. → Image?
Kind Regards
I’ve got to know about Kickstart since I started this topic, but I am not able to figure out how to download system-config-kickstart
I tried using dnf
, yam
, snap
, and apt
. I didn’t seem to find it when searched online. Can anyone help me to download Kickstart? There is also this alternate/hack-ish method of installing it, but it also doesn’t work. Here it is: sudo dnf install https://kojipkgs.fedoraproject.org/packages/system-config-date/1.10.9/3.fc25/noarch/system-config-date-1.10.9-3.fc25.noarch.rpm python-kickstart system-config-kickstart;
It is from this website
Hello @zatan16 ,
Please start with the Fedora documentation at Kickstart files :: Fedora Docs , there it explains how to make an iso with a kickstart file. The docs are for i3 DE, but you can change the kickstart file.
I really, really, would not expect that command line to function. It is for a package designed to work with Fedora 25 which is more than 6 years out of date and F25 has been EOL and unmaintained for at least that long.
The post above by @jakfrost gives more current and direct instructions.
Can somebody give here more detailed steps, I can’t understand what to do between the 2nd and the 3rd commands
Which exact commands are you referring to? We are not there so we don’t see your screen.
If you are referring to the commands in the page linked to by @jakfrost then it would seem these commands.
Install dependencies
sudo dnf install -y lorax pykickstart
Clone Spin repository
git clone https://pagure.io/fedora-kickstarts.git
Flatten the kickstart
sudo ksflatten -c fedora-live-i3.ks -o flatten-i3.ks
Build ISO using Lorax
sudo livemedia-creator --make-iso --ks flat-i3.ks --no-virt --iso-only --iso-name fedora-i3-live-x86_64.iso --releasever 34
Create a QEMU virtual machine with the new ISO
qemu-kvm -m 2048 -vga qxl -cdrom fedora-i3-live-x86_64.iso
and the second command would be the ‘git clone’ step and the 3rd command would be the ‘ksflatten’ step.
You were told that is based on an i3 system and would need to be modified for your own system. Thus you would need to look at what was downloaded by git and change the file names appropriately.
This is the list of files downloaded for me with the clone command and you would need to select the appropriate .ks file for your system.
$ ls fedora-kickstarts/
AUTHORS fedora-eln-guest.ks fedora-lxqt-common.ks
COPYING fedora-i3-common.ks fedora-mate-common.ks
custom fedora-iot.ks fedora-minimal-common.ks
fedora-budgie-common.ks fedora-kde-common.ks fedora-modular-disk-minimal.ks
fedora-cinnamon-common.ks fedora-live-astronomy_kde.ks fedora-neuro-gnome-common.ks
fedora-cloud-base-azure.ks fedora-live-base.ks fedora-phosh-common.ks
fedora-cloud-base-gcp.ks fedora-live-budgie.ks fedora-python-classroom-common.ks
fedora-cloud-base.ks fedora-live-cinnamon.ks fedora-python-classroom-gnome-common.ks
fedora-cloud-base-vagrant.ks fedora-live-comp_neuro.ks fedora-python-classroom-vagrant.ks
fedora-comp-neuro-common.ks fedora-live-design_suite.ks fedora-repo.ks
fedora-container-base.ks fedora-live-games.ks fedora-repo-not-rawhide.ks
fedora-container-base-minimal.ks fedora-live-i3.ks fedora-repo-rawhide.ks
fedora-container-common.ks fedora-live-jam_kde.ks fedora-scientific-common.ks
fedora-container-toolbox.ks fedora-live-kde-base.ks fedora-scientific-vagrant.ks
fedora-design-suite-common.ks fedora-live-kde.ks fedora-server-vm-full.ks
fedora-disk-base.ks fedora-live-lxde.ks fedora-soas-common.ks
fedora-disk-budgie.ks fedora-live-lxqt.ks fedora-sway-common.ks
fedora-disk-kde.ks fedora-live-mate_compiz.ks fedora-workstation-common.ks
fedora-disk-lxqt.ks fedora-live-minimization.ks fedora-xfce-common.ks
fedora-disk-minimal.ks fedora-live-python-classroom.ks l10n
fedora-disk-phosh.ks fedora-live-robotics.ks maintainers.toml
fedora-disk-python-classroom.ks fedora-live-scientific_kde.ks Makefile
fedora-disk-server.ks fedora-live-security.ks README.md
fedora-disk-soas.ks fedora-live-soas.ks snippets
fedora-disk-workstation.ks fedora-live-sway.ks templates
fedora-disk-xbase.ks fedora-live-workstation.ks tools
fedora-disk-xfce.ks fedora-live-xfce.ks
fedora-eln-container-base.ks fedora-lxde-common.ks
Using man pages is often of great benefit for understanding the commands. Using posted commands literally seldom works since each user has differing needs and wants.
Try man ksflatten
to see what that command does.
I order to do it you need git installed (sudo dnf install git
). Have you done that first as a pre-requisite?
The livemedia-creator
command stopped because I didn’t have psutil
installed, I’ve installed it now. Is there a way to resume the ISO creation, or do I have to enter the command again and wait for everything to download and install again?
@computersavvy I am getting the following error then trying to build the ISO:
2023-09-10 21:42:27,309: Installing qemu-common.x86_64 (875/1934)
2023-09-10 21:42:48,133: Running anaconda failed: process '['unshare', '--pid', '--kill-child', '--mount', '--propagation', 'unchanged', 'anaconda', '--kickstart', '/home/zayaan/fedora-kickstarts/flatten-workstation.ks', '--cmdline', '--dirinstall', '--remotelog', '127.0.0.1:38937']' exited with status 1
2023-09-10 21:42:48,135: Shutting down log processing
2023-09-10 21:42:48,395: Install failed: novirt_install failed
2023-09-10 21:42:48,396: Removing bad disk image
2023-09-10 21:42:48,396: ERROR: Image creation failed: novirt_install failed
2023-09-10 21:42:48,397: Image creation failed: novirt_install failed
Here is the fedora-kickstarts/proram.log
:
2023-09-10 21:27:17,679 INFO: Running... losetup --find --show /var/tmp/lmc-disk-g3acgmdv.img
2023-09-10 21:27:17,687 INFO: /dev/loop5
2023-09-10 21:27:17,688 DEBUG: Return code: 0
2023-09-10 21:27:17,688 INFO: Running... udevadm settle --timeout 300
2023-09-10 21:27:17,749 DEBUG: Return code: 0
2023-09-10 21:27:17,750 INFO: Running... losetup -j /var/tmp/lmc-disk-g3acgmdv.img
2023-09-10 21:27:17,756 INFO: /dev/loop5: [0038]:701475 (/var/tmp/lmc-disk-g3acgmdv.img)
2023-09-10 21:27:17,756 DEBUG: Return code: 0
2023-09-10 21:27:17,756 INFO: Running... mkfs.ext4 -L Anaconda -b 4096 -m 0 /dev/loop5
2023-09-10 21:27:17,815 INFO: mke2fs 1.46.5 (30-Dec-2021)
2023-09-10 21:27:17,815 INFO: Discarding device blocks: 0/1984512 done
2023-09-10 21:27:17,815 INFO: Creating filesystem with 1984512 4k blocks and 496784 inodes
2023-09-10 21:27:17,815 INFO: Filesystem UUID: 2e403ddb-84ea-405f-af5f-bf63ed61e12d
2023-09-10 21:27:17,815 INFO: Superblock backups stored on blocks:
2023-09-10 21:27:17,816 INFO: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
2023-09-10 21:27:17,816 INFO:
2023-09-10 21:27:17,816 INFO: Allocating group tables: 0/61 done
2023-09-10 21:27:17,816 INFO: Writing inode tables: 0/61 done
2023-09-10 21:27:17,816 INFO: Creating journal (16384 blocks): done
2023-09-10 21:27:17,816 INFO: Writing superblocks and filesystem accounting information: 0/61 done
2023-09-10 21:27:17,816 INFO:
2023-09-10 21:27:17,816 DEBUG: Return code: 0
2023-09-10 21:27:17,817 INFO: Running... mount /dev/loop5 /var/tmp/lorax.imgutils.ro8ne4sf
2023-09-10 21:27:17,868 DEBUG: Return code: 0
2023-09-10 21:27:17,869 INFO: Running... df /var/tmp/lorax.imgutils.ro8ne4sf
2023-09-10 21:27:17,881 INFO: Filesystem 1K-blocks Used Available Use% Mounted on
2023-09-10 21:27:17,882 INFO: /dev/loop5 7712908 24 7696500 1% /var/tmp/lorax.imgutils.ro8ne4sf
2023-09-10 21:27:17,882 DEBUG: Return code: 0
2023-09-10 21:27:17,882 INFO: Running... umount /var/tmp/lorax.imgutils.ro8ne4sf
2023-09-10 21:27:17,904 DEBUG: Return code: 0
2023-09-10 21:27:17,905 INFO: Running... losetup --detach /dev/loop5
2023-09-10 21:27:17,923 DEBUG: Return code: 0
2023-09-10 21:27:17,923 INFO: Running... sync
2023-09-10 21:27:18,035 DEBUG: Return code: 0
2023-09-10 21:27:18,037 INFO: Running... mount -o loop /var/tmp/lmc-disk-g3acgmdv.img /mnt/sysimage/
2023-09-10 21:27:18,064 DEBUG: Return code: 0
2023-09-10 21:27:18,071 INFO: Running... unshare --pid --kill-child --mount --propagation unchanged anaconda --kickstart /home/zayaan/fedora-kickstarts/flatten-workstation.ks --cmdline --dirinstall --remotelog 127.0.0.1:38937
2023-09-10 21:42:48,148 INFO: Running... umount /mnt/sysimage/tmp
2023-09-10 21:42:48,191 DEBUG: Return code: 0
2023-09-10 21:42:48,197 INFO: Running... umount /mnt/sysimage/sys/fs/selinux
2023-09-10 21:42:48,234 DEBUG: Return code: 0
2023-09-10 21:42:48,235 INFO: Running... umount /mnt/sysimage/sys/firmware/efi/efivars
2023-09-10 21:42:48,263 DEBUG: Return code: 0
2023-09-10 21:42:48,264 INFO: Running... umount /mnt/sysimage/sys
2023-09-10 21:42:48,285 DEBUG: Return code: 0
2023-09-10 21:42:48,286 INFO: Running... umount /mnt/sysimage/run
2023-09-10 21:42:48,315 DEBUG: Return code: 0
2023-09-10 21:42:48,316 INFO: Running... umount /mnt/sysimage/proc
2023-09-10 21:42:48,336 DEBUG: Return code: 0
2023-09-10 21:42:48,337 INFO: Running... umount /mnt/sysimage/dev/shm
2023-09-10 21:42:48,355 DEBUG: Return code: 0
2023-09-10 21:42:48,356 INFO: Running... umount /mnt/sysimage/dev/pts
2023-09-10 21:42:48,372 DEBUG: Return code: 0
2023-09-10 21:42:48,373 INFO: Running... umount /mnt/sysimage/dev
2023-09-10 21:42:48,384 DEBUG: Return code: 0
2023-09-10 21:42:48,385 INFO: Running... umount /mnt/sysimage
2023-09-10 21:42:48,395 DEBUG: Return code: 0
Tell me if you need any more files/information.
It is impossible for anyone to tell why those messages are received without more information.
Sharing the command and all that is shown on the screen following might allow us to see exactly what is happening, but without at least the command line and the resulting error messages there is no way to tell. It also would help if we were to see the content of the actual kickstart (.ks) file that is being used since that controls how the iso is built.
Note that kickstart files are not normally super large so they would be easy to share.
One other thing that might be a factor.
Attempting to create an image from a system that is in use and constantly changing (especially when writing the intended iso on the same drive in that system) can easily cause the process to fail.
Images should always be created from a static system.
Here are livemedia.log
(I guess it is pretty similar to the terminal output), fedora-live-workstation.ks
, flatten.ks
. And this is the command: sudo livemedia-creator --make-iso --ks flatten-workstation.ks --no-virt --iso-only --iso-name fedora-workstation-live-x86_64.iso