PDA

View Full Version : Custom spin from current install


KoenHofmeester
7th September 2009, 09:49 AM
Hi All,
I've installed fedora 11 on one machine and I wan't to use this install to make an Iso to install on other workstations. Ive looked at revisor but im not sure if this burns gnome settings and customisations / fstab settings / etc into the iso. The best thing would be if I could make an iso from my current install including all settings. Is there a way to do that? And if so is there a manual / tutorial about how to do something like this? Cause the only thing I found where articles about editing the kickstart file. And I believe a kickstart file only sets the installation settings?

Thanks!

Regards, Koen

Dangermouse
7th September 2009, 10:07 AM
Hi

its possible to make a spin of your current installed system package wise, but as regards settings, yes its possible for alot of things (bookmarks, cand,y startups, etc), but not always so easy, depends on what setings you want, i dont use revisor for it, i found livecdtools the best.

Dave
I will be writing a guide soon.

bob
7th September 2009, 11:14 AM

(moved to Spins & Remixes)

eliashickman
18th October 2009, 01:34 PM
@Dangermouse. Did you ever create that guide? I'd really like to know some things. For instance how to include kmod-nvidia support.

leigh123linux
18th October 2009, 02:14 PM
@Dangermouse. Did you ever create that guide? I'd really like to know some things. For instance how to include kmod-nvidia support.


http://forums.fedoraforum.org/showthread.php?t=232154

fedorat01
19th October 2009, 09:58 AM
maybe this could be of help:
http://forums.fedoraforum.org/showthread.php?p=1278461

leigh123linux
19th October 2009, 04:37 PM
I'm chipping away at it.

At least I'm not getting any complaints about kmod-nvidia or vlc anymore.
My script looks just simply aweful though.

The latest error that I've gotten is this


/usr/lib/python2.6/site-packages/imgcreate/errors.py:45: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
return unicode(self.message)
Error creating Live CD : Failed to find package 'selinux 0' : No package(s) available to install
I have no idea what it's talking about. I looked for "selinux" and couldn't find it anywhere. I'll keep pluging away though. If anybody would like to look at my file feel free. As I said, it's a mess.

The remainder of it is here.


# don't start cron/at as they tend to spawn things which are
# disk intensive that are painful on a live image
chkconfig --level 345 crond off 2>/dev/null
chkconfig --level 345 atd off 2>/dev/null
chkconfig --level 345 anacron off 2>/dev/null
chkconfig --level 345 readahead_early off 2>/dev/null
chkconfig --level 345 readahead_later off 2>/dev/null

# Stopgap fix for RH #217966; should be fixed in HAL instead
touch /media/.hal-mtab

# workaround clock syncing on shutdown that we don't want (#297421)
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt

# and hack so that we eject the cd on shutdown if we're using a CD...
if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
cat >> /sbin/halt.local << FOE
#!/bin/bash
# we want to eject the cd on halt, but let's also try to avoid
# io errors due to not being able to get files...
cat /sbin/halt > /dev/null
cat /sbin/reboot > /dev/null
/usr/sbin/eject -p -m \$(readlink -f /dev/live) >/dev/null 2>&1
echo "Please remove the CD from your drive and press Enter to finish restarting"
read -t 30 < /dev/console
FOE
chmod +x /sbin/halt.local
fi

EOF

# bah, hal starts way too late
cat > /etc/rc.d/init.d/livesys-late << EOF
#!/bin/bash
#
# live: Late init script for live image
#
# chkconfig: 345 99 01
# description: Late init script for live image.

. /etc/init.d/functions

if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
exit 0
fi

exists() {
which \$1 >/dev/null 2>&1 || return
\$*
}

touch /.liveimg-late-configured

# read some variables out of /proc/cmdline
for o in \`cat /proc/cmdline\` ; do
case \$o in
ks=*)
ks="\${o#ks=}"
;;
xdriver=*)
xdriver="--set-driver=\${o#xdriver=}"
;;
esac
done


# this is a bad hack to work around #460581 for the geode
# purely to help move testing along for now
if [ \`grep -c Geode /proc/cpuinfo\` -ne 0 ]; then
cat > /etc/X11/xorg.conf <<FOE
# Xorg configuration created by livna-config-display



FOE
fi

# if liveinst or textinst is given, start anaconda
if strstr "\`cat /proc/cmdline\`" liveinst ; then
plymouth --quit
/usr/sbin/liveinst \$ks
fi
if strstr "\`cat /proc/cmdline\`" textinst ; then
plymouth --quit
/usr/sbin/liveinst --text \$ks
fi

# configure X, allowing user to override xdriver
if [ -n "\$xdriver" ]; then
exists system-config-display --noui --reconfig --set-depth=24 \$xdriver
fi

EOF

# workaround avahi segfault (#279301)
touch /etc/resolv.conf
/sbin/restorecon /etc/resolv.conf

chmod 755 /etc/rc.d/init.d/livesys
/sbin/restorecon /etc/rc.d/init.d/livesys
/sbin/chkconfig --add livesys
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules/extensions/nvidia"
ModulePath "/usr/lib/xorg/modules"
EndSection

Section "ServerFlags"
Option "AIGLX" "on"
Option "Xinerama" "0"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "HKC LCD"
HorizSync 30.0 - 80.0
VertRefresh 60.0 - 75.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "nvidia"
Option "AddARGBGLXVisuals" "True"
EndSection

Section "Device"

# I added this per http://forums.fedoraforum.org/showthread.php?t=173317&highlight=compiz
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 9600 GT"
Option "AccelMethod" "EXA"
Option "MigrationHeuristic" "greedy"
Option "AddARGBGLXVisuals" "True"
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Videocard0"
Monitor "Monitor0"
Option "AddARGBGLXVisuals" "True"
SubSection "Display"
Modes "nvidia-auto-select"
EndSubSection
EndSection

Section "Screen"

# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: NULL"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1440+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection
chmod 755 /etc/rc.d/init.d/livesys-late
/sbin/restorecon /etc/rc.d/init.d/livesys-late
/sbin/chkconfig --add livesys-late

# work around for poor key import UI in PackageKit
rm -f /var/lib/rpm/__db*
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

# go ahead and pre-make the man -k cache (#455968)
/usr/sbin/makewhatis -w

# save a little bit of space at least...
rm -f /boot/initrd*
# make sure there aren't core files lying around
rm -f /core*
%end



You are editing the wrong .ks files, just add the extra non-free packages to /usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-live-base.ks the rpmfusion ks still use /usr/share/spin-kickstarts/fedora-livecd-desktop.ks for the main configuration .

http://forums.fedoraforum.org/showpost.php?p=1278338&postcount=7

eliashickman
19th October 2009, 05:22 PM
Alright. I went ahead and started editing the right file but it's telling me that kmod-nvida, vlc, and the compiz packages aren't in the repo.
Also when I comment them out and try to create the image with just gnome-desktop and a couple other addons it's telling me that 'syslinux' isn't there.
I googled it and it seems as though it may be a yum bug.
Thanks for keeping an eye on me and these two threads. :)


Oh how should I add the files. Like this


#kmod-nvidia*
#kmod-nvidia-2.6.29.6-217.2.16.fc11.i686.PAE
#xorg-x11-drv-nvidia-libs-*
#xorg-x11-drv-nvidia-*
#vlc-*
#python-vlc-*
#mozilla-vlc-*
#vlc-core-*
#vlc-devel-*
#compiz-plugins-unsupported-0.8.3-1.fc11.i586
#compiz-0.8.3-3.fc11.i586
#compizconfig-python-0.8.3-1.fc11.i586
#compiz-plugins-main-0.8.3-2.fc11.i586
#compizconfig-backend-gconf-0.8.3-1.fc11.i586
#compiz-fusion-release-1-8.noarch
#compiz-bcop-0.8.3-1.fc11.noarch
#compiz-gnome-0.8.3-3.fc11.i586
#libcompizconfig-0.8.3-1.fc11.i586
#compiz-plugins-extra-0.8.3-1.fc11.i586
Without the comment code of course.
Umm yeah. I'm a little slow today. Just saw your single post with instructions on how to get the kmod-nvidia and vlc to work. Gonna try it now. Thanks again.

I think it's a problem with my mirror. Yum's loading it's fastestmirror plugin but I don't think they have the base packages that I need. I was getting that 'syslinux' error because of @gnome-desktop (or whatever). I'll try some other mirrors somehow. It's like the old RPM days of yore. Haha~~~sigh.

leigh123linux
19th October 2009, 05:48 PM
Did you remember to comment the rawhide repo and uncomment f11 (/usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-live-base.ks) ?

i.e

# To compose against the current release tree, use the following "repo"
#repo --name=rpmfusion-nonfree --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-11&arch=$basearch --includepkgs=rpmfusion-nonfree-release
# To include updates, use the following "repo"
#repo --name=rpmfusion-nonfree-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-11&arch=$basearch --includepkgs=rpmfusion-nonfree-release

# To compose against rawhide, use the following "repo"
repo --name=rpmfusion-nonfree-rawhide --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-rawhide&arch=$basearch --includepkgs=rpmfusion-nonfree-release


to


# To compose against the current release tree, use the following "repo"
repo --name=rpmfusion-nonfree --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-11&arch=$basearch --includepkgs=rpmfusion-nonfree-release
# To include updates, use the following "repo"
repo --name=rpmfusion-nonfree-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-11&arch=$basearch --includepkgs=rpmfusion-nonfree-release

# To compose against rawhide, use the following "repo"
#repo --name=rpmfusion-nonfree-rawhide --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-rawhide&arch=$basearch --includepkgs=rpmfusion-nonfree-release


as for compiz-0.8.3 it isn't provided by rpmfusion, it's provided by my compiz-fusion repository.

eliashickman
19th October 2009, 11:49 PM
Yeah, I deleted those two lines all together.

Another thing. I think I may have commited a ID10T error. (Not to be confused with the PEBKAC error)

The fedora repos should be included along with the rpmfusion in the .ks file correct?
Because I noticed that it was building fine (withstanding the kmod, blah, blah packages) when I included the Fedora repos. I'll give it another try tonight. About 3:00 your time.

eliashickman
20th October 2009, 03:50 PM
I tried exactly as you said and in http://forums.fedoraforum.org/showpost.php?p=1278338&postcount=7
I mean to the letter but I couldn't get it to build. Maybe it only works with the rawhide repo? I'm not entirely sure.
At any rate I'm going to create the image with just the barebones driver in the meanwhile I'm downloading Dangermouse's Greenback custom spin, and I'm gonna try that out.

leigh123linux
20th October 2009, 04:45 PM
Did you edit the repo's in /usr/share/spin-kickstarts/fedora-livecd-desktop.ks as well?

eliashickman
20th October 2009, 11:44 PM
No, I kept that the same. Should I have?

leigh123linux
21st October 2009, 02:54 AM
No, I kept that the same. Should I have?


Yes, it,s pointed to the rawhide repo's as default and needs changing for a F11 build.

eliashickman
21st October 2009, 04:01 PM
My /usr/share/spin-kickstarts/fedora-livecd-desktop.ks has this in it and not much else.

%include fedora-live-base.ks

Okay my /usr/share/spin-kickstarts/fedora-live-base.ks has this in it. I commented the rawhide out, I guess when you pointed out that I should do it, the first time.

# To compose against the current release tree, use the following "repo" (enabled by default)
repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-11&arch=$basearch
# To include updates, use the following "repo" (enabled by default)
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f11&arch=$basearch

# To compose against rawhide, use the following "repo" (disabled by default)
#repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch

# To compose against local trees, (edit and) use:
#repo --name=f11 --baseurl=http://localrepo/fedora/releases/11/Everything/$basearch/os/
#repo --name=f11-updates --baseurl=http://localrepo/fedora/updates/11/$basearch/


It turned out that it was the repos, as I suspected.
I went back and copied the repos from Dangermouse's Greenback .ks file and was able to create the disk.
Here's what I put in my /usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-live-base.ks

repo --name=rpmfusion-free --baseurl=http://download1.rpmfusion.org/free/fedora/releases/11/Everything/i386/os
repo --name=rpmfusion-free-updates --baseurl=http://download1.rpmfusion.org/free/fedora/updates/11/i386
repo --name=rpmfusion-non-free --baseurl=http://download1.rpmfusion.org/nonfree/fedora/releases/11/Everything/i386/os
repo --name=rpmfusion-non-free-updates --baseurl=http://download1.rpmfusion.org/nonfree/fedora/updates/11/i386


On, or two, last questions. How would I include a PAE kernel and your repo? Just:
kernel-PAE

Finally. Thank you so much for being here. Had you just left me hanging. I think I would have given up. This is something I've wanted to do for a while, but I've got a lot on my plate right now -- studying Korean and work. So thanks Leigh and David.

leigh123linux
21st October 2009, 04:22 PM
Have you tried adding this

repo --name=f11-compiz-fusion --baseurl=http://www.dfm.uninsubria.it/compiz/fusion/11/$basearch/to /usr/share/spin-kickstarts/fedora-live-base.ks

As for the PAE kernel try

kernel-PAE

eliashickman
21st October 2009, 11:44 PM
Leigh, just when you think you've got it cracked...

Fedora-LiveCDNvi: 93127/196608 files (0.6% non-contiguous), 631638/786432 blocks
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /var/tmp/imgcreate-dT4ZhK/iso-N24b3Y/LiveOS/osmin.img, block size 131072.
[================================================== =================|] 1/1 100%
Exportable Squashfs 4.0 filesystem, data block size 131072
compressed data, compressed metadata, compressed fragments
duplicates are removed
Filesystem size 0.26 Kbytes (0.00 Mbytes)
3.15% of uncompressed filesystem size (8.19 Kbytes)
Inode table size 42 bytes (0.04 Kbytes)
63.64% of uncompressed inode table size (66 bytes)
Directory table size 23 bytes (0.02 Kbytes)
85.19% of uncompressed directory table size (27 bytes)
Number of duplicate files found 0
Number of inodes 2
Number of files 1
Number of fragments 1
Number of symbolic links 0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /var/tmp/imgcreate-dT4ZhK/iso-N24b3Y/LiveOS/squashfs.img, block size 131072.
[===========================================| ] 17937/24576 72%
Write failed because No space left on device

Write on destination failed because No space left on device
[================================================== =========|] 24576/24576 100%/usr/lib/python2.6/site-packages/imgcreate/errors.py:45: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
return unicode(self.message)
Error creating Live CD : '/sbin/mksquashfs /var/tmp/imgcreate-dT4ZhK/tmp-4GC6u8 /var/tmp/imgcreate-dT4ZhK/iso-N24b3Y/LiveOS/squashfs.img' exited with error (1)


Why am I getting this error? I understand that it says that I'm out of space but that's ridiculous. I have plenty. Do you think it could be a directory quota? How can I fix this?

leigh123linux
21st October 2009, 11:56 PM
How much free space ?

http://www.nabble.com/How-to-create-live-dvd--%28livecd-creator-fail%29-td21240478.html

eliashickman
22nd October 2009, 11:59 AM
I've got 24 gigs. That's plenty I'm sure. Just to be REALLY safe I went ahead and put the "--cache=" on a partition that has 52 gigs.

It seems as though I'm getting closer. I editted my /usr/share/spins-kickstart/fedora-desktop-base.ks file and changed:
part / --size 24072 --fstype ext4
#part / --size 3072 --fstype ext4

I also edited my crontab so that it would clear my /tmp folder, which it did.
This is what I got the next time I ran livecd-creator

EDIT: Okay so that didn't work but I was able to finally create an ISO by using the "--tmpdir=" argument. I just need to trim it down some. It's almost 800MB's
The final command looked like this:
livecd-creator --config=/usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-livecd-desktop.ks --fslabel=Fedora-LiveCDNvidia --cache=/mnt/Music/tmp/ --tmpdir=/mnt/Music/tmp2


Leigh, there's a virtual beer waiting for ya whenever you want! (And it'll probably be a Sam Adams) :)