Re: Force a usb drive to be /dev/sda?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stefan Richter
Date: Thursday, June 12, 2008 - 4:11 am

Tomasz Chmielewski wrote:

Indeed.  Shawn, I see these options:

 1. Mount filesystems by UUID or by label.
    Doesn't work with some filesystems.

 2. Refer to devices by device ID or by device path.
    Requires a minimal udev environment which gives you
    /dev/disk/by-id or /dev/disk/by-path, or something
    similar to udev.  People had things like this already
    working under Linux 2.4, using programs like devlabel
    IIRC.  Requires you to set up an initrd with respective
    scripts in it.
    By-path only works if you never alter the USB topology
    and PCI topology.  I.e. prefer by-id.

 3. Influence the order of disk probing so that your USB
    disk is the first one.  Works only if there is at most
    one disk on the USB bus and requires you to wait with
    insertion or probing of the SATA controller driver (PCI
    driver) until after the USB disk was probed by sd_mod.

    There may or may not be very simple ways to do this.
    Simplest would be to configure the SATA controller driver
    as module and load that module in an rc script after the
    root filesystem was mounted.  That would actually be much
    simpler than option 2, so maybe you want to try this
    before 2.

 4. Last resort:  Hack sd_mod to defer any probes until after
    the first probe of an USB attached disk.  Requires some
    experience in kernel driver programming.
-- 
Stefan Richter
-=====-==--- -==- -==--
http://arcgraph.de/sr/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Force a usb drive to be /dev/sda?, Tomasz Chmielewski, (Thu Jun 12, 1:35 am)
Re: Force a usb drive to be /dev/sda?, Stefan Richter, (Thu Jun 12, 4:11 am)
Re: Force a usb drive to be /dev/sda?, Shawn Jin, (Thu Jun 12, 10:32 pm)
Re: Force a usb drive to be /dev/sda?, Stefan Richter, (Thu Jun 12, 11:35 pm)
Re: Force a usb drive to be /dev/sda?, Shawn Jin, (Fri Jun 13, 1:29 pm)
Re: Force a usb drive to be /dev/sda?, Stefan Richter, (Fri Jun 13, 2:54 pm)