From Fedora Project Wiki

Line 100: Line 100:


===Retrieve finished live.iso===
===Retrieve finished live.iso===
"Results are in /tmp/lmc"
"Results are in /var/lmc"
*start files application
*start files application
*click on '''Files system'''
*click on '''Files system'''
:open  temp folder
:open  /var folder
:open lmc folder
:open lmc folder
*click on  the '''.....iso''' you just built
*click on  the '''.....iso''' you just built
'''copy to''' (mouse right click) '''Home''' with files application
'''copy to''' (mouse right click) '''Home''' with files application
*Check that it is in Home
*Check that it is in Home
===Clean Up===
===Clean Up===
* delete the instance in /var
* delete the instance in /var

Revision as of 20:49, 8 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

  • 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
  • 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/
  • 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 --no-virt --resultdir /var/lmc --project Fedora-soas-Live --make-iso --volid Fedora-SoaS-f24 --iso-only --iso-name Fedora-SoaS-f24.iso --releasever 24 --title Fedora-SoaS-live --macboot
  • "If you're using /tmp/lmc you need to make sure you have enough RAM available (assuming it is mounted using tmpfs)"
use /var/lmc if low on memory
  • "Right, if you only have 3.8G then 50% will be assigned to tmpfs and it's likely

you'll run out of ram when using /tmp/ for the resultdir."

Brian Lane - https://bugzilla.redhat.com/show_bug.cgi?id=1352970#c6

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-07-08 11:50:37,613: Disk Image install successful
2016-07-08 11:50:37,613: working dir is /var/tmp/lmc-work-ey7rlb4p
2016-07-08 12:02:35,166: Rebuilding initrds
2016-07-08 12:02:35,166: dracut args = ['--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode']
2016-07-08 12:02:35,167: rebuilding boot/initramfs-4.6.3-300.fc24.x86_64.img
2016-07-08 12:03:57,231: Building boot.iso
2016-07-08 12:03:57,328: running x86.tmpl
2016-07-08 12:04:37,262: Disk image erased
2016-07-08 12:04:37,945: SUMMARY
2016-07-08 12:04:37,945: -------
2016-07-08 12:04:37,946: Logs are in /home/satellit/Downloads/pagure
2016-07-08 12:04:37,946: Results are in /var/lmc

Retrieve finished live.iso

"Results are in /var/lmc"

  • start files application
  • click on Files system
open /var 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 /var
delete the /var/lmc directory (cannot run new build unless this is done?)
[root@localhost pagure]# cd /var
[root@localhost var]# ls
account  adm  cache  crash  db  empty  ftp  games  gopher  kerberos  lib  lmc  local  lock  log  mail  nis  opt  preserve  run  spool  tmp  www  yp
[root@localhost var]# rm -r lmc
rm: descend into directory 'lmc'? y
rm: remove regular file 'lmc/Fedora-SoaS-f24.iso'? y
rm: remove directory 'lmc'? y
[root@localhost var]#