kickstart bootloader --driveorder configuration

6,185

Solution 1

Turns out that the nousbstorage would not work when placed in the ks.cfg file. While installing CentOS 5.5, I would receive a 'Unknown command' error. Turns out that nousbstorage needs to be added to the isolinux.cfg file:

default linux
prompt 1
timeout 0
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
  kernel vmlinuz
  append initrd=initrd.img text ks=cdrom:/ks.cfg nousbstorage
label text
  kernel vmlinuz
  append initrd=initrd.img text 
label ks
  kernel vmlinuz
  append ks initrd=initrd.img
label local
  localboot 1
label memtest86
  kernel memtest
  append -

Installation is working perfect now for this problem I encountered. Thanks to slm for pointing me in the right direction.

Solution 2

You can gently nudge the installation but telling the Kernel not to install drivers related to USB storage. This has the effect of stopping these devices from ever coming into the driveorder in the first place. From the GRUB menu:

linux nousbstorage ....

Kickstart Example

From a Kickstart .cfg file:

# Kickstart file automatically generated by anaconda.

install
cdrom
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$U.......
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc America/New_York
nousbstorage
bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
...

References

Share:
6,185

Related videos on Youtube

GoinOff
Author by

GoinOff

Sailing, Surfing, Skiing, Hiking, Disc Golf

Updated on September 18, 2022

Comments

  • GoinOff
    GoinOff over 1 year

    I use a kickstart file for a customized install CentOS. On certain machines, if a memory stick is in the USB port, it fails because it tries to install CentOS on the memory stick. Kickstart current config:

    # install the bootloader (GRUB)
    bootloader --location=mbr --driveorder=sda
    

    The failure occurs because the memory stick is /dev/sda and the hard drive is /dev/hda. How do I change the --driveorder to ignore any USB memory stick on the system??

    What is considered best practice for --driveorder for custom CentOS installations? Can always tell customers to remove USB sticks before installation...

    Without the USB stick in the USB port, it installs fine on /dev/hda.

  • GoinOff
    GoinOff over 10 years
    I keep getting a 'Unknown command' error when I try to use nousbstorage or nousb during my CentOS 5.5 installation.. Any ideas?? Trying to figure it out now..Seems like it should work. Documentation link appears to be for CentOS 5.