Creating and Using a Live Installation Image
Downloading Fedora Linux
Download Fedora Linux from https://fedoraproject.org/.
Fedora Linux is freely available and comes in a number of different versions to meet different needs. If you are trying out Fedora Linux for the first time, the Workstation and KDE Plasma Editions are excellent choices for general-purpose desktop computing.
In addition to the flagship Editions, there are:
-
Atomic Desktops, which use modern technology to keep system files in a protected state.
-
Fedora Spins, which have a different look and feel and offer varying levels of customization.
-
Fedora Labs, which bundle software intended for specific use cases.
Visit https://fedoraproject.org/ for further information and to see all of the available options.
Creating a live USB flash drive with Fedora Media Writer
| All data on the selected USB flash drive will be lost. Please relocate any important files to another location before proceeding. |
Fedora Media Writer is the official and recommended tool for creating a Fedora Linux USB flash drive. You will need an internet connection and a USB flash drive with a capacity of at least 8 GB.
-
Download and install Fedora Media Writer from https://fedoraproject.org/workstation/download/.
-
Open Fedora Media Writer and ensure the correct USB flash drive is selected.
-
Select "Download Automatically" or "Select .iso file" if you have previously downloaded a Fedora Linux image.
-
Follow the prompts to select your preferred Fedora Linux option and begin writing the image to the USB flash drive.
Fedora Media Writer will automatically verify the download and check the image once it has been written to the USB flash drive. Your Fedora Linux live USB flash drive is now ready to use.
Restoring the USB flash drive
Once you have finished using your Fedora Linux live USB flash drive, you may want to use the USB flash drive to hold files again. Some operating systems may not recognize the USB flash drive until it is reformatted. For best results, use Fedora Media Writer to restore the USB flash drive so it can be used to store files.
Alternative methods for creating a live USB flash drive
Creating a live USB flash drive with the dd tool
The dd tool is installed by default on most Linux distributions, and on macOS.
|
The |
| All data on the selected USB flash drive will be lost. Please relocate any important files to another location before proceeding. |
Part one - download and verify your Fedora Linux image
-
Download your preferred version of Fedora Linux from https://fedoraproject.org/.
-
Visit https://www.fedoraproject.org/security/ for instructions on verifying the integrity of the image.
Part two - positively identify your USB flash drive
-
Unplug your USB flash drive.
-
In the terminal, run:
lsblk
-
Plug your USB flash drive back into your device.
-
Run
lsblkagain. The newly listedsdXdevice is your USB flash drive. -
You can cross-check your work by observing the output’s listed capacity for
sdX, which should be consistent with your USB flash drive’s physical capacity.
Part three - prepare the drive and run the command
-
Unmount the partition/s on the USB flash drive with:
$ umount /dev/sdX
-
Carefully construct the
ddcommand. Example with breakdown listed:$ dd if=/path/to/Fedora-Workstation-Live.iso of=/dev/sdX bs=4M status=progress && sync
-
if=/path/...- Input file. Enter the exact path and file name. -
of=/dev/sdX- Output file and the device it will write to. Replace X with the correct letter for your USB flash drive. Pause and double check your work here. -
bs=4M- Block size of 4 megabytes. This value affects the total time to write as well as RAM usage (4M is recommended but not critical). -
status=progress- Displays the estimated time to completion. -
&& sync- Flushes kernel buffers to the drive which reduces the risk of you removing the drive before the writing has been completed.
-
-
Press enter and wait for the command to complete.
Your Fedora Linux Live USB flash drive is now ready to use.
If your version of dd doesn’t support the status=progress option, you may not see the write progress.
|
Avviare da pennette USB
Quasi tutti i PC moderni possono avviarsi da pennette USB. Tuttavia, il modo in cui si dice al sistema di avviarsi da una pennetta USB varia sostanzialmente da sistema a sistema. Inizialmente, si può provare questo:
-
Spegnere il computer.
-
Collegare l’unità USB a una porta USB.
-
Rimuovere tutti gli altri media portatili, come CD, DVD, dischetti floppy o altre pennette USB.
-
Accendere il computer.
-
Se il computer è configurato per avviarsi automaticamente dall’unità USB, si vedrà una schermata che dice "Avvio automatico in 10 secondi…" con un conto alla rovescia.
Se si effettua un avvio UEFI nativo, si vedrà un menu di avvio piuttosto più minimale.
Se il computer inizia ad avviarsi dal disco rigido come normale, sarà necessario configurarlo manualmente per avviarsi dall’unità USB. Solitamente, dovrebbe funzionare così:
-
Attendere un punto sicuro per riavviare.
-
Mentre la macchina inizia a riavviarsi, osservare attentamente le istruzioni su quale tasto premere. Solitamente un tasto funzione,
Escape,Tab,F11,F12oDeletedeve essere premuto per entrare nel menu di selezione del dispositivo di avvio,BIOS setup,firmwareoUEFI. Premere e tenere premuto quel tasto. Se si perde la finestra di opportunità, spesso solo pochi secondi, allora riavviare e riprovare. (Se questo non funziona, consultare il manuale del computer) -
Usare il firmware,
BIOS, interfaccia o il menu del dispositivo di avvio per mettere l’unità USB per prima nella sequenza di avvio. Potrebbe essere elencata come un disco rigido piuttosto che un’unità rimovibile. Ogni produttore di hardware ha un metodo leggermente diverso per farlo.Il computer potrebbe diventare non avviabile o perdere funzionalità se si cambiano altre impostazioni. Anche se queste impostazioni possono essere revertite, sarà necessario ricordare cosa si è cambiato per farlo. -
Salvare le modifiche, uscire, e il computer dovrebbe avviarsi dall’unità USB.
Se il sistema ha un firmware UEFI, solitamente permetterà di avviare la pennetta in modalità UEFI nativa o modalità di compatibilità BIOS. Se si avvia in modalità UEFI nativa e si esegue un’installazione Fedora, si otterrà un’installazione Fedora UEFI nativa. Se si avvia in modalità di compatibilità BIOS e si esegue un’installazione Fedora, si otterrà un’installazione Fedora in modalità di compatibilità BIOS.
Per maggiori informazioni su tutto questo, vedere la pagina UEFI. Le pennette USB scritte da immagini x86_64 con Fedora Media Writer, GNOME Disk Utility, dd, altre utilità in stile dd dovrebbero essere avviabili UEFI native. Le pennette scritte con altre utilità potrebbero non essere avviabili UEFI native, e le pennette scritte da immagini i686 non saranno mai avviabili UEFI.
Identificare una pennetta su Linux
La maggior parte dei metodi di scrittura richiederà di conoscere il nome /dev per la pennetta USB, ad es. /dev/sdc, quando li si usa su Linux. Non è necessario sapere questo per usare Fedora Media Writer. Per scoprirlo:
-
Inserire la pennetta USB in una porta USB.
-
Aprire un terminale e eseguire
dmesg. -
Vicino alla fine dell’output, si vedrà qualcosa come:
[32656.573467] sd 8:0:0:0: [sdX] Attached SCSI removable disk
sdXsaràsdb,sdc,sdd, ecc.
|
Questo è il nome del disco che si userà. Lo chiameremo |
Risoluzione problemi per una USB live
Problemi con livecd-iso-to-disk
- La partizione non è marcata come avviabile
-
Se si riceve il messaggio
Partition isn’t marked bootable!, è necessario marcare la partizione come avviabile. Per farlo, eseguireparted /dev/sdX, e usare il comandotoggle N boot, doveXè la lettera appropriata, eNè il numero della partizione. Ad esempio:$ parted /dev/sdb GNU Parted 1.8.6 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: Imation Flash Drive (scsi) Disk /dev/sdX: 1062MB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1062MB 1062MB primary fat16 (parted) toggle 1 boot (parted) print Model: Imation Flash Drive (scsi) Disk /dev/sdX: 1062MB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1062MB 1062MB primary fat16 boot (parted) quit Information: Don't forget to update /etc/fstab, if necessary. - Le partizioni necessitano di un’etichetta filesystem
-
Se si riceve il messaggio
Need to have a filesystem labeloUUIDper il dispositivo USB, è necessario etichettare la partizione:dosfslabel /dev/sdX LIVE. - La partizione ha terminazioni fisiche/logiche diverse
-
Se si riceve questo messaggio da fdisk, potrebbe essere necessario riformattare l’unità flash quando si scrive l’immagine, passando
--formatquando si scrive la pennetta. - MBR sembra essere vuoto
-
Se l’avvio di test riporta un settore di avvio corrotto, o si riceve il messaggio
MBR appears to be blank., è necessario installare o resettare il master boot record (MBR), passando--reset-mbrquando si scrive la pennetta. - livecd-iso-to-disk su altre distribuzioni Linux
-
livecd-iso-to-disknon è destinato a essere eseguito da un sistema non Fedora. Anche se capita di eseguirlo e scrivere una pennetta apparentemente con successo da qualche altra distribuzione, la pennetta potrebbe fallire nell’avvio. L’uso dilivecd-iso-to-disksu qualsiasi distribuzione diversa da Fedora non è supportato e non ci si aspetta che funzioni: si prega di usare un metodo alternativo, come Fedora Media Writer.
Testare una pennetta USB usando qemu
Si può testare la pennetta usando QEMU.
# umount /dev/sdX1 $ qemu -hda /dev/sdX -m 1024 -vga std
Montare un filesystem USB Live
Si può usare lo script liveimage-mount nel pacchetto livecd-tools per montare un dispositivo USB Live attaccato o altra immagine LiveOS, come un ISO o CD Live. Questo è conveniente quando si vuole copiare dentro o fuori qualche file dal filesystem LiveOS su una USB Live, o semplicemente esaminare i file in un ISO Live o CD Live.
Creazione e utilizzo di un live CD
We will use Fedora release 42 exemplary in all command examples. If you need to do it for a different release, just change the number accordingly.
Per cominciare
To create a live image, the livecd-creator and mock packages are used. For this, super user privileges are needed.
The livecd-creator tool is part of the _livecd-tools_package. If it is not installed on your system, add it and all other tools like mock, lorax, git, pykickstart and a text editor with DNF:
# dnf install livecd-tools mock
Hint: We are creating a livecd like the fedora-live-workstation image, which is totally localized, but has english as default. There is no need to install any localization support on your own. You can change it in the created kickstart.cfg if necessary.
Configuring your system
We need to add you current user to the mock group, or you need to do anything as root user.
# sudo usermod -aG mock $(whoami)
The $(whoami) adds your current user, as we do not know what username you are currently using ;)
A relogin to make the change effective, would be wise, or you switch to root now.
Let’s create the mock group:
# newgrp mock
If you now enter:
# groups
it shall output your username together with the old groups and the new group "mock". If this is not the case, you did something wrong.
Creating your build environment
Now we can init the build environment. In this example we use the most likely x86_64, but if you build it for ARM or PowerPC, you can just use a different config by changing the ARCH-Type to the desired platform!
# mock -r /etc/mock/fedora-42_x86_64.cfg --init
Mock creates us an empty toolbox for this, so we need to fill it with packages, which we will need to create the image later in the process. If you now think "Why so complicated?" you are only partly right, as a toolbox is a simple container, which we need to separate the work for different releases of Fedora, otherwise you have to overwrite and mixing different builds on your own.
Make sure you have enough free disk space for all these files and the ones, the livemedia-creator will download later. We suggest at least 10 GB free diskspace for this.
# mock -r /etc/mock/fedora-42_x86_64.cfg --install lorax anaconda git pykickstart vim lorax anaconda git pykickstart vim libblockdev-lvm libblockdev-btrfs libblockdev-swap libblockdev-loop libblockdev-crypto libblockdev-dm libblockdev-mdraid libblockdev-part libblockdev-fs libblockdev-nvme libblockdev-mpath
If you wanne use a different texteditor then "vim", you need to install it now, otherwise you are stuck to a not so well integrated basic "vim" installation, which will be a bit unpleasant to use. Don’t panic, we don’t do much editing inside the toolbox, vim will do :)
Now we enter the toolbox for the first time …
# mock -r /etc/mock/fedora-42_x86_64.cfg --shell --isolation=simple --enable-network
This gives us a shell and networksupport, so the scripts inside the toolbox can access the internet and install packages from the repo.
You will see something like this output:
INFO: mock.py version 6.3 starting (python version = 3.13.7, NVR = mock-6.3-1.fc42), args: /usr/libexec/mock/mock -r fedora-42-x86_64 --shell --isolation=simple --enable-network Start(bootstrap): init plugins INFO: selinux enabled Finish(bootstrap): init plugins Start: init plugins INFO: selinux enabled Finish: init plugins INFO: Signal handler active Start: run Start(bootstrap): chroot init INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start(bootstrap): cleaning package manager metadata Finish(bootstrap): cleaning package manager metadata INFO: Package manager dnf5 detected and used (fallback) Finish(bootstrap): chroot init Start: chroot init INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start: cleaning package manager metadata Finish: cleaning package manager metadata INFO: enabled HW Info plugin INFO: Package manager dnf5 detected and used (direct choice) Finish: chroot init Start: shell <mock-chroot> sh-5.2#
Now we need to download the kickstart files, which previous Fedora releases had as a package, from the Fedora Servers:
# git clone https://pagure.io/fedora-kickstarts -b f42
You can access the page with a normal browser, to see which tags aka 'branches' like "f42" are available, in case you wanne do another version. What happens now is a git checkout into the current directory of your toolbox. Big advantage: no danger of overwriting files on your os.
ATTENTION: before you continue, make sure you have at least 10 GB of free storage on your systems partition as we will download a lot of rpms and create an image that is at least 2,3 GB in size. If you don’t have enough space, all future steps can fail with the wildest error messages and your will waste A LOT of time with it!
What we now need is a kickstart file. Never heard of it, don’t panic :D
A kickstart file contains information about the size of the tmp drive in the later started live image, it mounts, its packages and so on. You will not need to reinvent the wheel, relax. Here is an example:
%include fedora-live-workstation.ks %packages # Packages we want to have thunderbird # Package groups excluded from @workstation-product-environment -@guest-desktop-agents -@libreoffice -@multimedia # Packages excluded from @workstation-product -rhythmbox -unoconv # Packages excluded from @gnome-desktop -gnome-boxes -gnome-connections -gnome-text-editor -baobab -cheese -gnome-clocks -gnome-logs -gnome-maps -gnome-photos -gnome-remote-desktop -gnome-weather -orca -rygel -totem %end
What you see is a subsection of all possible options, because that git checkout before, downloaded a full set of already working kickstart files, which we will join up to one new kickstart.cfg file.
The above file will remove packages and groups of packages from the later created image, compared to the normal Fedora-Live-Workstation image. We call this a DELTA-file, because we just define the differences between our image and the original Fedora Live Workstation image.
You see this:
%include fedora-live-workstation.ks
This includes the original kickstart (ks) config for the original Fedora-Live-Workstation Image as a base file. The rest of the lines "overwrite" the sections in the original file. So you just tell kickstart what you want and not want compared to the Fedora-Live-Workstation image.
Building the kickstart files
In this example, we removed some gnome-apps and end up what you know as "Fedora-Minimal-Workstation" Image.
Take that example and save it to a file you can name i.E. "example-START.ks". Make sure you can distinguish your file later as the starting point of your work. Because now, we will "join" aka. "flatten" the included files to one big kickstart.cfg file, that we will need for livemedia-creator later.
$ ksflatten -c as-you-like-START.ks -o kickstart.cfg
The problem you are now facing is, it doesn’t work out-of-box, because ksflatten does not find all the includes it needs. You can solve this in two ways:
a) you move your ks file to the directory named "fedora-kickstarts" and switch to it with cd, or
b) you execute the above command and copy all files it names in the errormessage from "fedora-kickstarts" to "." until it stops complaining.
From now on, you should only edit the created kickstart.cfg file for changes, otherwise you have to repeat the next step over and over again.
Fixing the "Mount"-bug
Either way, you end up with a defective cfg file, because the used include files define the mountpoint "/" two times, which lead to an error. That’s easily fixed:
# vim kickstart.cfg
search for "# Disk partitioning information" and change the two lines, that start with "part /" to this ONE line:
part / --fstype="ext4" --size=8576
We will try to fix this, but it could take until Fedora 45.
Creating the ISO
Now the part you are waiting for: Let’s create the iso image.
livemedia-creator --ks kickstart.cfg --no-virt --resultdir /var/lmc --project MYPROJECTNAME --make-iso --volid MY_ID --iso-only --iso-name <FILENAME>.iso --releasever 42 --macboot
Please replace the following terms:
"MYPROJECTNAME" That is your internal project name, that ends up in /etc/os-release "MY_ID" that is the name of the mounted ISO file AND VERY IMPORTANT if you wanne refer to that iso in GRUB "<FILENAME>" thats the name of the created iso file under /var/lmc
In approximitly 15 minutes, if everything works, you have a created <filename>.iso image IN YOUR TOOLBOX.
To get it out there, you enter …
# exit
and copy it to the desired place. In example:
# cp /var/lib/mock/fedora-42-x86_64/root/var/lmc/<filename>.iso /home/themasteruser/Downloads/Images/
Now you can test your image in different ways:
a) you can use Gnome-Boxen to just run it in your desktop environment, which is way easier.
or
b) use the QEMU line in the next section.
Congratulations: You are done creating our own live-image. Some tips on the way:
-
If you need services running, check kickstart.cfg for syslive.service
-
If you want to drop-in config files for the services, you have to build your own rpm.
-
If you want to have your own packages inside the image, you need to add a custom repo. See "repo" in kickstart.cfg .
Testare il CD live usando KVM o qemu

Come root:
# qemu-kvm -m 2048 -vga qxl -cdrom filename.iso
|
Se non si ha supporto KVM, si deve usare qemu invece. # qemu-system-x86_64 -m 2048 -vga qxl -cdrom filename.iso |
Sostituire filename.iso con il nome dell’immagine CD Live creata e qemu-system-x86_64 con un binario qemu appropriato per il sistema target, ad es. qemu-system-i386.
Verifica dei media immagine live
L’immagine live può incorporare funzionalità per verificare se stessa. Per farlo, è necessario avere isomd5sum installato sia sul sistema usato per creare l’immagine che installato nell’immagine. Questo in modo che le utilità implantisomd5 e checkisomd5 possano essere usate. Queste utilità sfruttano l’incorporamento di un md5sum nell’area applicazione dell’immagine iso9660. Questo viene poi verificato prima di montare il filesystem root reale.
Want to help? Learn how to contribute to Fedora Docs ›