Solved mixed IDE/SATA disks and boot troubles

Hello, I'm quite new to FreeBSD coming from a Linux background and I'm having issues with a rather old PC (Motherboard is an Asrock N61P-S with Athlon 64 x2 6000+ and 4 GB ram, onboard nvidia) on which I decided to install the latest FreeBSD making use of an old small IDE disk hanging around lazily, the only one I had ready, suboptimal but still good for my first tries I supposed. This assumptions was probably wrong. After performing a successful installation I found out that the system only could be started in safe mode, otherwise the boot entered a loop attempting to mount the root fs and never succeeded. My best guess is that safe mode (in the boot options menu) disables the SATA stuff altogether which could explain why the DVD drive is listed present but "not configured" and even mounting it results in "operation not supported by device".
dmesg outputs:
Code:
$ sudo dmesg |grep cd
cd0 at ata3 bus 0 scbus3 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GH22NS40 NL00> Removable CD-ROM SCSI device
cd0: Serial Number 55C69C7692E5
cd0: 150.000MB/s transfers (SATA 1.x, PIO4, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
g_vfs_done():cd0[READ(offset=32768, length=2048)]error = 6

Should I specify parameters at boot time in order to have the hard disk (only) treated as an IDE drive ? Or maybe there's something entirely different that's going wrong here in Your opinion ?
 
Last edited by a moderator:
Would you post your /etc/fstab, as well as error messages, shown by the kernel, when system does not boot (or a photo of your display)?
 
First off, the dvd drive now does work, after adjusting settings and permissions.

Yep, fstab is very simple, it only attempts to mount rw the root fs and swap. no file system mounted, no logging.
Code:
/dev/ada0p2    /        ufs    rw    1    1
/dev/ada0p3    none        swap    sw    0    0
the messages i copied from console (these repeat fast many times, disk noise becomes repetitive as well) :
Code:
(ada0:ata0:0:0:0): READ_DMA. ACB:c8 00 00 00 00 40 00 00 00 00 10 00
(ada0:ata0:0:0:0): (ada0:ata0:0:0:0): CAM status: ATA status error
(ada0:ata0:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 84 (ICRC ABRT)
(ada0:ata0:0:0:0): RES:51 84 00 00 00 00 00 00 00 00 00 
(ada0:ata0:0:0:0): retrying command
(ada0:ata0:0:0:0): error 5, Retries exhausted
mountroot: waiting for device /dev/ada0p2
mounting from ufs:/dev/ada0p2 failed with error 19
Loader variables:
Code:
  vfs.root.mountfrom=ufs:/dev/ada0p2
  vfs.root.mountfrom.options=rw
at this point after a few hints I'm dropped to this shell
mountroot>

so basically there is no filesystem mounting unless I drop to safe mode.
this disk was formatted with Reiser and then left to rot on a shelf, getting it to reformat gave me quite some trouble so it could be just old faulty hardware maybe.
 
cd0 at ata3 bus 0 scbus3 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GH22NS40 NL00> Removable CD-ROM SCSI device
cd0: Serial Number 55C69C7692E5
cd0: 150.000MB/s transfers (SATA 1.x, PIO4, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
This is completely normal, although it looks scary. It simply means that the "CD" device (it is in reality a DVD drive) exists, seems to be functioning, but has no disk in it. What happens is that the kernel driver talks to the the device, asks it about its type (CD reader), manufacturer and model number (see above), and then what its capacity is (how big the media is), to which the drive replies "error, I don't have any media in me". This error is completely to be expected for an empty drive.


(ada0:ata0:0:0:0): READ_DMA. ACB:c8 00 00 00 00 40 00 00 00 00 10 00
(ada0:ata0:0:0:0): (ada0:ata0:0:0:0): CAM status: ATA status error
(ada0:ata0:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 84 (ICRC ABRT)
(ada0:ata0:0:0:0): RES:51 84 00 00 00 00 00 00 00 00 00
This is a communication problem between the motherboard and the drive, not a disk error per se. "ICRC ABRT" means that the checksum of the data on the IDE interface was wrong. On modern SATA (the small cables), this is nearly always caused by bad cables (or not properly plugged in cables), or by power supply problems, and rarely by disk or motherboard firmware. But you are using IDE, meaning the old 40- or 80-conductor flat cables. Those were more complex, and here it might be caused by some configuration issues. I remember that in the bad old days of these cables, there were BIOS configuration parameters and OS-level switches (like "MSI"), which one could adjust to make these things work. This can also be caused by real disk problems, since in the bad old days of IDE, much error handling was flaky.

I would start with reseating all the connectors, and looking for physical damage to the flat cable (because it's really easy, and has a good chance of fixing the problem). The start swapping data cables and power supplies (same logic). Then start messing with BIOS options (aaaargh, much potential to break things), and read old forum posts with the words "DRDY SERV ERR" and "ICRC ABRT". If you have to start messing with FreeBSD driver configuration, then this is not going to be fun or fast.

EDIT: I had written "80-pin" flat cables, and as Sir Dice points out, that's wrong! It's 40-pin connectors at the end, and an 80-conductor flat cable.
 
Last edited:
I think you guys, er, pinned down the issue. Just Yesterday I was reading -for the first time in my life- about the existence of ide ribbon cables with 80 tracks. When putting together this freebsd machine from a heap of old or probably faulty hardware (the mobo itself was and still is suspicious but now it doesn't enter a deep coma each second day like it used to do during its last days running Wheezy) I also ransacked a bag of old IDE cables many of which were so old they were scavenged from 386DX Olivetti's, P-I, P-II Compaq deskpros and stuff like that. I tried several of them to no effect. Going to find a good 80 track cable if I have one.
 
The 40 "extra" conductors are all grounded, this reduces so-called "cross-talk" by separating each "data" signal with a grounded wire. This extra shielding is required for the higher bandwidths of the last IDE drives (UDMA 133 for example). Without this shielding you're going to get weird connection issues.
 
Back
Top