PDA

View Full Version : Fedora 12 Thumbdrive Respin Step-by-step


macemoneta
17th December 2009, 05:48 AM
I just went through the process of creating an up to date spin, adding several packages (media players, encfs, sshfs). Since I had trouble finding a step-by-step, I thought I'd share mine. Hopefully it will save someone a little time.

As root, perform the following:

• If necessary, install revisor:

yum -y install revisor

• vi /etc/revisor/conf.d/revisor-f12-x86_64.conf and add the rpmfusion repositories:

[rpmfusion-free]
enabled = 1
protect = False
name = RPM Fusion free for Fedora
gpgkey =
baseurl = http://download1.rpmfusion.org/free/fedora/releases/12/Everything/x86_64/os/
includepkgs =
exclude =
gpgcheck = False

[rpmfusion-nonfree]
enabled = 1
protect = False
name = RPM Fusion nonfree for Fedora
gpgkey =
baseurl = http://download1.rpmfusion.org/nonfree/fedora/releases/12/Everything/x86_64/os/
includepkgs =
gpgcheck = False
exclude =You probably also want to set 'enabled=1' in the '[updates]' section.

• vi /root/thumbdrive.kickstart to create the package list. This is the package list I used; feel free to add or remove as you see fit:

%packages
@ Administration Tools
@ Base
@ Editors
@ Fonts
@ GNOME Desktop Environment
@ Graphical Internet
@ Graphics
@ Hardware Support
@ Printing Support
@ Sound and Video
@ System Tools
@ Window Managers
@ X Window System
a52dec
anaconda
audacity-freeworld
faac
faad2
faad2-libs
ffmpeg
ffmpeg2dirac
ffmpeg2theora
ffmpeg-libs
freetype-freeworld
fuse-libs
fuse
fuse-sshfs
fuse-encfs
gnome-mplayer
gnome-mplayer-common
gstreamer-ffmpeg
gstreamer-plugins-bad
gstreamer-plugins-ugly
kdenlive
lame
lame-libs
libdca
libdvbpsi
libmad
libmimic
libmms
libmpeg2
libmpeg3
libquicktime
live555
mjpegtools
mjpegtools-libs
mp3gain
mpeg2dec
mpg321
rpmfusion-free-release
rpmfusion-nonfree-release
smpeg
smpeg-devel
smpeg-libs
transcode
twolame-libs
unace
unrar
vlc
vlc-core
xine-lib-extras-freeworld
xvidcore
y4mscaler
%endAs an alternative to the above, you can create a package list from the current running system with:

echo 'part / --size 8000' > /root/thumbdrive.kickstart
echo '%packages' >> /root/thumbdrive.kickstart
/usr/bin/yum -C --color=never list installed | \
/usr/bin/awk '{print $1}' | \
/bin/grep -v -E "^[0-9]*[.:]" | \
/bin/grep -v "^\@" | \
/bin/sed -e 's/\.noarch$//;s/\.x86_64$//;s/\.i[3456]86$//' | \
/bin/sort -u >> /root/thumbdrive.kickstart
echo '%end' >> /root/thumbdrive.kickstart• Run revisor:

revisor --cli --config=/etc/revisor/revisor.conf --model=f12-x86_64 \
--kickstart=/root/thumbdrive.kickstart --respin \
--live-usb-thumb --live-shell

When you get the shell prompt, you are chrooted to the image. You can now continue.

• Add the default user. This user will be automatically logged in when booting:

adduser liveuser


• vi /etc/shadow and add a passwd to root and liveuser (replace the first '*' or "!!"). For no password, for example, use the following hash:

$1$4932$/KWKQijq1SMqbxqzjs5Bn0

You can generate a password hash with the command (just hit enter at the password prompt for no password):

openssl passwd -1 -salt $RANDOM

• If you have software RAID arrays, you can create a configuration file to make using them easier. For example: vi /etc/mdadm.conf and add:

DEVICE partitions
ARRAY /dev/md0 metadata=0.90 DEVICES=/dev/sda1,/dev/sdb1
ARRAY /dev/md1 metadata=0.90 DEVICES=/dev/sda2,/dev/sdb2
MAILADDR root• vi /etc/yum.conf to allow running yum from the image:

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
skip_broken=1
color=always
#exclude=• disable unneeded services:

chkconfig atd off
chkconfig crond off
chkconfig firstboot off
chkconfig iscsi off
chkconfig iscsid off
chkconfig netfs off
chkconfig nfslock off
chkconfig pcscd off
chkconfig portreserve off
chkconfig rpcbind off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rsyslog off
chkconfig sendmail off
chkconfig sshd off
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot

• vi /etc/gdm/custom.conf to autologin the liveuser by adding:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=liveuser• vi /etc/inittab and make sure the last line is as follows, to boot into X:

id:5:initdefault:

• exit to continue the creation process

When the process is done, you can test the image by booting it virtually. For example:

qemu-kvm -m 1024 -smp 2 -net nic -net user -hda /srv/revisor/f12-x86_64/live/Fedora-12-Live-x86_64.iso

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

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

dd if=/srv/revisor/f12-x86_64/live/Fedora-12-Live-x86_64.iso of=/dev/sde

jonathonp
20th December 2009, 03:01 AM
I don't understand the following command/s:

revisor --cli --config=/etc/revisor/revisor.conf --model=f12-x86_64 \
--kickstart=/root/thumbdrive.kickstart --respin \
--live-usb-thumb --live-shell

do i paste the whole the whole thing in the terminal? During the process i get this:

Configuring System: Configuring System: 0.0% authconfig: Authentication module /lib64/security/pam_fprintd.so is missing. Authentication process might not work correctly.
authconfig: Authentication module /lib64/security/pam_pkcs11.so is missing. Authentication process might not work correctly.
No such file or directory
Removing password for user root.
passwd: Success
Configuring System: Configuring System: ######################################## 100.0%
Launching shell. Exit to continue.
----------------------------------
bash-4.0#

What's next?

I will simplify my kickstart file

macemoneta
20th December 2009, 03:09 AM

Revisor is the command that builds the new system image for you. The meaning of the options can be found via 'man revisor'.

As the line of text after the command says, "When you get the shell prompt, you are chrooted to the image. You can now continue."

At this point in the process, revisor has created the drive image, but not yet compressed it. The commands you enter change the image. When you exit, revisor will continue and create the iso.

As a general comment, you should not execute random commands you find on the Internet, especially as root. If this is all new to you, read the man pages for the commands first, to ensure you won't harm your system.

scottro
20th December 2009, 01:47 PM
I'm going to make this thread a sticky, as I'm sure it will help many.

Thanks for writing it.

jonathonp
21st December 2009, 02:41 PM
The commands made sense after reading the man pages so i made some changes

revisor --cli --config=/etc/revisor/revisor.conf --model=f12-x86_64 --kickstart=path-to-kickstart-file --respin --install-dvd

however it seems the revisor project is a work in progress and may well be broken.

Anybody no what this error means?

Got an error from /usr/bin/xsltproc (return code 6)

macemoneta
21st December 2009, 04:40 PM
The error indicates a problem with a document (xslt stylesheet) applying to an xml file. However, I've found that many error are caused by running out of space in the image.

If you select a large number of packages, as in the 'package list from the currently running system' example above, you need to specify a larger partition size in the kickstart file (4GB is the default). For example:

part / --size 8000

This will allocate 8GB for the partition. This is the pre-compression size; it will likely still fit on a 4GB media.

Skeeter9807
28th December 2009, 08:10 PM
Macemoneta,

Thanks for sharing your work on revisor.

After failing in my (MULTIPLE) attempts to make a livecd respin f12-i386 using the .conf and .ks files (with my package additions) included by default in revisor, I came upon your thumb drive howto for x86_64 and thought it might help me in my efforts.

After changing the relevant mentions of x86_64 to i386 I tried:

revisor --cli --config=/etc/revisor/revisor.conf --model=f12-i386 --kickstart=/path/to/kickstart.ks --respin --live-optical --live-shell

with my kickstart. It failed. So I tried using your kickstart with the same command. This also failed.

In both instances, Revisor gets as far as configuring the system then displays the following:

Configuring System: ######################################## 100.0%
Launching shell. Exit to continue.
----------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/revisor/__init__.py", line 528, in run
self.base.run()
File "/usr/lib/python2.6/site-packages/revisor/base.py", line 106, in run
self.cli.run()
File "/usr/lib/python2.6/site-packages/revisor/cli.py", line 44, in run
self.base.lift_off()
File "/usr/lib/python2.6/site-packages/revisor/base.py", line 893, in lift_off
self.buildLiveMedia()
File "/usr/lib/python2.6/site-packages/revisor/base.py", line 1759, in buildLiveMedia
liveImage.launch_shell()
File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 748, in launch_shell
subprocess.call(["/bin/bash"], preexec_fn = self._chroot)
File "/usr/lib/python2.6/subprocess.py", line 444, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1092, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Traceback occurred, please report a bug at http://fedorahosted.org/revisor
Unmounting directory /var/tmp/revisor
Losetup remove /dev/loop5
[root@localhost /]#

>>==>(NOTE: I also have used the option --live-usb-thumb with the same results)

If I reissue the same revisor --cli command without deleting the working files, I get as far as the following:


Installing Software: ######################################## 100.0%
Error encountered during installation of the software you selected:

--> package wget-1.12-2.fc12.i686 is already installed
--> package syslinux-3.75-4.fc12.i686 is already installed
Unmounting directory /var/tmp/revisor
Losetup remove /dev/loop5
[root@localhost /]#

Some possible considerations:

during package install /proc empty or not mounted error message came up multiple times

I am using a f12 live cd (after adding revisor) as os during the respin. /var/tmp is linked symbolically to tmp on an external hard drive to provide space for the working files.

respin computer is Sony Vaio vgn-s150 with centrino processor.

Any idea what is going on? I am quite puzzled as I was successful respinning f10 throughout the active life of the release.


--Skeeter

macemoneta
28th December 2009, 08:40 PM
In your trace, the revisor code appears to be unable to run the bash shell. To me that implies a coding error in revisor. It doesn't appear to be a reported bug. I'm running fully updated (including updates-testing), with revisor-2.1.10-3.fc12.noarch. Which version are you running? If you are up to date, please submit a bug report with the trace in bugzilla (https://bugzilla.redhat.com/).

Skeeter9807
29th December 2009, 03:07 AM
Thanks for replying so quickly. I'm also running revisor-cli-2.1.10-3.fc12. Where did you find updates-testing for revisor? I looked thru a number of us mirrors and could not find it. I'll report the bug; too bad I can't just respin :-(

--Skeeter

macemoneta
29th December 2009, 03:17 AM
If you are running revisor-cli-2.1.10-3.fc12, then you have the latest version. I was saying I run updated with updates-testing enabled. Revisor uses many other software packages; the erroneous interaction you are seeing may be caused by another package (updated to an updates-testing revision on my system) which is why I'm not seeing it.

Skeeter9807
31st December 2009, 05:03 PM
At the time of my first post I was updated on releases and updates. Based on your comment, I updated to include testing, but, alas, I still get the same errors at the end of the respin process. Very puzzling. How can it be that one user can respin without a problem, but another cannot? Could there be that much difference between i386 and x86_64?

Well, thanks for your help. Cheers.

--Skeeter

ps I note that on http://fedorahosted.org/revisor, bug #363 is the same as my original post here. So I am not alone!

macemoneta
31st December 2009, 08:24 PM
Bug 363 is not the same trace as your post.

jonathonp
1st January 2010, 01:37 AM
I wasn't able to get revisor to work on a x86_64 system while trying to build a basic fedora install.

This is the command i used for revisor:

revisor --cli --model=f12-x86_64 --kickstart=/your-kickstart.cfg --dvd


Too many bugs. I believe that revisor uses the live-tools package which i assume is now known as the livecd-tools package.

" live-tools.....Revisor was build on top of these tools to do the GUI work, and allow even more customization of the media."

Has anybody built a live x86-64 respin with livecd-tools?

gr00ve
19th January 2010, 10:26 PM
my bet, i've moved the post about revisor errors here (http://forums.fedoraforum.org/showthread.php?t=238860)

macemoneta
19th January 2010, 11:43 PM
This thread isn't intended to be a catchall for revisor issues. If you're having a problem with the step-by-step posted, then commenting here is appropriate. If you are not following the step-by-step, then you need to open a new thread for assistance.

jonathonp
20th January 2010, 12:09 AM
I built a x86_64 DVD build with revisor a few weeks ago without any errors during the build. It Installed OK except i had to manually 'enable SELinux' after the installation.

macemoneta
20th January 2010, 12:23 AM
Was SELinux enabled on the host system? You can check the default state in the file /etc/selinux/config in the image, while in the shell.

kurtdriver
2nd September 2010, 05:17 AM
This thread seems dead, but it is a sticky, so here goes.
revisor errors out with

No model f13-x86_64 in configuration file

I had specified it on the command line, what is the format for inserting it into the config file? Kurt

macemoneta
2nd September 2010, 01:18 PM
Are you running on F13? If so, make sure you update your software. If I recall correctly, the initial revisor and anaconda didn't have an F13 configuration. There's also a separate F13 step-by-step here (http://forums.fedoraforum.org/showthread.php?t=250371).