Bug 6487

Summary: Kickstart fails when using DHCP and CD-Rom
Product: [Retired] Red Hat Linux Reporter: adam
Component: installerAssignee: Matt Wilson <msw>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 6.1CC: bentlema
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-22 13:47:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description adam 1999-10-29 05:29:48 UTC
Kickstart installs fail with a python error if you attempt
to do a CD-Rom Based kickstart install with a kickstart
file obtained from the DHCP server.

With DHCP configured something like this:
host builder {
        filename
"/home/archive/kickstart/builder.kickstart";
        next-server pendragon.cybertrails.com;
        hardware ethernet 00:90:27:2E:93:35;
        fixed-address 162.42.150.62;
        option host-name "builder";
}


A kickstart file that will generate this error follows:


# What language
lang en_US
# Network config, all should be static
network --bootproto dhcp
# What to install from
cdrom
# Any devices that we need for install
device ethernet eepro100
device scsi BusLogic
# Keyboard type
keyboard us
# noprobe, other devices
# noprobe
# Keep this, it won't hurt
zerombr yes

clearpart --all
part /boot --size 16
part / --size 1000
part swap --size 256
part /usr --size 1000 --grow
part /var --size 1000 --grow --maxsize 2000
part /home --size 8000 --grow
# Install or upgrade
install
# What kind of mouse?
mouse none
# Timezone
timezone --utc US/Arizona

# Xconfig
skipx yes
# The root password
rootpw changeme
# Authen type info
auth --useshadow --enablemd5
# Where to put lilo
lilo --location mbr
# Packages to install
%packages
@ Networked Workstation
@ NFS Server
@ Anonymous FTP Server
@ Web Server
@ Network Management Workstation
@ Development
@ Kernel Development
@ Utilities
%post
echo "Builder Kickstart - Cyber Trails - `/bin/date`" >
/etc/motd

Comment 1 Jay Turner 1999-10-29 14:01:59 UTC
Please submit the text of the python error that you are getting so
that we can better diagnose the problems you are seeing.

Comment 2 adam 1999-10-29 18:13:59 UTC
Doht!  I could've sworn I put the python error in there.. <blushes
sheepishly> Here it is..

Traceback (innermost last):
 File "/usr/bin/anaconda", line 30, in ?
   [ 'gui', 'text', 'test', 'debug', 'method=', 'rootpath='
 File "/usr/lib/python1.5/sit-packages/isys.py", line 135 in getopt
   return apply(_isys.getopt, args)
TypeError: bad argument --kickstart: missing argument

Comment 3 Jay Turner 1999-11-30 17:24:59 UTC
This issue has been assigned to a developer for further action.

Comment 4 adam 1999-11-30 17:53:59 UTC
FWIW, this may actually be due to the nature of your install disks; from
what I can tell, the boot disk's for the CD-Rom do not have any ethernet
drivers on them whatsoever. (Which makes sense.. if your installing from
CD, why would you want ethernet?)  Hence, DHCP wouldn't run anyway.

Why there is a python error, though; that I don't know.

Comment 5 Jay Turner 2000-02-22 13:47:59 UTC
You are right that this is happening because you are booting from the local boot
disk.

Comment 6 bentlema 2000-02-22 15:07:59 UTC
> if your installing from CD, why would you want ethernet?

This may not be a bug, but it's a change in behavior from 5.2 to 6.1.
We install both from cdrom and over NFS using DHCP to get the client network
configuration.

For example, this is how it used to work:

1) boot from cdrom with "linux ks" (its much faster than using floppy)
2) ethernet card is autoprobed
3) DHCP request is broadcast
4) responce received, which includes location of client kickstart file
5) installer reads client-specific kickstart config file over NFS
6) installer sees either "cdrom" or "nfs" token to determine install type
7) we choose "cdrom" install
8) the installed mounts the dist from cdrom (instead of over NFS)

Depending on the hardware, this is usually faster, and works nicely
when we have to install many machines at onces, i.e. we don't have
to kill the network.  And, each machine can still get it's client-specific
network configuration, and our kickstart post-install scripts can mount things
up and finish off the site-specific configuration.

It would be extremely useful to have this functionality back in 6.x, and I'm
more than willing to help debug this further.  I think the problem is with the
boot disk images, as Adam mentioned in previous comments.

I think the issue is this...(thought I'm not totally sure...will debug further.)
The "boot" images contains CD-ROM support, but the "bootnet" (which we need to
use to have ethernet support) doesn't have CD-ROM support.  So I guess what
would be needed is a boot disk with both CD-ROM support and ethernet support.
Also, I believe that the CD-ROM contains the "boot" image and not the "bootnet"
image.

I'm guessing space on the disk is an issue as well, but if we're talking about a
boot disk image on the CD-ROM, we can emulate a 2.88MB floppy, and include
support for more devices (i.e. CD-ROM, iso9660, ethernet for starters.)

I'm going to try to verify that the problem is indeed a lack of device support
in the boot images, and I'll let you know what I find...

Comment 7 bentlema 2000-02-23 02:32:59 UTC
Okay, I've started to do a little debugging.  What I said before about
the disk images not having support for both the CD-ROM and network
devices isn't correct.  It looks like both the "boot" disk and "bootnet"
disk see the CD-ROM and ethernet device, though both disks have problems.

I've been trying to get the "boot" image to work with a "linux ks" and it
fails.

In looking at the kernel messages, it does find the CD-ROM and ethernet
card, but it bombs.  I'm using the latest available "boot" image.  This is
the output I get when booting with "linux ks" ...

     Greetings.
     Red Hat install init version 6.0 starting
     mounting /proc filesystem... done
     mounting /dev/pts (unix89 pty) filesystem... done
     checking for NFS root filesystem...no
     trying to remount root filesystem read write... done
     checking for writable /tmp... yes
     running install...
     running /sbin/loader
     Traceback (innermost last):
       File "/usr/bin/anaconda", line 30, in ?
         [ 'gui', 'text', 'test', 'debug', 'method=', 'rootpath=',
       File "/usr/lib/python1.5/site-packages/isys.py", line 135, in getopt
         return apply(_isys.getopt, args)
     TypeError: bad argument --kickstart: missing argument

     install exited abnormally

     ...

Because of this bug, we've been using the "bootnet" disk instead of "boot".
It's when we use the bootnet disk that we are unable to do a kickstart
install off the CD-ROM.  The error we get is simply:

    "no install method specified for kickstart"

I'm guessing that the bootnet disk only knows about NFS, FTP, and HTTP
installs?

BTW, on the "boot" disk image, when SYSLINUX is loaded, you can press F4 to
see a little blurb about kickstart.  It reads:

     ...

     To enter the kickstart mode, type "linux ks <ENTER>".
     Kickstart mode works with both NFS and CD-ROM installations.

     The installation program looks in the following places for the config
     file:
        o   the broadcast server from bootp
        o   the bootp server if no other server name is broadcast
        o   on the boot floppy if "linux ks=floppy <ENTER>" is given.

     ...

By the way this is worded, it sounds to me that the install type (either
NFS or CD-ROM) is not dependant on the way the kickstart config file is
obtained.  i.e. we should be able to install off CD-ROM or NFS, no matter
where the kickstart config file is located weather it be floppy or BOOTP
server.

I'm going to continue to dig through the installer source and see if I can
help out with this further.

--Mark

==========================================================================
Mark A Bentley           -- Web Page: http://www.cs.umn.edu/~bentlema/
CSE/ITLabs Systems Staff -- Web Page: http://www.cs.umn.edu/systems-staff/
University of Minnesota  -- EE/CSci Building -- Minneapolis (East Bank)

Comment 8 bentlema 2000-02-23 14:49:59 UTC
Just another comment about the following:

    >
    > from what I can tell, the boot disk's for the CD-Rom do not have
    > any ethernet drivers on them whatsoever. (Which makes sense.. if
    > your installing from CD, why would you want ethernet?)  Hence,
    > DHCP wouldn't run anyway.
    >

Just because you boot from CD-ROM, doesn't mean you're going to do a CD-ROM
install.  As far as I know, the boot disk image on the stock CD-ROM is the same
as the 1.44MB "boot" image that comes in the images directory.   It's just a lot
faster booting from the CD-ROM, than the floppy drive.

We normally burn the "boot" image along with the distribution onto a CD-R and
use it to boot, regardless of the way we choose to install, weather it be a
normall CD-ROM install, or a kickstart/CD-ROM install, or a kickstart/NFS
install.  They should all work.

As far as the python error, it occurs while booting with the "boot" image on
floppy as well.

--Mark