I am trying to perform a kickstart install with the ks.cfg file being read from the installation CD. To do this I have burnt a RedHat 7.0 CD with my ks.cfg in the root directory: % ls -al dr-xr-xr-x 5 root root 2048 Dec 11 12:21 . drwxr-xr-x 9 root root 4096 Dec 8 12:47 .. -r--r--r-- 1 root root 483 Aug 31 09:19 .buildlog -r--r--r-- 1 root root 0 Aug 31 09:44 .disc1-i386 -r--r--r-- 1 root root 18385 Sep 8 1999 COPYING -r--r--r-- 1 root root 4730 Aug 26 02:31 README -r--r--r-- 1 root root 25206 Aug 28 14:15 RELEASE-NOTES -r--r--r-- 1 root root 1908 Sep 26 1999 RPM-GPG-KEY dr-xr-xr-x 4 root root 2048 Aug 31 09:44 RedHat -r--r--r-- 1 root root 509 Dec 11 12:24 TRANS.TBL -r--r--r-- 1 root root 2048 Dec 11 12:24 boot.cat dr-xr-xr-x 6 root root 4096 Aug 31 09:39 dosutils dr-xr-xr-x 8 root root 2048 Aug 31 09:40 images -r--r--r-- 1 root root 969 Dec 11 12:21 ks.cfg I have a boot floppy with the following syslinux..cfg file: default ks prompt 0 label ks kernel vmlinuz append ks=cdrom:/ks.cfg initrd=initrd.img When I proceed with the install a get the "Choose a Language" screen which indicates that kickstart is not working. However, when an exactly the same ks.cfg file is on the floppy and the "ks=foppy" option is used in the syslinux.cfg file the kickstart installation works fine. When at the "Choose a Language" screen after the kickstart failure I noticed that on one of the diagnostic screens (ATL-F3) the last two messages were: * trying to mount device hdc * trying to mount device hdc Out of interest I continued with the failed kickstart install by answering the questions manually. All went well until I reached the "Installation Method" screen. I selected the "Local CDROM" option and I got an "Error" screen with the following message "I could not find a Red Hat Linux CDROM in any of your CDROM drives. Please insert the Red Hat CD and press "OK" to retry." I pressed retry a number of times to no avail. I noticed on the diagnostic screen more of the messages above: * trying to mount device hdc Why can't it mount the device? There is a CD in my drive. I retried the install with a vanilla Red Hat 7.0 CD knowing full well that the ks.cfg file would not be found on the CD and the kickstart would fail, but I would reach the "Installation Method" screen with an untouched Red Hat 7.0 CD in my drive. And I get the same error message, with the same diagnostics messages. What I ultimately want to do is do away with the floppy and do a kickstart install entirely from the CD by adding the syslinux.cfg listed above to the /images/boot.img file on the CD but I can't do this without being able to read the ks.cfg file from the CDROM. Stephen H.
Passed to QA to reproduce.
I have also seen this problem and would like to make a few comments: I had kickstart from cdrom working properly with redhat 6.2, and it likewise broke for me with the same exact symptoms in this bug. One thing that I did notice is that on the 6.2 kickstart, it only tries to mount hdc twice, and on the 7.0 kickstart, it tries to mount hdc three times. I don't know if that would cause a problem or not, but it is definitely one difference. Also, there is a slight bug in loader/loader.c in the anaconda sources associated with the cdrom kickstart. Where it does the strncasecmp, it only checks the first 7 characters of the input to match against "ks=cdrom:", when it should be matching the first 9 characters. The pointer assignment is correct immediately below, but it's possible that "ks=cdroxx" would match properly. In trying to debug this problem, I have made a cdrom which automatically booted to a kickstart install, looking for the kickstart file on the floppy, and this worked properly, so the bug definitely lies in the specific code for the cdrom kickstart. This was further proven by booting off the floppy, passing "ks=cdrom:/ks.cfg", which failed. Please email me with any questions, I would be more than happy to answer them, it would be extremely helpful if this bug were fixed.
Also, one thing that was not pointed out is that the install is actually mounting the cdrom just fine. I know this because my CD drive is not ejecting the cdrom when I hit the eject button. It is just having problems finding the kickstart file on the cdrom.
verified this problem using a 7.0 cd with a generic /ks.cfg file on the cdrom; started the install booting from cdrom with 'linux ks=cdrom:/ks.cfg' at the syslinux command line ... while still in stage1 (no # prompt on vc2) I get an error dialog "Kickstart Error: error opening: kickstart file /tmp/ks.cfg: no such file or directory" ...
the last three lines of VC3 are: * loopfd is 6 * LOOP_SET_FD failed: Bad file descriptor * kickstart failed to find CD device and then continuing on in the install (pressing ok after the error message above), we proceed until trying to tell the installer to install from cdrom; an error occurs "I could not find a Red Hat Linux CDROM in any of your drives" ... Stephen, thanks for your efforts documenting and reporting this bug...!
I believe this will work if you put the ks.cfg file in the boot.img boot image on the CD. I will look into having it allow you to put it in the root directory of the CD.
This worked for me on my custom cd. The kickstart file is in /extra/ directory. In syslinux: linux ks=cdrom:/extra/ks.cfg [worked!] linux ks=cdrom:/extra/ [didn't work!] Please note that in: http://www.redhat.com/support/manuals/RHL-7-Manual/ref-guide/s1-kickstart2-startinginstall.html The syntax is said to be: ks=cdrom:/<path> The installation program will look for the kickstart file on CD-ROM, as file <path>. So, if this was to be believed, the second options should be correct. (compare with ks=hd:<device>/<file>).
I take a part of the previous comment back. Everything works fine until %post is finished, then it dies of a message described in #20151. If kickstart is loaded from the floppy, everything works fine.
The same problem occurs with RedHat 7.1 and the kickstart file located in the root of the CDROM. When doing "ks=cdrom:/ks.cfg" I get dropped into the manual install mode. Virtual terminal ALT-F3 shows: * loaded 9 keymap tables * starting to STEP_URL * trying to mount device hdc Virtual terminal ALT-F4 shows: <7> ISO 9660 Extensions: RRIP_1991A <4> Unable to identify CD-ROM format The same CD boots just fine if "text" is used for manual install. The same CD works fine with the ks.cfg file located on a boot floppy and using "ks=floppy".
*** Bug 39743 has been marked as a duplicate of this bug. ***
Bug #39743 has a patch that you may want to consider.
Hi - I experienced this problem as well, when I was trying to make a bootable CD that read a kickstart file from itself, as Stephen H. said he ultimately wants to do. I figured out a way around it: I put the ks.cfg file in the initrd.img. Then, I edited the syslinux.cfg file in the boot.img (the boot.img file contains the initrd.img file) so that it had the line: append ks=file:/ks.cfg initrd=initrd.img The ks=file:/ directive reads the ks.cfg file from the initrd.img. It's kind of messy, but it works quite well for me...
*** Bug 38391 has been marked as a duplicate of this bug. ***
*** Bug 20151 has been marked as a duplicate of this bug. ***
Created attachment 22688 [details] Workround in loader for kickstart/cdrom bug
The problem appears to be that the setupcdrom function is too damn smart and also loads stuff onto the loopback (this is interesting cos the calling routine then attempts to unmount /mnt/sysimage which is presumably why it all goes titsup. The code I have posted works round this, and is a nasty hack to and already nasty hack, but I don't want to start re-architecting stuff. When loader is rebuilt with the patch (use the anaconda source package), the installer then runs through to reading the packages (it then fails on my sample for entirely different and unrelated reasons). - Nigel.
Created attachment 22767 [details] New better tested and architected fix for cd kickstart problem - not tested on non-kickstart installs
msw, should this work now?
I guess not...
*** Bug 59764 has been marked as a duplicate of this bug. ***
Created attachment 46021 [details] Fix for kickstart bug for RH 7.2/anaconda 7.2-7
Any feedback as to whether this is fixed post 7.2? Its somewhat of a pain for every 7.x release needing to be patched to support a documented install form.
All of the code around using CDs in the loader has changed to some degree post-7.2 and I haven't gotten around to actually getting the fix in yet... it's on my list (and I'm checking it twice ;-)
Fixed in CVS... slight variation of how things are done in the attached patch, but it works for me.
Verified fix