3

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.

2 Answers 2

3

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

1
  • 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.
    – GoinOff
    Oct 1, 2013 at 15:22
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .