From Fedora Project Wiki

m (→‎Install files: clean up)
Line 17: Line 17:
  # dnf install lorax virt-install libvirt-daemon-config-network pykickstart
  # dnf install lorax virt-install libvirt-daemon-config-network pykickstart
   
   
Last metadata expiration check: 2:48:39 ago on Sun Jun 19 14:06:08 2016.
Package lorax-23.21-1.fc23.x86_64 is already installed, skipping.
Package libvirt-daemon-config-network-1.2.18.3-1.fc23.x86_64 is already installed, skipping.
--snip--
Downloading Packages:
virt-install-1.3.2-2.fc23.noarch.rpm                                                                                                              219 kB/s |  92 kB    00:00   
--snip--
Installed:
  virt-install.noarch 1.3.2-2.fc23                                                                                                                                               


*Must be done first:
*Must be done first:

Revision as of 11:23, 7 July 2016

Note.png
Note
for older method (namely for Fedora 23) using livecd-tools (livecd-creator) visit https://fedoraproject.org/wiki/How_to_create_and_use_a_Live_CD
Note.png
Note
If you simply want to burn a pre-made ISO to a disc, visit http://fedoraproject.org/en/get-fedora to download a LiveCD or LiveDVD, then see the install guide or burning how-to for further instructions.
Note.png
Note
for f25 (rawhide) livemedia-creator see https://wiki.sugarlabs.org/go/Fedora_25#livemedia-creator

livemedia-creator

  • Older posts
https://www.brianlane.com/creating-live-isos-with-livemedia-creator.html
https://jbwillia.wordpress.com/2014/10/29/how-to-build-updated-fedora-live-iso-for-yourself/
  • Examples in f24 root terminal:

Install files

  • livemedia-creator and ksflatten are part of lorax
# dnf install lorax virt-install libvirt-daemon-config-network pykickstart

  • Must be done first:
You must be in the same fedora version (f24) first. This is so that packages can be installed to livecd without SELinux errors and is relabeled at boot time.
setenforce 0

Notes

  • Important
http://lorax.readthedocs.io/en/latest/livemedia-creator.html
  • Jun 28, 2016 at 12:28:27PM -0500, Bruno Wolff III wrote:
"In --no-virt mode it's calling anaconda
directly so kickstart processing of the %include may work, depending on
the location of the files. But if you're using it in virt mode only the
top level ks gets passed into the vm so ksflatten is required in that
case."

pagure kickstarts Links

https://pagure.io/fedora-kickstarts/tree/f24
alternately: git clone the repo and not get each piece manually
Kickstarts need to flattened before use:
hit raw tab and save-page-as to a local directory (/home/(user)/Downloads/pagure/)
https://pagure.io/fedora-kickstarts/blob/f24/f/fedora-live-soas.ks
https://pagure.io/fedora-kickstarts/blob/f24/f/fedora-live-base.ks
https://pagure.io/fedora-kickstarts/blob/f24/f/fedora-live-minimization.ks
https://pagure.io/fedora-kickstarts/blob/f24/f/fedora-repo.ks
https://pagure.io/fedora-kickstarts/blob/f24/f/fedora-repo-not-rawhide.ks
https://pagure.io/fedora-kickstarts/blob/f24/f/fedora-repo-rawhide.ks
https://pagure.io/fedora-kickstarts/blob/f24/f/fedora-soas-packages.ks
  • switch root terminal to the local directory with the kickstart files (/home/(user)/Downloads/pagure/)

ksflatten

updated 06/28/2016


ksflatten -v, --config fedora-live-soas.ks -o flat-fedora-live-soas.ks --version F24

livemedia-creator example

livemedia-creator --ks /home/(user)/Downloads/pagure/flat-fedora-live-soas.ks  --logfile /tmp/lmc-logs/livemedia-out.log --no-virt --resultdir /tmp/lmc --project Fedora-soas-Live --make-iso --volid Fedora-SoaS-flat-live --iso-only --iso-name Fedora-SoaS-flat-live.iso --releasever 24 --title Fedora-SoaS-flat-live --macboot

Make a remix

  • edit the bottom of the flat-fedora-live-soas.ks
that you produce with ksflatten (above)
in this section of the flattened.ks:

%packages

add a program (add name)
- delete a program ( put - in front)
put # in front of listed program to not install it

kickstart-docs

livemedia-creator terminal output

Build takes a long time wait for completion
ends with:
..........clip........
..........clip........
2016-05-17 16:16:16,110: Disk Image install successful
2016-05-17 16:16:16,110: working dir is /var/tmp/lmc-work-rilyz2bm
2016-05-17 16:27:38,448: Rebuilding initrds
2016-05-17 16:27:38,448: dracut args = ['--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode']
2016-05-17 16:27:38,449: rebuilding boot/initramfs-4.5.3-300.fc24.x86_64.img
2016-05-17 16:29:15,724: Building boot.iso
2016-05-17 16:29:15,784: running x86.tmpl
2016-05-17 16:29:48,959: Disk image erased
2016-05-17 16:29:49,377: SUMMARY
2016-05-17 16:29:49,377: -------
2016-05-17 16:29:49,377: Logs are in /tmp/lmc-logs
2016-05-17 16:29:49,377: Results are in /tmp/lmc

Retrieve finished live.iso

"Results are in /tmp/lmc"

  • start files application
  • click on Files system
open temp folder
open lmc folder
  • click on the .....iso you just built

copy to (mouse right click) Home with files application

  • Check that it is in Home

Clean Up

delete the instance in /tmp
delete the /tmp directory (cannot run new build unless this is done?)
[root@localhost lmc]# 
[root@localhost lmc]# cd ..
[root@localhost tmp]# rm -r lmc
rm: descend into directory 'lmc'? y
rm: remove regular file 'lmc/Fedora-LUCwks-20160524.iso'? y
rm: remove directory 'lmc'? y
[root@localhost tmp]#