Could not find /dev/disk/by-id/ata_WDC.... at boot.

Hello:
I am doing some work for a company that would like to deploy some PC/104 industrial control systems world-wide running openSuse 11.1.

I have had a problem of not being able to make a openSuSE 11.1 disk on one computer and run it on another. When booting, it hangs for a while then switches to black and white console and reports “Could not find /dev/disk/by-id/ata_WDC…”.

This looks like some sort of locking of the installation to hardware. Should a machine in Russia or Japan or Alabama need a new motherboard or have a disk failure, it looks as though the disk would have to be made or “repaired” on the target hardware.

Being new to openSuse, I hope someone can point me in the right direction to make disks at the office, ship them to the site and have them run. They would also need to be able to ship out a new motherboard and have the old disk start up and run.

wevl

wevl wrote:

> I have had a problem of not being able to make a openSuSE 11.1 disk on
> one computer and run it on another. When booting, it hangs for a while
> then switches to black and white console and reports “Could not find
> /dev/disk/by-id/ata_WDC…”.

There should be no problem to achieve what you want.

Just be sure that target machine is using the same hard disk openSUSE was
installed into. Also, check for any change or difference between BIOS
settings on both computers.

Anyway, do not discard a hardware failure: a faulty board can have problems
to detect ide devices. Also, a bad ribbon cable or bad connection can
difficult hard disk detection. And don’t forget jumpers (if applicable) :slight_smile:

Even hard disk itself maybe resulted in damage in transit.

Try to connect the hard disk into another computer to see what happens.

Greetings,


Camaleón

Camaleon wrote:
“Just be sure that target machine is using the same hard disk openSUSE was installed into”.

That is what I am trying to do - plug the hard disk into a different motherboard and have it boot.

I have tried the disk on various machines - machines that work fine, Slackware will move from any machine to any other machine, but not the case with notSoOpenSuse?

wevl

wevl wrote:

> That is what I am trying to do - plug the hard disk into a different
> motherboard and have it boot.

Different board but same brand and model that the one you previously
installed openSUSE, right?

> I have tried the disk on various machines - machines that work fine,
> Slackware will move from any machine to any other machine, but not the
> case with notSoOpenSuse?

I know there is no problem with openSUSE to do this: I did it a weeks ago
and had no problem at all :slight_smile:

Just had to adjust BIOS settings because original suse installation was done
in a machine with SATA mode (kernel used “libata” module) and new machine
was using AHCI mode (kernel had not “ahci” modules) so hard disk could not
be found and stopped at booting.

The easy tweak was choosing the same BIOS setup in the target machine.

The main question I see here is “why your hard disk is not being detected in
the new system”? Maybe someone can give you any hint :-?

Gretings,


Camaleón

Camaleon wrote:
Different board but same brand and model that the one you previously installed openSUSE, right?

Wrong.
wevl

If you know that there will only be one hard disk on the target machines, then you can substitute pathnames like /dev/sda1, /dev/sda2, etc. Even if you have more than one hard disk and if you can be sure of the detection order you can use sda1, sdb1, etc. The by-id path makes sure that the allocation is not dependent on detection order.

wevl wrote:

> Camaleon wrote:
> Different board but same brand and model that the one you previously
> installed openSUSE, right?
>
> Wrong.

So, kindly explain :-). Is there any hardware change? What components?

As I said before, BIOS settings have to be set in a similar fashion (at
least be sure that IDE ports are enabled in target machine).

There is no openSUSE limitation for doing this. No matter if you change the
hard disk or the whole motherboard: it will be automagically adjusted and
detect the new components.

Of course, if you change your hardware, some things may fail at first boot
(i.e. video card) but you can always adjust it with little effort.

Greetings,


Camaleón

Thanks for your post.

ken_yap wrote:
“If you know that there will only be one hard disk on the target machines, then you can substitute pathnames like /dev/sda1, /dev/sda2, etc. Even if you have more than one hard disk and if you can be sure of the detection order you can use sda1, sdb1, etc. The by-id path makes sure that the allocation is not dependent on detection order.”

Have not had any luck at that. It appears as though the block devices such as /dev/sda1 are deleted and then reconstructed some time during the boot process as after each reboot, block devices /dev/sda* have new times.

Editing the GRUB boot line and substituting /dev/sda* for /dev/disk/by-id/ata_WDC…-part*, etc. has been tried by a couple of us without success. After completing editing and attempting to boot, the error message is: “Could not find /dev/sda*…”

Taking a shot in the dark and making my own nodes /dev/hda* with the same major and minor as /dev/sda* does not persist through booting.

I don’t have the big picture on using this by-id stuff to “find” the disk as I assume the data to find the disk is stored on the disk. If you have found the data, have you not also found the disk?

I am saddened to see Linux loosing flexibility. It may be becoming like Windows in that you have to do a “Repair” with a installation disk to run an installation on another computer.

As an aside, I was wondering if I was expecting too much, so I made a Ubuntu installation and it has booted on the 2 other computers that I have tried thus far. I have been using Slackware for years and it has never failed to boot and run and anything.

wevl

Thanks for you post.
Camaleon wrote:
“There is no openSUSE limitation for doing this. No matter if you change the hard disk or the whole motherboard: it will be automagically adjusted and detect the new components.”

That is what I expected, but it hasn’t worked out that way.

wevl

wevl wrote:

> I don’t have the big picture on using this by-id stuff to “find” the
> disk as I assume the data to find the disk is stored on the disk. If you
> have found the data, have you not also found the disk?

Yes and no.

Your hard disk is found but openSUSE cannot boot.

I pointed before that this can happen if you are missing any kernel module
required for hard disk to be properly recognized in the new system.

And I only can think in any BIOS setting as the cause of this mess.

Order of devices (IDE first, SATA then or viceversa) can be also the root of
the problem here. Take a look into both BIOS settings and search for any
difference between them.

> As an aside, I was wondering if I was expecting too much, so I made a
> Ubuntu installation and it has booted on the 2 other computers that I
> have tried thus far. I have been using Slackware for years and it has
> never failed to boot and run and anything.

Maybe is time for you to fill a bugzilla. These things are well tracked down
there :slight_smile:

Greetings,


Camaleón

If that’s the case, then you do not have the required disk controller module in the initrd. openSUSE builds a minimal initrd that contains just the modules you need for that machine. If you need to have this image work on different machines then you have to build an initrd that loads all the different modules you will need. The variable to edit is INITRD_MODULES in /etc/sysconfig/kernel. Then run mkinitrd afterwards.

Just a drive by since I flop HD’s while cloning fairly frequently. The /dev/disk/by-id is the Model of the HD followed by the Serial number thus for my Sata Seagate the
dev/disk/by-id/scsi-SATA_ST3500320AS_6QM0MFCK (I also have a few others)
My ide drive is a Maxtor
its dev/disk/by-id/scsi-SATA_Maxtor_6K040L0_K10DP5ZG

In order to boot after cloning both the /boot/grub/menu.lst needs to be changed and the /etc/fstab has to also match for dev/disk and the correct partitions. I accomplish this by having Parted Magic live disk that I mount the root partition and use the editor to alter the files. If you know ahead of time you can create the correct fstab and menu.lst and simply use the appropriate files (must also have a active root partition). Also when swapping a ide and SATA, if you have other drives, the boot order can be wrong in BIOS due to preferences given to ide drives. you can also Install tree from YaST>Software Management to get /dev/disk/by id as example:
tree /dev/disk

Changing MB’s is a whole nother subject. (drives off)

Editing menu.lst for GRUB and editing /etc/fstab (either by hand or with Yast) should work. If it does not (device /dev/sda… could not be found), device naming (sdaxx) was not right.

To do this properly, launch Yast-System-Paritioner and edit all mounted partitions, in details specify mount by device name. Then go to Yast-System-Boot, open it and close, that should save the new menu.lst.

Reason for the initial problem and how to fix it are described in Novell TID 3048119 (NOVELL: Support and search Knowledgebase for this TID).

Better yet, while installing OS, use “expert” option during partitioning and set “mount by device name” there, it will avoid including disk serial numbers in the persistent-device-naming scheme.