Bug 22285 - ks=cdrom:/<path> kickstart option does not work.
Summary: ks=cdrom:/<path> kickstart option does not work.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda   
(Show other bugs)
Version: 7.0
Hardware: i586
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
: 20151 38391 39743 59764 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2000-12-14 06:40 UTC by stephenh
Modified: 2007-04-18 16:30 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-03-06 23:57:13 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Workround in loader for kickstart/cdrom bug (2.55 KB, patch)
2001-07-04 17:09 UTC, Nigel Metheringham
no flags Details | Diff
New better tested and architected fix for cd kickstart problem - not tested on non-kickstart installs (3.34 KB, patch)
2001-07-05 15:54 UTC, Nigel Metheringham
no flags Details | Diff
Fix for kickstart bug for RH 7.2/anaconda 7.2-7 (3.12 KB, patch)
2002-02-19 16:31 UTC, Nigel Metheringham
no flags Details | Diff

Description stephenh 2000-12-14 06:40:47 UTC
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

% 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.

Comment 1 Michael Fulbright 2000-12-14 16:46:42 UTC
Passed to QA to reproduce.

Comment 2 Need Real Name 2001-01-04 19:12:46 UTC
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.

Comment 3 Need Real Name 2001-01-04 19:36:10 UTC
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.

Comment 4 Brock Organ 2001-01-12 14:46:18 UTC
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" ...

Comment 5 Brock Organ 2001-01-12 14:50:35 UTC
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...!

Comment 6 Michael Fulbright 2001-01-12 15:30:18 UTC
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.

Comment 7 Pekka Savola 2001-04-20 13:36:34 UTC
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:


The syntax is said to be:


       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>).

Comment 8 Pekka Savola 2001-04-23 09:20:42 UTC
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

Comment 9 Adi Linden 2001-04-24 19:39:23 UTC
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".

Comment 10 Brent Fox 2001-05-10 20:24:23 UTC
*** Bug 39743 has been marked as a duplicate of this bug. ***

Comment 11 Brent Fox 2001-05-10 20:25:27 UTC
Bug #39743 has a patch that you may want to consider.

Comment 12 James Dobson 2001-05-25 21:09:41 UTC
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...

Comment 13 Brent Fox 2001-05-29 21:11:50 UTC
*** Bug 38391 has been marked as a duplicate of this bug. ***

Comment 14 Michael Fulbright 2001-06-27 17:58:49 UTC
*** Bug 20151 has been marked as a duplicate of this bug. ***

Comment 15 Nigel Metheringham 2001-07-04 17:09:58 UTC
Created attachment 22688 [details]
Workround in loader for kickstart/cdrom bug

Comment 16 Nigel Metheringham 2001-07-04 17:13:20 UTC
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

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

  - Nigel.

Comment 17 Nigel Metheringham 2001-07-05 15:54:21 UTC
Created attachment 22767 [details]
New better tested and architected fix for cd kickstart problem - not tested on non-kickstart installs

Comment 18 Brent Fox 2001-08-16 19:28:01 UTC
msw, should this work now?

Comment 19 Brent Fox 2001-09-19 18:56:35 UTC
I guess not...

Comment 20 Jeremy Katz 2002-02-12 22:16:42 UTC
*** Bug 59764 has been marked as a duplicate of this bug. ***

Comment 21 Nigel Metheringham 2002-02-19 16:31:00 UTC
Created attachment 46021 [details]
Fix for kickstart bug for RH 7.2/anaconda 7.2-7

Comment 22 Nigel Metheringham 2002-02-19 16:33:15 UTC
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.

Comment 23 Jeremy Katz 2002-02-19 16:58:40 UTC
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 ;-)

Comment 24 Jeremy Katz 2002-03-06 23:57:09 UTC
Fixed in CVS... slight variation of how things are done in the attached patch,
but it works for me.

Comment 25 Jeremy Katz 2002-04-10 04:39:40 UTC
Verified fix

Note You need to log in before you can comment on or make changes to this bug.