How to mount a SATA Optical drive

[MARK SOLVED]


Hi All,

I have a SATA HDD on the first SATA port which shows up as ad4

I have a SATA DVD-RW on the 2nd SATA port

How would I mount this device?

Thanks
 
Mmm, as I thought - every single mount device command I have tried doesn't work with 'no such file or directory'

Seem like theres no entry at all in dmesg for the drive and nothing in /dev either
 
Well, yes, mount commands aren't going to work unless the device is detected and there's an entry in /dev.

Does the DVD drive have a power connection?
Is the DVD drive detected by the BIOS?
Maybe it's connected to a RAID SATA connector that isn't supported by the current driver.
 
Yes, bios sees drive, works in that other os. Its on the SATA port right next to the one that connects to the HDD fbsd boots from [chipset not set as raid inbios].

I suspect theres no entry in /dev and

Code:
sh MAKEDEV ad
results in 'cant open MAKEDEV: no such file / dir'
 
MAKEDEV is obsolete since about FreeBSD 5.0. Now /dev is populated when the driver detects the hardware.

What brand and model of drive is this?
 
This is mystifying. There are a few reports on the web of a 7240S drive not being detected, but they sound unrelated. In case it helps, here's what my SATA DVD with the ahci driver shows in dmesg:

Code:
cd0 at ahcich7 bus 0 scbus7 target 0 lun 0
cd0: <ATAPI iHAS424   A ZL1B> Removable CD-ROM SCSI-0 device 
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed

The only thing I can think of is that like on my motherboard, there may be two SATA controllers, the Intel one, an off-brand extra (mine is JMicron). The "other" OS may have built-in drivers for the off-brand where FreeBSD does not. But also, those SATA sockets are a different color.
 
Mobo: M2N68-AM
4 Sata: 0=HDD, 1=Sony DVD-RW

[all same colour]

In dmesg theres no entry at all for cd0

:(
 
Which SATA controller chipset is on that mobo?

Are there any options in the BIOS for AHCI mode? If there is, set it, and load the ahci(4) driver. See if it gets detected then.

What's the output of # pciconf -vl? Does it list the Sony device in there? Is there a driver attached to it, or does it show up as noneX (where X is a number)?
 
In the BIOS in MAIN > IDE CONFIG > SATA MODE SELECT there are 3 choices SATA/RAID/AHCI

Unfortunately setting this AHCI crashes the boot sequence of 3bsd and BSOD's Win boot up too :(

I can however see that in 3bsd the drive is being recognised.

Edit: just thought - if I hardwire ahci into the kernel instead of loader.conf would that help?
 
Output of pciconf -vl

Code:
atapci1@pci0:0:9:0:     class=0x010185 card=0x83081043 chip=0x055010de rev=0xa2 hdr=0x00
vendor     = 'Nvidia Corp'
device     = 'MCP67 SATA Controller(IDE mode) (MCP67)'
class      = mass storage
subclass   = ATA
 
cpcnw said:
In the BIOS in MAIN > IDE CONFIG > SATA MODE SELECT there are 3 choices SATA/RAID/AHCI

Unfortunately setting this AHCI crashes the boot sequence of 3bsd

Please be more specific about what you mean by that. Crashes how, and at what point in startup?

I can however see that in 3bsd the drive is being recognised.

How? cd0 appears in kernel messages?

Edit: just thought - if I hardwire ahci into the kernel instead of loader.conf would that help?

Maybe; hard to say without knowing where it's crashing. I went through this a couple of days ago switching from ata to ada/ahci. What finally got things moving was a BIOS update.

Of course you also have to edit fstab to reflect the new devices.
 
> Please be more specific about what you mean by that. Crashes how, and at what point in startup?

I end up at an unfamiliar prompt. I would have to repeat the exercise and write down where I end up at.

> How? cd0 appears in kernel messages?

Yes

> Of course you also have to edit fstab to reflect the new devices.

Not sure what you mean. HDD is still on same device isn't it?
 
cpcnw said:
> Of course you also have to edit fstab to reflect the new devices.

Not sure what you mean. HDD is still on same device isn't it?

No, with ahci, SATA hard drives are ada devices. So instead of ad0, it's now ada0.
 
OK, starting to see the light. After changing to AHCI mode I get most of the way through a kernel load and can see that ahci.ko is being loaded. I end up at ;

Code:
Trying to mount root from ufs:/dev/ad4s3a
ROOT MOUNT ERROR

This is followed by some advice on how to ammend the loader prompt and to edit the fstab

Pressing ? I can list all the valid devices and tried this

Code:
mountroot> ufs:/dev/ada0s3a
This got me a bit further but obvs other devices are misnamed in fstab.

So, I reckon I'm now pretty close [can actually see cd0 listed in device list]

This is my current fstab ;

Code:
/dev/ad4s3b		none		swap	sw		0	0
/dev/ad4s3a		/		ufs	rw		1	1
/dev/ad4s3e		/tmp		ufs	rw		2	2
/dev/ad4s3f		/usr		ufs	rw		2	2
/dev/ad4s3d		/var		ufs	rw		2	2
/dev/acd0		/cdrom		cd9660	ro,noauto	0	0
/dev/acd1		/cdrom1		cd9660	ro,noauto	0	0
/dev/ad4s1		/mnt/dosc	ntfs	ro
/dev/ad4s5		/mnt/dosd	ntfs	ro

Do I jsut replace every 'ad4' with 'ada0' ?
 
cpcnw said:
mountroot> ufs:/dev/ada0s3a

This got me a bit further but obvs other devices are misnamed in fstab.

So, I reckon I'm now pretty close [can actually see cd0 listed in device list]

This is my current fstab ;

/dev/ad4s3b none swap sw 0 0
/dev/ad4s3a / ufs rw 1 1
/dev/ad4s3e /tmp ufs rw 2 2
/dev/ad4s3f /usr ufs rw 2 2
/dev/ad4s3d /var ufs rw 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
/dev/acd1 /cdrom1 cd9660 ro,noauto 0 0
/dev/ad4s1 /mnt/dosc ntfs ro
/dev/ad4s5 /mnt/dosd ntfs ro

Do I jsut replace every 'ad4' with 'ada0' ?

Yes. Or go the tunefs -L/glabel method, so the device name and number don't matter.
 
> Or go the tunefs -L/glabel method, so the device name and number don't matter.

Sounds like best option [still need to sort xp ahci driver]

Can you give me some pointers on tunefs -L/glabel?
 
That url is broken. On xp ahci, I have info says otherwise... @worse I need a re-prep in any case.
 
Renamed device in fstab and rebooted after changing BIOS setting to AHCI. All now working perfectly!

In XP did a 'Windows Repair' using a USB FDD and the SATA Chipset driver [press F6 at start]
 
Warren, spoke too soon.... Ive noticed that some things I hadn't tested aren't working for example ;

cdcontrol -f /dev/cd0 play

No complaints or errors messages, just no audio or even disc spinning?

Worked perfectly before under SATA mode and acd0 ???

Edit :-

In console get the following ;

Code:
cdcontrol -f /dev/cdrom play
(cd0:ahcich1:0:0:0): MODE SENSE(10). CDB: 5a 0 e 0 0 0 0 0 20 0 
(cd0:ahcich1:0:0:0): CAM Status: SCSI Status Error
(cd0:ahcich1:0:0:0): SCSI Status: Check Condition
(cd0:ahcich1:0:0:0): ILLEGAL REQUEST asc:24,0
(cd0:ahcich1:0:0:0): Invalid field in CDB: Command byte 2 is invalid
(cd0:ahcich1:0:0:0): Unretryable error
 
cpcnw said:
Warren, spoke too soon.... Ive noticed that some things I hadn't tested aren't working for example ;

cdcontrol -f /dev/cd0 play

No complaints or errors messages, just no audio or even disc spinning?

Me too. That's the first time I've tried playing an audio CD with ahci. There are a few threads that make it look like it's a known problem, although apparently not fixed yet.

Using cdda2wav from sysutils/cdrtools as the example from the man page works:
# cdda2wav -q -e -t2 -d0 -N

Code:
cdcontrol -f /dev/cdrom play
(cd0:ahcich1:0:0:0): MODE SENSE(10). CDB: 5a 0 e 0 0 0 0 0 20 0 
(cd0:ahcich1:0:0:0): CAM Status: SCSI Status Error
(cd0:ahcich1:0:0:0): SCSI Status: Check Condition
(cd0:ahcich1:0:0:0): ILLEGAL REQUEST asc:24,0
(cd0:ahcich1:0:0:0): Invalid field in CDB: Command byte 2 is invalid
(cd0:ahcich1:0:0:0): Unretryable error

Can probably be ignored.
 
Back
Top