FedoraForum.org - Fedora Support Forums and Community
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,223

    F25 onwards - Livemedia-creator usage

    Objective - Create and burn a live-respin or a custom ISO

    Requirements - Basic Terminal command knowledge, a text editor of your choice, uncapped internet access or a large chunk of monthly data allowance left.

    Additional Requirements for custom ISO creation - Lots of time and patience, the stubbornness of a mule because it will take a few attempts before you nail the procedure.

    The official wiki recommends using mock. If you value your sanity don't until the bug is dealt with properly.

    Instead if possible run the same version and architecture of Fedora as the target ISO as a proper installation in VM. I happen to use VirtualBox but other VM are available and should work just as well. read the notes about the novirt switch here used during the build phase. This is why I run the process in a disposable VM rather than a main bare metal install.

    Inside the VM proceed as follows to install the required packages and set up the media creation environment properly.

    1. Open a Terminal window and type the following to install the packages:
    Code:
    sudo dnf install lorax-lmc-novirt git vim-minimal pykickstart
    2. Clone the contents of the fedora-kickstarts git repository. Don't use the older kickstarts from the fedora repositories.
    Code:
    git clone https://pagure.io/fedora-kickstarts.git
    3. Make sure SELinux is in permissive mode or the media build will fail
    Code:
    sudo  setenforce 0
    4. change to the fedora-kickstarts directory
    Code:
    cd fedora-kickstarts
    If you want to customise the kickstarts to make your own media, now is the time to do so. For this guide I'll use MATE-Compiz as the example. In this case there are five key files you need to be concerned with. all open with any standard text editor, they are not encoded.

    - fedora-repo.ks - where you tell lorax if you want rawhide or release, which 3rd-party repositories you want to use
    - fedora-repo-rawhide OR fedora-repo-not-rawhide.ks
    - fedora-live-base.ks
    - fedora-live-mate_compiz.ks - substitute accordingly with the spin you want to build
    - fedora-mate-common.ks - sets the package groups and packages to install or ignore

    fedora-repo.ks

    open the file and you will see comments. read them carefully, especially the lower section. the file comes configured to build a rawhide ISO. If you don't want this to happen, remove the 'comment' (# symbol and space) from the following line and insert the same in the opposing entry for rawhide so it reads:

    Code:
    %include fedora-repo-not-rawhide.ks
    
    and
    
    # %include fedora-repo-rawhide.ks
    to add third party repositories put them in the section above like so:

    Code:
    repo --name="Insert Name Here" --baseurl=http://rpms.remirepo.net/fedora/26/remi/x86_64/
    Don't use meta url link formatting as it will cause build failure. It is vital to only use a standard url. test them in your web browser to make sure you entered them properly. you should get a list of packages displayed. The name must be enclosed as double quotation marks as shown if it contains any spaces

    fedora-repo-rawhide.ks OR fedora-repo-non-rawhide.ks

    This as supplied will not work. You need to replace all the meta url links with proper addresses.

    everywhere the links mention the following strings, just replace the entire string with actual values as per these examples. do not leave the dollar signs.

    $release - 26
    $basearch - X86_64

    you can even use a local mirror.

    for example:
    Code:
    repo --name=fedora --baseurl=http://mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/releases/26/Everything/x86_64/os/
    repo --name=updates --baseurl=http://mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/updates/26/x86_64/
    #repo --name=updates-testing --baseurl=http://mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/updates/testing/26/x86_64/
    url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-26&arch=x86_64
    fedora-live-base

    All I changed here was the regional settings and time zone. If not sure of codes to use, look them up.

    fedora-live-mate_compiz.ks

    I removed the entry %include fedora-live-minimization.ks from the list at the beginning of the file because it contains a few packages I wanted to use. Check out this minimization file and see if you need to do the same.

    fedora-mate-common.ks

    This is the place to add or remove a package. read through what is already there. if you dont want anything add a - symbol before it to exclude it. if something already there you need is excluded then just remove the - symbol to include it in your image.

    Adding any other inclusions or exclusions is the same. just add the package name with our without the -symbol.

    packages in groups are not listed individually. if you want to exclude for example parole, then add an entry for it.

    if you want a group add it in the same format as the existing ones. with an @ symbol before the group name. to remove a group, delete the group entry rather than comment it out.

  2. #2
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    5,223

    Re: F25 onwards - Livemedia-creator usage

    The build stage

    First flatten the kickstart files. In the terminal window make sure it is still in the fedora-kickstarts directory. If not cd fedora-kickstarts from your home directory.

    then enter the following command
    Code:
    ksflatten -v, --config fedora-live-mate_compiz.ks -o flat-fedora-live-mate_compiz.ks --version F26
    switches:
    -v = verbose
    --config = which file to flatten from
    -o = output file

    The next command to enter builds the ISO file. If successful, the build process can take anything up to or over 3 hours depending on the speed of your internet, PC and the number of packages selected for installation.

    Code:
    sudo livemedia-creator --ks flat-fedora-live-mate_compiz.ks --no-virt --resultdir /var/lmc --project Fedora-MATE-Live --make-iso --volid Fedora-MATE-26 --iso-only --iso-name F26-MATE-x86_64.iso --releasever 26 --title Fedora-MATE-live --macboot
    switches:
    https://rhinstaller.github.io/lorax/...a-creator.html

    IMPORTANT - read the notes about the novirt switch here. This is why I run the process in a disposable VM rather than a main bare metal install.

    What if it goes wrong? You need to delete the directory /var/lmc with sudo or root rights before trying again. If you don't lorax will tell you it already exists and exit.

    What if it works? Retrieve your ISO in a few hours from the output directory /var/lmc. also, turn selinux back on.
    Code:
    sudo setenforce 1
    If you want to build any more ISO images remember to delete any existing /var/lmc directory first.

Similar Threads

  1. losetup fails when trying to create a remix using livemedia-creator under mock
    By iso70 in forum Installation, Upgrades and Live Media
    Replies: 36
    Last Post: 29th July 2017, 03:45 PM
  2. Making a Live Custom-Iso Using Livemedia-Creator
    By donatom in forum Guides & Solutions (Not For Questions)
    Replies: 2
    Last Post: 23rd March 2017, 01:01 AM
  3. Error Using LiveMedia-Creator
    By crokett in forum Fedora Spins & Remixes
    Replies: 2
    Last Post: 17th October 2016, 08:20 PM
  4. livemedia-creator
    By sea in forum Reviews, Rants & Things That Make You Scream
    Replies: 3
    Last Post: 5th August 2013, 06:34 PM
  5. livemedia-creator: parameters?
    By livecdOrNothing in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 20th April 2013, 01:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •