LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 11-17-2011, 03:10 PM   #1
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Fedora 16 Custom Bootable Thumbdrive Step-By-Step


I've updated my step-by-step instructions for creating a custom bootable thumbdrive for Fedora 16. You can get it here. I usually update it over the life of the release, as needed. A static copy follows:

Quote:
Fedora 16 LiveCD-Creator Thumbdrive Step-by-step

Author: Mace Moneta


This process creates a custom bootable thumbdrive with the latest available Fedora 16 software. In addition, the rpmfusion 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-16&arch=x86_64
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f16&arch=x86_64
repo --name=rpmfusion-free --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-16&arch=x86_64
repo --name=rpmfusion-free-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-16&arch=x86_64
repo --name=rpmfusion-nonfree --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-16&arch=x86_64
repo --name=rpmfusion-nonfree-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-16&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
%packages

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

/usr/bin/yum -C --color=never list installed | \
/usr/bin/awk '{print $1}' | \
/bin/grep -v "^[0-9]\|^\@\|^\:$\|^Adding$\|^Loading$\|^Installed$\|^Loaded$" | \
/bin/sed -e 's/\.noarch$//;s/\.x86_64$//;s/\.i[3456]86$//' | \
/bin/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:

livecd-creator --cache=./livecd/cache --shell --config=thumbdrive.ks --fslabel=F16-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.

• Set the PATH: PATH=$PATH:/sbin:/usr/sbin

• adduser liveuser as the default login user.

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

passwd liveuser
passwd root

• vi /etc/gdm/custom.conf and add:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=liveuser

• vi /etc/sysconfig/firstboot and add:

RUN_FIRSTBOOT=NO

• 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 -smp 2 -net nic -net user -hda F16-LiveCD.iso

• 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=F16-LiveCD.iso of=/dev/sdX bs=1M oflag=dsync

Last edited by macemoneta; 11-28-2011 at 01:47 PM. Reason: Add oflag=dsync to dd command
 
Old 11-19-2011, 12:20 AM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Nice write-up! I always wanted to create a live DVD/USB image of my current setup, and after reading this, I just might do it this way. Thanks!

Cheers,

Josh
 
Old 04-15-2012, 04:42 AM   #3
kbkblee
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
I followed this instruction. At the end, I get

wils:/ exit
exit
Unmounting directory /var/tmp/imgcreate-v2A4_q/install_root failed, using lazy umount
Unmounting directory /var/tmp/imgcreate-v2A4_q/install_root failed, using lazy umount
lazy umount succeeded on /var/tmp/imgcreate-v2A4_q/install_root
Error creating Live CD : fsck after resize returned an error (1)!
umount: /var/tmp/imgcreate-v2A4_q/install_root/sys/fs/selinux/load: not found

Can you help me more?
Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 14 LiveCD-Creator Thumbdrive Step-by-step macemoneta Fedora 2 11-13-2010 04:59 AM
Install Netgear wg311v wireless card on Fedora Core 6 (step by step help thanks!) jpop Linux - Hardware 1 03-07-2007 01:16 PM
Step by Step insturctions to installing AMsn messenger of Fedora Core 4 (older kernal lanerd Fedora 2 12-22-2005 06:52 PM
Step by step kernel compile for fedora core 3 Braveheart1980 Fedora 6 11-11-2004 02:41 AM
need step by step for install thai font on RH9 or Fedora sutti Linux - Newbie 3 08-22-2004 02:40 AM


All times are GMT -5. The time now is 08:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration