免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2846 | 回复: 0
打印 上一主题 下一主题

如何制作Fedora Live CD并集成自己喜欢的软件和工具 [复制链接]

论坛徽章:
3
CU大牛徽章
日期:2013-05-20 10:43:41CU大牛徽章
日期:2013-05-20 10:44:06CU大牛徽章
日期:2013-05-20 10:44:16
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-02-13 11:08 |只看该作者 |倒序浏览
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:

Code:
[rpmfusion-free]
enabled = 1
protect = False
name = RPM Fusion free for Fedora
gpgkey =
baseurl = http://download1.rpmfusion.org/f ... erything/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/n ... erything/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:

Code:
%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
%end
As an alternative to the above, you can create a package list from the current running system with:

Code:
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:

Code:
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:

Code:
[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:

Code:
[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
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP