PDA

View Full Version : Python error



eliashickman
17th October 2009, 06:09 PM
I'm pretty sure one of the python modules has a bug, because I had to comment out all of the references to "Input Device" in my /etc/X11/xorg.conf file.
Now however, I can't seem to create a livecd/spin/remix
Here's what I attempted. I'm not a programmer so I didn't bother reading the report nor attempted to dump the error to a file. Here's what I got from stdout though.



[root@localhost /usr/share/spin-kickstarts]# livecd-creator -c fedora-livecd-desktop-en_US.ks
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=fedora-livecd--i
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
196608 inodes, 786432 blocks
7864 blocks (1.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=805306368
24 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.4 (27-Jan-2009)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Traceback (most recent call last):
File "/usr/bin/livecd-creator", line 140, in <module>
sys.exit(main())
File "/usr/bin/livecd-creator", line 122, in main
creator.mount(options.base_on, options.cachedir)
File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 524, in mount
self.__create_selinuxfs()
File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 456, in __create_selinuxfs
for (file, value) in files + self.__getbooleans():
File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 438, in __getbooleans
for i in selinux.security_get_boolean_names()[1]:
OSError: [Errno 2] No such file or directory

leigh123linux
17th October 2009, 06:46 PM
It looks like a selinux problem, make sure selinux is enabled on the host system ( permissive mode is OK ).

eliashickman
18th October 2009, 05:30 AM
Thanks for responding Leigh.
You're absolutely correct. I went ahead and followed a suggestion I found from http://osdir.com/ml/fedora-test-list/2009-07/msg00613.html and did the following.
Opened /usr/share/spin-kickstarts/fedora-livecd-desktop-en_US.ks
Added "selinux --disabled" after the %include and then ran "livecd-creator -c fedora-livecd-desktop-en_US.ks "
now everything's working like a charm. :)

Do you by any chance know of any good spin/remix creation guides? If not, it's okay because I'm following this http://fedoraproject.org/wiki/Classroom/Creating_Fedora_Remix#t21:19

eliashickman
18th October 2009, 01:36 PM
Okay so here's the real error that I get



Installing: gnome-packagekit ##################### [824/827]
Installing: gdm ##################### [825/827]
Installing: gdm-user-switch-applet ##################### [826/827]
Installing: pulseaudio-gdm-hooks ##################### [827/827]

authconfig: Authentication module /lib/security/pam_fprintd.so is missing. Authentication process might not work correctly.
authconfig: Authentication module /lib/security/pam_pkcs11.so is missing. Authentication process might not work correctly.
Failed to write selinux configuration.
Removing password for user root.
passwd: Success
Traceback (most recent call last):
File "/usr/bin/livecd-creator", line 140, in <module>
sys.exit(main())
File "/usr/bin/livecd-creator", line 124, in main
creator.configure()
File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 732, in configure
self._create_bootconfig()
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 197, in _create_bootconfig
self._configure_bootloader(self.__ensure_isodir())
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 604, in _configure_bootloader
self._configure_syslinux_bootloader(isodir)
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 508, in _configure_syslinux_bootloader
cfg += self.__get_image_stanzas(isodir)
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 435, in __get_image_stanzas
is_xen = self.__copy_kernel_and_initramfs(isodir, version, index)
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 362, in __copy_kernel_and_initramfs
isodir + "/isolinux/initrd" + index + ".img")
File "/usr/lib/python2.6/shutil.py", line 52, in copyfile
fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory: '/var/tmp/imgcreate-bY6an3/install_root/boot/initrd-2.6.31.1-56.fc12.i686.img


It seems that I'm not alone in this having this error.
I found this.



That seems to be caused changes made in rawhide because of http://fedoraproject.org/wiki/Features/Dracut

We will have to wait until the design and implementation are completed and livecd-tools in F11 has been updated accordingly - if that is going to happen.


From here. http://osdir.com/ml/fedora-livecd/2009-09/msg00013.html

leigh123linux
18th October 2009, 02:00 PM
Well theres no guarantees with rawhide spins.



'/var/tmp/imgcreate-bY6an3/install_root/boot/initrd-2.6.31.1-56.fc12.i686.img
It doesn't surprise me that this file doesn't exist as rawhide uses initramfs now instead of initrd.



[root@localhost Sun Oct 18 13:58:32 leigh]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd1,0)
# kernel /boot/vmlinuz-version ro root=/dev/sdb1
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sdb1
default=0
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.31.4-83.fc12.x86_64)
root (hd1,0)
kernel /boot/vmlinuz-2.6.31.4-83.fc12.x86_64 ro root=UUID=79f44b60-0b8d-4e9e-bb4e-6733c45c97e7 LANG=en_GB.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=uk rhgb quiet nomodeset vga=0x31B
initrd /boot/initramfs-2.6.31.4-83.fc12.x86_64.img



We will have to wait until the design and implementation are completed and livecd-tools in F11 has been updated accordingly - if that is going to happen.


Try installing the F12 livecd-tools in F11 if you want to create you own rawhide remix from a F11 host system.

eliashickman
18th October 2009, 11:19 PM
Thanks again for the clarification. I didn't know that there was a difference. I should read more about Rawhide.
Using the Fedora repos I was able to create an image.

I'm going to try an use the rpmfusion non-free remix kickstart file to create an image with vlc and kmod-nvidia. Thanks for the link. http://forums.fedoraforum.org/showthread.php?t=232154

leigh123linux
18th October 2009, 11:44 PM
Try ( you may need to edit the repo's, do both nonfree & free )


su
yum install rpmfusion-nonfree-remix-kickstarts rpmfusion-free-remix-kickstarts
Then edit /usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-live-base.ks


su
gedit /usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-live-base.ksand change


%packages
# unbrand; should be done by rpmfusion-free-live-base.ks, but we do it here as
# well just to be sure
-fedora-release
-fedora-logos
-fedora-release-notes
generic-release
generic-logos
generic-release-notes
%end

to



%packages
# unbrand; should be done by rpmfusion-free-live-base.ks, but we do it here as
# well just to be sure
-fedora-release
-fedora-logos
-fedora-release-notes
vlc
kmod-nvidia
generic-release
generic-logos
generic-release-notes
%end


Then build with ( or similar command)


livecd-creator \
--config=/usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-livecd-desktop.ks \
--fslabel=Fedora-LiveCD --cache=/var/cache/live

eliashickman
31st October 2009, 02:55 PM
Oh, I did that.
Sorry Leigh it's been a while since I tried to build the spin. I did complete one but I have to enter runlevel three everytime I boot the CD. Actually my grub line looks like this.

nomodeset noapic noapm acpi=off edd=off 3 Fricken' ridiculous. If I have to type all these in every single time I boot the disk I'll just die. How could I automate this? I have an idea but I'm not sure about the syntax. I guess I'd need to do a
cat > /boot/grub/grub.conf << EOF ... but I don't know what goes after that without breaking grub.

I'm going to work on the problems and try to give you a more specific/detailed question later (maybe a couple of days).
Just so you know I built the Spin with this addition to my /usr/share/spin-kickstarts/fedora-live-base.ks file, in the %post section which was obtained from copying my running system's /etc/X11/xorg.conf file:


# 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

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
FOE
fi


And the kmod-nvidia drivers installed just perfectly. :)

I don't know why I commented out the "Extensions" sections. I was just paranoid after all that's gone down that Something would go wrong again. Hahaha.

So one last question, if I just edit the "xorg.conf" part in the kickstart file can I use the
livecd-creator --config=/usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-livecd-desktop.ks --base-on=Fedora-LiveCDNvidia.iso --cache=/mnt/Music/tmp/ --tmpdir=/mnt/Music/tmp2/
and rebuild the image?? I'm not sure if the --base-on applies to ONLY packages or scripted information.