PDA

View Full Version : How I successfully set up Fedora kickstarts to generate unofficial fedora xfce4 isos.



donatom
10th October 2016, 07:43 AM
With the help of steve schilling (he came up with a very well functioning fedora-repo kickstart) and others I have been able to cobble together fedora 23, 24 and 25 isos which suit my needs perfectly. I use the resulting isos in usb drives to safely do banking and other business online. Every time there is an update on firefox I run livecd-creator to update fedora; obviously an up-to-date browser is much more secure than an out-dated one. As most of you know, you can obtain all fedora spin-kickstart files via dnf (dnf install spin-kickstarts.noarch). These files will be installed in the /usr/share/spin-kickstarts directory.

Here is a copy of the fedora-repo; I don't use fedora's rawhide or its stable repo version. However, one could easily convert "my" repo into one based on the bleeding edge rawhide repo. I use basically a stable repo.ks which includes rpmfusion repos.


##fedora-repo.ks with rpmfusion

repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-24&arch=$basearch
repo --name=fedora-updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f24&arch=$basearch
#repo --name=fpmfusionfreerawhide --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-rawhide&arch=$basearch
#repo --name=rpmfusionnonfreerawhide --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-rawhide&arch=$basearch
repo --name=rpmfusionfree --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-24&arch=$basearch
repo --name=rpmfusionfreeupdates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-24&arch=$basearch
repo --name=rpmfusionnonfree --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-24&arch=$basearch
repo --name=rpmfusionnonfreeupdate --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-24&arch=$basearch
repo --name=google --baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64

I commented out rpmfusion rawhide in order to successfully install vlc (livecd-creator was throwing errors about compatibility with the rawhide repos)

By changing "24" to "25" in this kickstart file, you would be able to make an iso for Fedora 25 (changed "23" to "24" in this file when Fedora was updated a few months ago.

As I said, these kickstart files are for creating an fedora xfce4 system. I, therefore, copied fedora-live-xfce.ks along with fedora-xfce-packages.ks and fedora-live-base.ks and made changes to fedora-live-xfce.ks and the fedora-live-base.ks.

Towards the end of the fedora-live-xfce4.ks file you can add files which will be included in the iso. You can place them on the desktop, in the livehome directory, etc. Here is a copy of my xfce4.ks with an added file on the Desktop (this is the only change on the file that I made):


****
****
# Show harddisk install on the desktop
sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
mkdir /home/liveuser/Desktop
cp /usr/share/applications/liveinst.desktop /home/liveuser/Desktop

# and mark it as executable (new Xfce security feature)
chmod +x /home/liveuser/Desktop/liveinst.desktop

# Create wifi info file on Desktop
echo 'How To Get Wifi to Work on Mac

Westwood

Wifi Access Point (WIFI ROUTER): ATT6v646v4
password: 2a693#9%33333



VENTURA

Wifi Access Point (wifi router): att192
password: 9995039415' > /home/liveuser/Desktop/WifiPassWD







# this goes at the end after all other changes.
chown -R liveuser:liveuser /home/liveuser
restorecon -R /home/liveuser



EOF

%end


In order to add (or delete) software, you must modify the fedora-live-base.ks. Use "@" in front of software groups and use the minus sign ("-") to delete software that you don't want included in your iso.
Here is a copy of my fedora-live-base.ks (the first part where software is added/deleted):


# fedora-live-base.ks
#
# Defines the basics for all kickstarts in the fedora-live branch
# Does not include package selection (other then mandatory)
# Does not include localization packages or configuration
#
# Does includes "default" language configuration (kickstarts including
# this template can override these settings)

lang en_US.UTF-8 ##(change if necessary)
keyboard us ##(change?)
timezone America/Los_Angeles ##(change if necessary)
auth --useshadow --passalgo=sha512
selinux --disabled ##(if you enable this, livecd-creator may throw errors)
firewall --enabled --service=mdns ##(I would definitely enable the firewall)
xconfig --startxonboot
part / --size 8192 --fstype ext4 ##(if there are errors you may have to increase size of "partition")
services --enabled=NetworkManager,ModemManager --disabled=network,sshd

%include fedora-repo.ks

%packages
@base-x
@guest-desktop-agents
@standard
@core
@fonts
@input-methods
@multimedia
@hardware-support
@printing
firefox
gparted
xsane
kernel-devel.x86_64
kernel-headers.x86_64
@libreoffice
-NetworkManager-l2tp-gnome.x86_64
NetworkManager-wifi.x86_64
-abiword
-midori
-fedora-release
-fedora-logos
-fedora-release-notes
generic-release
generic-logos
generic-release-notes
# b43-fwcutter.x86_64 (exclude this program using minus side for MacBookPro)
#vlc.x86_64 (caused errors in livecd-creator)
#ffmpeg.x86_64 (errors in livecd-creator)
akmod-wl.x86_64
google-chrome-stable.x86_64

# Explicitly specified here:
# <notting> walters: because otherwise dependency loops cause yum issues.
kernel

# This was added a while ago, I think it falls into the category of
# "Diagnosis/recovery tool useful from a Live OS image". Leaving this untouched
# for now.
memtest86+

***

***

***


The above info should hopefully help you to create your own unofficial "fedora" system (w/o fedora logo, etc.) with almost any file you would like to install. At the beginning of this live-base.ks you will need to make a few modifications to suit your locale, language, keyboard. Depending on how much additional software you add, you may have to increase the size of the "partition".


For those who own MacbookPros you will need to delete b43-fwcutter.x86_64 (- b43-fwcutter.x86_64) above (in fedora-live-base.ks) and add a few lines to the fedora-live-xfce.ks).

Here is the modified fedora-live-xfce file for MacbookPro (last part of file):


# Create wifi info file on Desktop
echo 'How To Get Wifi to Work on Mac

NORTHRIDGE

Wifi Access Point (WIFI ROUTER): ATTxyzzzz
password: 2a693#93333



VENTURA

Wifi Access Point (wifi router): att192
password: 9995039415' > /home/liveuser/Desktop/WifiPassWD




# compile Macbook Pro wifi driver
dnf -y update
akmods --force
modprobe wl






# this goes at the end after all other changes.
chown -R liveuser:liveuser /home/liveuser
restorecon -R /home/liveuser



EOF

%end



If you prefer another flavor (MATE, etc),by modifying the live-MATE.ks, etc. (if you want your own files on the iso or if you need to get this iso to work on a MacbookPro) in a similar fashion you should be able to cobble any unofficial fedora flavor together that you wish.

If anyone would like to have me include the complete files, let me know and I will do so.

Good luck and happy fedoraing (unofficially of course)!