[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Legacy IDE to be removed

On Mon, 22 Mar 2021, Stan Johnson wrote:

> My issue with the retirement of legacy IDE isn't technical. Two of the 
> systems that I use are a PowerBook Wallstreet and a PowerBook 3400c. 
> Both of these laptops have internal IDE drives, an external SCSI port, 
> and require BootX to boot into Linux. BootX wants explicit specification 
> of the root device (e.g. /dev/sda4, /dev/hda4, etc.). With libata, the 
> disk drive names change depending on what is connected to the SCSI port. 
> I'm aware that I can use "UUID=" or "LABEL=" in /etc/fstab, but that 
> naming convention doesn't work with BootX. So using BootX will become 
> more complicated depending on connected SCSI devices, if any.

The /dev/hda, hdb etc. names are transient and don't refer to any 
particular drive. That is, they have the same problem that /dev/sda, sdb 
etc. have.

That is, if you plug or unplug ATA devices from the powerbook expansion 
bay, you can alter the internal ATA (boot) device naming.

Changing the kernel .config can also affect internal ATA device naming:

        bool "Probe on-board ATA/100 (Kauai) first"
        depends on BLK_DEV_IDE_PMAC
          This option will cause the ATA/100 controller found in UniNorth2
          based machines (Windtunnel PowerMac, Aluminium PowerBooks, ...)
          to be probed before the ATA/66 and ATA/33 controllers. Without
          these, those machine used to have the hard disk on hdc and the
          CD-ROM on hda. This option changes this to more natural hda for
          hard disk and hdc for CD-ROM.

Also, the legacy ide subsystem names devices according to the sequence in 
which drivers are loaded, which is fragile.

Anyway, I admit that adopting libata makes a very old problem slightly 

> Even in Linux, it can be convenient (at least for me) to have /dev/hda 
> and /dev/hdb internal disks and, if connected, /dev/sdX external 
> disk(s).

We did find a solution for this. You can ensure that /dev/sda always 
refers to an internal ATA drive by inhibiting the SCSI bus scan until 
after the internal ATA devices are probed.

To do that, you have to set the "scsi_mod.scan=manual" kernel parameter. 
Then, after the internal devices have been probed, you can scan the SCSI 
bus manually after logging in, or automatically with the /etc/rc.local 
script (or equivalent):

# echo "- - -" > /sys/class/scsi_host/hostX/scan

The main drawback of this is that SCSI partitions listed in /etc/fstab (if 
any) won't get mounted early by the init scripts. They would get mounted 
by udisks (or similar) after the explicit bus scan runs. (But you could 
improve on that if you needed to.)

Reply to: