Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automounting FireWire devices? [Fix included, not solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
skoorbevad
n00b
n00b


Joined: 13 Jan 2003
Posts: 27
Location: Atlanta, GA

PostPosted: Sat Nov 19, 2005 8:55 pm    Post subject: Automounting FireWire devices? [Fix included, not solved] Reply with quote

I just got through shoehorning Gentoo 2005.1 onto my Mac Mini, after a number of kernel compiles I got it booting without any problem -- except one. I've got two external FireWire/IEEE1394 hard disks. I can plug them in after the system has booted, load all the modules, and they show up and I can mount them just fine. However, it's another story during the boot process. First, I'll show you what modules I'm loading on boot:

This kernel is 2.6.14-gentoo-r6, for the record. Yes, it works, and yes, I can post a .config if you'd like.

/etc/modules.autoload.d/kernel-2.6:
Code:

# Sun GEM Ethernet
sungem
sungem_phy

# SCSI subsystem (needed to mount FireWire/USB drives)
sg
sd_mod

# Firewire storage
ieee1394
ohci1394
sbp2

# USB Keyboard support
usbhid
ohci_hcd


As you can see, everything is being loaded for FireWire support. In fact, after the machine boots, 'dmesg' even reports:

Code:

ieee1394: Node added: ID:BUS[0-00:1023]  GUID[0030e0f4e0208b52]
ieee1394: Host added: ID:BUS[0-01:1023]  GUID[000d93fffe42ad5e]
scsi0 : SCSI emulation for IEEE-1394 SBP-2 Devices
ieee1394: sbp2: Logged into SBP-2 device
ieee1394: Node 0-00:1023: Max speed [S400] - Max payload [2048]
  Vendor: ST320082  Model: 2A                Rev: 3.01
  Type:   Direct-Access-RBC                  ANSI SCSI revision: 04
SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)
sda: asking for cache data failed
sda: assuming drive cache: write through
SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)
sda: asking for cache data failed
sda: assuming drive cache: write through
 sda: sda1
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0


Plain as day, it sees the device as /dev/sda and the only partition on the disk, /dev/sda1. I can even mount it up with no problem.

However, the box simply refuses to automount the drive from /etc/fstab, and I'm at a loss as to why:

/etc/fstab:
Code:

/dev/hda4               /               ext3            noatime         0 1
/dev/hda3               none            swap            sw              0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0
/dev/sda1               /mnt/raid       ext3            defaults,noatime         0 0
#/dev/fd0               /mnt/floppy     auto            noauto          0 0

# NOTE: The next line is critical for boot!
proc                    /proc           proc            defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0


What gives, here? My only current workaround is to make an init script that will attempt to mount the disk later in the boot process, but that's a band-aid and cheap. Has anybody gotten firewire devices to successfully automount on boot? Seeing how these drives I have are eventually going to be mirrored and used in a RAID-1 configuration, it's somewhat important that they be mounted automatically.

Thanks for any help!


Last edited by skoorbevad on Sat Nov 19, 2005 10:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
skoorbevad
n00b
n00b


Joined: 13 Jan 2003
Posts: 27
Location: Atlanta, GA

PostPosted: Sat Nov 19, 2005 10:14 pm    Post subject: Reply with quote

I whipped this init script together to attempt to mount the FireWire drives at a later point that the /etc/init.d/localmount script (though, that script apprently only attempts to automount USB devices? hmm...)

Anyways, if you're having trouble, pop this into /etc/init.d and 'rc-update add mount_fw default'. It will run after most everything else in /etc/init.d, and certainly late enough so that the SCSI devices appear to be created an recognized. If you have more than one FireWire device, you'll probably have to make $FIREWIRE_DEVICES an array and pop in a quick for loop. Edit the FIREWIRE_DEVICE and MOUNT_POINT variables to suit you particular configuration; your mileage may vary.

/etc/init.d/mount_fw:
Code:

#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $


# This is a total hack, and only necessary because you can't automount
# FireWire devices normally, it seems. :\

FIREWIRE_DEVICE="/dev/sda1"
MOUNT_POINT="/mnt/raid"

depend() {

        need checkfs

}

start() {

        ebegin "Mounting FireWire drives"
        mount ${FIREWIRE_DEVICE} ${MOUNT_POINT}
        eend $?

}

stop() {

        ebegin "Umounting FireWire devices"
        umount ${FIREWIRE_DEVICE}
        eend $?

}

restart() {

        stop
        start


}


...still, I shouldn't have to make this bandaid to mount a FireWire device. I'm not marking this as solved, bcause frankly it's not!

Edit: I'll probably look at /etc/init.d/localmount to see if the fact that it only attempts to load the USB subsystem has anything to do with it -- if so, I'll submit the changed file to CVS, maybe it will fix this problem once and for all.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum