Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've looked around quite a bit and have seen similar setup and questions, but none seem to work for me. I'm using the following command to create a custom ISO:

/usr/bin/livecd-creator --config=/usr/share/livecd-tools/test.ks --fslabel=TestAppliance --cache=/var/cache/live

This works great and it creates the ISO with all of the packages and configs I want on it. My issue is that I want the install to be unattended. However, every time I start the CD, it asks for all of the info such as keyboard, time zone, root password, etc. These are my basic settings I have in my kickstart script prior to the packages section.

cdrom
install
autopart
autostep
xconfig --startxonboot
rootpw testpassword
lang en_US.UTF-8
keyboard us
timezone --utc America/New_York
auth --useshadow --enablemd5
selinux --disabled
services --enabled=iptables,rsyslog,sshd,ntpd,NetworkManager,network --disabled=sendmail,cups,firstboot,ip6tables
clearpart --all

So after looking around, I was told that I need to modify my isolinux.cfg file to either do "ks=http://X.X.X.X/location/to/test.ks" or "ks=cdrom:/test.ks". I've tried both methods and it still forces me to go through the install process. When I tail the apache logs on the server, I see that the ISO never even tries to get the file. Below are the exact syntax I'm trying on my isolinux.cfg file.

label http
  menu label HTTP
  kernel vmlinuz0
  append initrd=initrd0.img ks=http://192.168.56.101/files/test.ks ksdevice=eth0
label localks
  menu label LocalKS
  kernel vmlinuz0
  append initrd=initrd0.img ks=cdrom:/test.ks
label install0
  menu label Install
  kernel vmlinuz0
  append initrd=initrd0.img root=live:CDLABEL=PerimeterAppliance rootfstype=auto ro liveimg liveinst noswap   rd_NO_LUKS rd_NO_MD rd_NO_DM
menu default
EOF_boot_menu

The first 2 give me a "dracut: fatal: no or empty root=" error until I give it a root= option and then it just skips the kickstart completely. The last one is my default option that works fine, but just requires a lot of user input. Any help would be greatly appreciated.

share|improve this question
    
Have you verified that the file is still called "test.ks" within the ISO? It's possible your command renamed the file... –  Vishal Kotcherlakota Aug 7 '12 at 23:58
    
@VishalKotcherlakota - Yes I have confirmed that the ks file is in the appropriate location. That is why I also tried to do it via the http kickstart as well just in case there were some permission issues and that didn't work either. –  Eric Aug 8 '12 at 12:58
    
From what I can tell, it looks like livecd-creator uses the kickstart file to determine what to include in the Live CD. It sounds like you're going to want to use mkisofs to re-master the install disk with your kickstart file. –  Vishal Kotcherlakota Aug 8 '12 at 17:07
    
@VishalKotcherlakota - That is kind of what I was thinking. How I'm using the livecd-creator tool is doing additional stuff to the image and not respecting the kickstart script. I'll research the syntax of mkisofs and try that. –  Eric Aug 8 '12 at 19:42
    
Cool, make sure to post your own answer if you come across it. :-) –  Vishal Kotcherlakota Aug 21 '12 at 1:45

2 Answers 2

As the comments to the question state, livecd-creator is really intended for a different purpose.

For bootable ISOs there are two paths to take:

  1. Make a network book iso and provide all software from network install tree, most common.
  2. Create a custom rolled ISO that includes the kickstart and install tree.

There are lots of write ups for number 1 as it is fairly common and has lots of benefits. Here are a few:

Number 2 is primarily for the times where you don't have a network available install tree. Here is how you do number 2:

  1. Make sure your kickstart sets in the install source to 'cdrom'
  2. Install mkisofs (this will give you either mkisofs or genisoimage, mkisofs command below should work with both)
  3. Download ISO
  4. Mount ISO

    mount -o loop /path/to/iso /mnt/point
    
  5. Copy entire directory structure of ISO to a new folder.

    mkdir -p /path/to/new/isosource
    cp -pr /mnt/point/* /path/to/new/isosource/
    
  6. Place your kickstart in the new folder

    cp /path/to/my/ks.cfg /path/to/new/isosource/
    
  7. move into folder that contains new folder

    cd /path/to/new
    
  8. Make sure isolinux directory is writeable

    chmod u+w isosource/isolinux/*
    
  9. Add ks entry in isosource/isolinux/isolinux.cfg for the 'Install' entry by changing

    append initrd=initrd.img
    

    to:

    append initrd=initrd.img ks=cdrom:/ks.cfg
    
  10. Make the ISO

    mkisofs -o file.iso -b isolinux/isolinux.bin -c isolinux/boot.cat \
      -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T isosource/
    
share|improve this answer
    
In regards to dmourati's concern below, yes, using a kickstart over the network is way easier. However, if you have a network server available there are much better options :) I've only seen one place where the manual process above was necessary, but I'm sure there are more. –  gregswift Nov 20 '12 at 3:25
    
Greg - Thank you very much for that information. It seems like it is exactly what I'm looking for. However, I did try the steps and I'm running into some errors. "dracut Warning: Boot has failed. To debug this issue add "rdshell" to the kernel command line. Kernel panic - not syncing: Attempted to kill init! Pid: 1, comm: init Not tainted 2.6.32-220.4.1.el6.i686 #1" This is when I use the following boot syntax "append initrd=initrd0.img ks=cdrom:/ks.cfg root=live:CDLABEL=SL-62-i386-LiveCD rootfstype=auto ro liveimg textinst noswap rd_NO_LUKS rd_NO_MD rd_NO_DM". –  Eric Nov 20 '12 at 15:00
    
I think I found my problem. In the errors above, I was using a LiveCD to do my testing. If I do this for a DVD install instead, I don't get the same errors. I just have to figure out how to make the new ISO image smaller and still respect the kickstart script. –  Eric Nov 21 '12 at 14:35
    
So you can basically clear out RPMs you don't want and just re-create the repodata. –  gregswift Nov 22 '12 at 2:24

You are making this much harder than you need to. Just take the stock ISO and boot it with a ks option at the command line. See below.

http://fedoraproject.org/wiki/Anaconda/Kickstart#How_Do_You_Perform_a_Kickstart_Installation.3F

share|improve this answer
1  
Great, now automate that. –  Michael Hampton Nov 19 '12 at 23:06
1  
@MichaelHampton Why? All he asked for was an unattended install. Presumably he will be there to insert the CD and boot the machine. Waiting for boot and typing a few characters still makes the whole install "unattended." Are there more automated ways to go? Of course, see PXE booting, cobbler, razor, etc. That's not the question though. OP got off track by thinking he needed to recook the CD. –  dmourati Nov 19 '12 at 23:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.