Bug 596445

Summary: Anaconda kickstart install ignores nousbstorage option
Product: Red Hat Enterprise Linux 6 Reporter: Mark Ostroski <mostroski>
Component: module-init-toolsAssignee: Jon Masters <jcm>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: kernel
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-30 16:43:08 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 Mark Ostroski 2010-05-26 18:39:01 UTC
Description of problem:
When attempting a kickstart installation using USB install media, I normally use the nousbstorage option to prevent anaconda from considering the USB boot media as a possible installation destination. On my test machine when attempting an RHEL6 kickstart install, the USB media is detected as device sda while my SATA drive is detected as sdb.  

I've created my USB install media using syslinux 3.73 and the vmlinuz and initrd.img files provided in the /isolinux/ directory on the RHEL6 installation DVD.  The problem appears to be that the initrd.img provided loads the usb_storage module by default.  

The problem is that when usb_storage is loaded and the clearpart command is used in the kickstart configuration file, the USB install media will be blown away... unless the ignoredisk option is provided which also does not seem to work as expected (separate issue).

Everything I've done follows the same process as what I've done previously for RHEL4 and RHEL5 releases, where the nousbstorage option works as expected.

A workaround is to add a %pre script to the kickstart configuration containing the command: rmmod usb_storage.  This should not be required.



Version-Release number of selected component (if applicable):
As provided with RHEL6 beta installation media.


How reproducible:
Always

Steps to Reproduce:
1.  Create USB boot media using syslinux and /isolinux/vmlinuz & /isolinux/initrd.img files.
2.  Create a kickstart configuration file
3.  boot to the USB media using ks=... nousbstorage
  
Actual results:
The USB install media is detected as a storage device and used by anaconda during the install process

Expected results:
The USB install media should be ignored.


Additional info:

Comment 2 Chris Lumens 2010-05-26 20:41:12 UTC
Is there a /etc/modprobe.d/anaconda.conf and if so, what does it look like?

Comment 3 Mark Ostroski 2010-05-27 11:58:25 UTC
/etc/modprobe.d/anaconda.conf contains two lines:

-----------------------
# Module options and blacklists written by anaconda
blacklist usb-storage
-----------------------

Yet /tmp/syslog output shows:

<6>Initializing USB Mass Storage driver...
<6>scsi0 : SCSI emulation for USB Mass Storage devices
<7>usb-storage: device found at 3
<7>usb-storage: waiting for device to settle before scanning
<6>usbcore: registered new interface driver usb-storage
<6>USB Mass Storage support registered.

Comment 4 RHEL Program Management 2010-05-27 16:15:45 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 5 Phil Oester 2010-06-16 18:38:06 UTC
The bug is in loader.c:

        else if (!strcasecmp(argv[i], "nousbstorage"))
            mlAddBlacklist("usb-storage");

The actual USB storage module is usb_storage, not usb-storage.  Note underscore, not dash.

Comment 6 Phil Oester 2010-06-22 17:55:49 UTC
My comment #5 is bogus - usb-storage is the name in the filesystem which apparently is what matters.  But either way, nousbstorage is not working.

Comment 7 Jon Masters 2010-06-30 16:43:08 UTC

*** This bug has been marked as a duplicate of bug 588772 ***

Comment 8 Phil Oester 2010-06-30 23:23:13 UTC
Too bad bug 588772 appears to be private.