LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Distributions (http://www.linuxquestions.org/questions/forumdisplay.php?f=5)
-   -   livecd-creator centos 5.4 some errors while creating ISO and on boot of the ISO (http://www.linuxquestions.org/questions/showthread.php?t=4175450560)

niteshadw 02-17-2013 01:04 PM

livecd-creator centos 5.4 some errors while creating ISO and on boot of the ISO
 
Hi,

I'm trying to create a LiveCD using livecd-creator obtained from EPEL 5 repository. I also created a local repository of the CentOS 5.4 x64 where all of the rpms were copied from the DVD onto the hard drive.

I used the following command to create the ISO:

Code:

# LANG=C livecd-creator --config=centos-livecd-minimal.ks --fslabel=CentOS-minimal
The ks file was obtained from projects.centos.org and modified only to remove the repos and point to the local repo on the hard drive.

When the ISO is being created, I got the following messages:

Code:

/sbin/restorecon: invalid option -- l
usage:  /sbin/restorecon [-iFnrRv] [-e excludedir ] [-o filename ] [-f filename | pathname... ]
Removing password for user root.
passwd: Success
/sbin/restorecon: invalid option -- l usage:  /sbin/restorecon [-iFnrRv] [-e excludedir ] [-o filename ] [-f filename | pathname... ]

Building an initramfs at /boot/livecd-initramfs-2.6.18-164.el5.img for kernel 2.6.18-164.el5
cat: /lib/modules/2.6.18-164.el5/modules.block: No such file or directory
Done; initramfs is 4.1M.

...

Exception exceptions.AttributeError: "noneType' object has no attribute 'sysconf'" in <bound method LiveCDYum.--del-- of <imgcreate.yuminst.LiveCDYum object at 0xc6b4fd0>> ignored

The ISO is created and is bootable. However during boot I get the following messages:

Code:

udevd[322]: add_to_rules: unknown key 'ATTRS{media}'
...
Starting udev: udevd[651]: add_to_rules: unknown key 'ATTRS{media}'


Would anyone have any idea what is causing this?

kbp 02-21-2013 04:41 PM

Not sure if it's related, but I ended up creating a wrapper script for livecd-creator .. it may help:

Code:

#!/bin/bash
# create a livecd

if [[ $# -ne 3 ]]
then
    echo "Usage: $0 <architecture> <kickstart.ks> <label>"
    exit 1
fi

# vars
arch=$1
kickstart=$2
label=$3

# disable selinux
if [[ -x $(which getenforce) ]]
then
    SELINUX=true
    SEL_STATUS=$(getenforce)
fi

if [[ "$SEL_STATUS" = "Enforcing" ]]
then
    setenforce 0
    if [[ $? -eq 0 ]]
    then
        SEL_RESTORE=true
        echo "[*] disabled selinux"
    fi
fi

# add proxy
#export http_proxy=http://proxyhost:8080

# create live cd
setarch ${arch} livecd-creator --config=${kickstart} --cache=/var/cache/live --fslabel=${label}-$(date +%Y%m%d)

# re-enable selinux if required
if [[ $SEL_RESTORE ]]
then
    setenforce 1
    echo "[*] enabled selinux"
fi


niteshadw 02-21-2013 09:04 PM

Thank you for your suggestion, I will give it a try and see if it makes a difference. However I did try disabling selinux without any improvements.

If I may ask, what host were you running to create the LiveCD, and what was the CentOS/Fedora/etc version of resulting image?

Thank you!

kbp 02-21-2013 10:33 PM

I was running on Fedora with selinux in Enforcing


All times are GMT -5. The time now is 07:35 AM.