LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > macemoneta
User Name
Password

Notices


Rate this Entry

Fedora 18 LiveCD-Creator Thumbdrive Step-by-step

Posted 01-20-2013 at 04:17 PM by macemoneta

This process creates a custom bootable thumbdrive with the latest available Fedora 18 software. In addition, common repositories are preconfigured, and the list of software packages on the currently running system is used as the basis for the thumbdrive image.

As root, perform the following:

• Start by cleaning up problems on the system, reported by:

package-cleanup --orphans
package-cleanup --problems

Since the package list will be created from the running system, problems here will be problems in the creation of the image. If there are known issues, you will need to manually adjust the package list in thumbdrive.ks that gets created below. If you have installed a non-repository package, for example HandBrake-gui, you will need to remove HandBrake-gui from the list of packages in thumbdrive.ks.

• Create a working directory structure and change to it:

mkdir -p thumbdrive/livecd/cache
cd thumbdrive

• vi thumbdrive.ks and add the following. Modify options as you see fit:

lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
firewall --enabled --service=ssh
xconfig --startxonboot
part / --size 12000
services --disabled=atd,crond,iscsi,iscsid,ksm,ksmtuned,netfs,pcscd,portreserve,rpcbind,rsyslog,sendmail
repo --name=Fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-18&arch=x86_64
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f18&arch=x86_64
repo --name=rpmfusion-free --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-18&arch=x86_64
repo --name=rpmfusion-free-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-18&arch=x86_64
repo --name=rpmfusion-nonfree --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-18&arch=x86_64
repo --name=rpmfusion-nonfree-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-18&arch=x86_64
repo --name=google-chrome --baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
repo --name=Google --baseurl=http://dl.google.com/linux/rpm/stable/x86_64
repo --name=google-talkplugin --baseurl=http://dl.google.com/linux/talkplugin/rpm/stable/x86_64
repo --name=google-earth --baseurl=http://dl.google.com/linux/earth/rpm/stable/x86_64
repo --name=adobe-linux-x86_64 --baseurl=http://linuxdownload.adobe.com/linux/x86_64/
%packages

• Create a package list from the current running system (requires a 4GB thumbdrive) with:

yum -C --color=never list installed | \
awk '{print $1}' | \
grep -v "^[0-9]\|^\@\|^\:$\|^Adding$\|^Loading$\|^Installed$\|^Loaded$" | \
sort -u >> thumbdrive.ks

echo '%end' >> thumbdrive.ks

You can edit thumbdrive.ks and remove any packages you don't want. For example, I typically remove large games and their data files (alienarena, tremulous, etc). Also, any packages that you added that are not in repositories (see the package-cleanup, above) should be removed or additional 'repo' entries should be added.

• Run livecd-creator:

ionice -c3 nice -n 19 \
livecd-creator --cache=./livecd/cache --shell --config=thumbdrive.ks --fslabel=F18-LiveCD

• Wait for the bash '#' prompt. You are now chrooted into the created image, so any changes you make are to the image, and not the real system. Any messages you receive, like disabling services, are for the services in the image. You may see occasional error and warning messages or a traceback; these can be safely ignored.

• adduser liveuser
as the default login user.

• passwd -d liveuser
to remove the password for liveuser. Alternatively, you can set a password by omitting ‘-d’ for liveuser and root:

passwd liveuser
passwd root

• For GNOME: vi /etc/gdm/custom.conf

and add:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=liveuser

• For KDE: vi /etc/kde/kdm/kdmrc

and set:

[X-:0-Core]
AutoLoginEnable=true
AutoLoginUser=liveuser

• echo RUN_FIRSTBOOT=NO > /etc/sysconfig/firstboot

• sync
to write all updates in the image.

• exit
to continue the creation process. The next prompt you receive will be from the real system, not the image.

• You can test the image by booting it virtually, for example:

qemu-kvm -m 1024 -hda F18-LiveCD.iso -vga std

• If it looks good, you can put it on a thumbdrive with the dd command. For this example, the thumbdrive is on ‘/dev/sdX’

ALL DATA WILL BE DESTROYED ON THE THE DEVICE SPECIFIED - MAKE SURE IT'S CORRECT

dd if=F18-LiveCD.iso of=/dev/sdX bs=1M oflag=dsync
Posted in Uncategorized
Views 2224 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration