# ieee1394 external hardrive

## jere890

I have a maxtor 80gig hard drive and have been using instructions to get it working from http://www.sb.fsu.edu/~xray/Manuals/FireWire_Linux.html i have the exact drive as they talk about. 

problem is i cant get a filesystem on it. it wont read it as a block device

fdisk -l gives me this:

```
Disk /dev/hda: 40.0 GB, 40007761920 bytes

255 heads, 63 sectors/track, 4864 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot    Start       End    Blocks   Id  System

/dev/hda1   *         1         5     40131   83  Linux

/dev/hda2             6        68    506047+  82  Linux swap

/dev/hda3            69      4081  32234422+  83  Linux

/dev/hda4          4082      4864   6289447+   7  HPFS/NTFS

 

Disk /dev/sda: 81.9 GB, 81963515904 bytes

255 heads, 63 sectors/track, 9964 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot    Start       End    Blocks   Id  System

/dev/sda1             1      9964  80035798+  83  Linux

```

so i know the drive is there. but when i try to put either ext3 or reiserfs or anything on it i get this

```
mkreiserfs /dev/sda1                                            ~

                                                                                

<-------------mkreiserfs, 2003------------->

reiserfsprogs 3.6.8

 

 

is_mounted: /dev/sda1 is neither regular file nor block device

zsh: abort      mkreiserfs /dev/sda1

```

```
mkfs.ext3 /dev/sda1                                             ~

mke2fs 1.34 (25-Jul-2003)

/dev/sda1 is not a block special device.

Proceed anyway? (y,n) y

mkfs.ext3: Device size reported to be zero.  Invalid partition specified, or

        partition table wasn't reread after running fdisk, due to

        a modified partition being busy and in use.  You may need to reboot

        to re-read your partition table.

```

Why is it not reading my drive as a block device! ahhhhh  im going insane. help please

thanks

----------

## ckdake

I had a drive where I had to make the filesystem on /dev/hde for some reason one time instead of /dev/hde1.  hde1 was there but the system said it was zero-length and there were no other partitions.  Have you tried just making a filesystem on /dev/sda?

----------

## jere890

id that but then it wouldn't mount. 

ive returned the drive though. im just gonna go with usb instead. i know my usb stuff works great.

thanks for your help though.

----------

## ckdake

That return was pretty quick  :Razz:   If you feel like trying firewire again later just post back here. I spent way too much time trying to get my stuff working and can probably help you out.  Party on with that USB tho.

----------

## Jon Beilin

fwiw, i find that it's easier and cheaper to just get a regular harddrive and put it in an enclosure yourself. Oxford chips have given me no trouble.

----------

## jere890

 *ckdake wrote:*   

> That return was pretty quick   If you feel like trying firewire again later just post back here. I spent way too much time trying to get my stuff working and can probably help you out.  Party on with that USB tho.

 

well i spent 3 days on it to no avail so i was able to convince the guys at the store i hadnt used it....even though the windows fs was no longer on it  :Razz: 

ah well, thanks for your help

----------

## palminator

Hi,

I'm trying to get a hardrive working as external firewire too.

I'm using the 2.4.22-rc2 kernel.

I compiled the modules ohci1394 and sbp2 into the kernel.

I can use firewire cdroms/dvds, even burn cds and dvds, but I'm not able to get a hd working.

I used the rescan-scsi-bus Skript from Kurt Garloff to find the devices. And all firewire devices have been found, but the harddrives does not work. I get /dev/sdc and /dev/sdd for the firewire hd's, but the partitions are missing.

Some information that could be of interest

cat /proc/scsi/sbp2_0/2

Host scsi2 : SBP-2 IEEE-1394 (ohci1394)

Module options :

max_speed : S800

max_sectors : 255

serialize_io : no

exclusive_login : yes

Attached devices :

[Channel: 00, Id: 00, Lun: 00] Direct-Access GENESYS Virtual Device

[Channel: 00, Id: 01, Lun: 00] Direct-Access GENESYS Virtual Device

[Channel: 00, Id: 02, Lun: 00] CD-ROM CREATIVE DVD5240E-1

[Channel: 00, Id: 03, Lun: 00] CD-ROM _NEC DVD_RW ND-1300A

scanning with the skript of Kurt gives the following result:

Scanning for device 2 0 0 0 ...

OLD: Host: scsi2 Channel: 00 Id: 00 Lun: 00

Vendor: GENESYS Model: Virtual Device Rev: 0.01

Type: Direct-Access ANSI SCSI revision: 02

Scanning for device 2 0 1 0 ...

OLD: Host: scsi2 Channel: 00 Id: 01 Lun: 00

Vendor: GENESYS Model: Virtual Device Rev: 0.01

Type: Direct-Access ANSI SCSI revision: 02

Scanning for device 2 0 2 0 ...

OLD: Host: scsi2 Channel: 00 Id: 02 Lun: 00

Vendor: CREATIVE Model: DVD5240E-1 Rev: 1.30

Type: CD-ROM ANSI SCSI revision: 02

Scanning for device 2 0 3 0 ...

OLD: Host: scsi2 Channel: 00 Id: 03 Lun: 00

Vendor: _NEC Model: DVD_RW ND-1300A Rev: 1.08

Type: CD-ROM ANSI SCSI revision: 02

Because the case is a combo-box and alows to run it as usb too, I tried it as usb too. Usb works stable, but to slow -   :Wink:  probably because the usb controler is very old.  

Would be nice if someone could help me out.

----------

## ckdake

When you plug in the drive what shows up in your dmesg?

----------

## palminator

dmesg > boot.messages

returns this file

http://palminator.i-networx.de/boot.messages

----------

## ckdake

For one thing, you have  *Quote:*   

> eth1394: eth1: IEEE-1394 IPv4 over 1394 Ethernet (ohci1394)

 

If you aren't using this I would disable it.  I seem to remember it giving me some problems, but if I remember correctly my computer wouldn't even boot last time I tried a kernel with that on.

Also, can you boot up your computer with the harddrive unplugged and then plug it in?  It's a little hard to figure out whats going on.

Do you have two cd-roms or is your computer just "seeing" everything twice?

Do you have SCSI emulation support turned on in your kernel where all of the normal hard disk controller options are?

----------

## palminator

I have two SCSI-HD's and two SCSI-CDROM's on an adaptec controller.

Then I have also 2 HD's extern firewire and one DVD-ROM extern firewire and one DVD+-RW extern firewire. And only the 2 HD's extern firewire are making trubble.

I'm going to make a new boot.messages in half hour after eating.

Done.

Firewire pluggid in while booting:

http://palminator.i-networx.de/boot.messages

Firewire not plugged in while booting:

http://palminator.i-networx.de/boot2.messages

----------

## ckdake

Theres still lots of stuff going on.  To narrow things down, try booting up with no firewire devices attached.  check your dmesg,  then plug in one of the firewire harddrives and check your dmesg after that.

----------

## palminator

Firewire pluggid in while booting:

http://palminator.i-networx.de/boot.messages

Firewire not plugged in while booting:

http://palminator.i-networx.de/boot2.messages

Just one hd plugged in firewire while booting:

http://palminator.i-networx.de/boot3.messages

----------

## ckdake

Sorry, I'm not being too clear.

1. unplug all firewire things

2. boot up the computer

3. check what the last part of dmesg is

4. plug in one firewire hard drive

5. check dmesg again and post back here what lines show up that were a result of plugging in the one harddrive while the computer was already booted up.

Your other dmesg outputs are helpful somewhat, but it is hard to tell what is just the ieee1394 hardware initializing and what is the actual hard drive trying to show up.  

Also, any word on turning off ieee1394 networking if you aren't using it?

----------

## palminator

Here you go

http://palminator.i-networx.de/boot4.messages

http://palminator.i-networx.de/boot5.messages

and the difference is:

```
scsi singledevice 0 0 0 0

scsi singledevice 0 0 3 0

scsi singledevice 0 0 4 0

scsi singledevice 0 0 5 0

scsi singledevice 0 0 7 0

scsi singledevice 1 0 0 0

scsi singledevice 1 0 1 0

scsi singledevice 1 0 2 0

scsi singledevice 1 0 3 0

scsi singledevice 1 0 4 0

scsi singledevice 1 0 5 0

scsi singledevice 1 0 6 0

scsi singledevice 1 0 7 0

ieee1394: ConfigROM quadlet transaction error for node 0-01:1023

ieee1394: The root node is not cycle master capable; selecting a new root node and resetting...

ieee1394: ConfigROM quadlet transaction error for node 0-00:1023

ieee1394: ConfigROM quadlet transaction error for node 0-01:1023

ieee1394: The root node is not cycle master capable; selecting a new root node and resetting...

scsi2 : SCSI emulation for IEEE-1394 SBP-2 Devices

ieee1394: sbp2: Logged into SBP-2 device

ieee1394: sbp2: Node 0-00:1023: Max speed [S400] - Max payload [2048]

ieee1394: Node added: ID:BUS[0-00:1023]  GUID[0001a3000005f4d3]

ieee1394: Node changed: 0-00:1023 -> 0-01:1023

```

I also tried to run the skript rescan-scsi-bus.sh

http://palminator.i-networx.de/rescan-scsi-bus.sh

and thats what happend then

```

scsi singledevice 0 0 0 0

scsi singledevice 0 0 3 0

scsi singledevice 0 0 4 0

scsi singledevice 0 0 5 0

scsi singledevice 0 0 7 0

scsi singledevice 1 0 0 0

scsi singledevice 1 0 1 0

scsi singledevice 1 0 2 0

scsi singledevice 1 0 3 0

scsi singledevice 1 0 4 0

scsi singledevice 1 0 5 0

scsi singledevice 1 0 6 0

scsi singledevice 1 0 7 0

scsi singledevice 2 0 0 0

  Vendor: GENESYS   Model: Virtual Device    Rev: 0.01

  Type:   Direct-Access                      ANSI SCSI revision: 02

Attached scsi disk sdc at scsi2, channel 0, id 0, lun 0

SCSI device sdc: 1 512-byte hdwr sectors (0 MB)

 /dev/scsi/host2/bus0/target0/lun0:scsi2: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 00 00 00 00 00 01 00 

Current sd08:20: sns = 70  3

ASC=3a ASCQ= 0

Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00 

 I/O error: dev 08:20, sector 0

scsi2: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 00 00 00 00 00 01 00 

Current sd08:20: sns = 70  3

ASC=3a ASCQ= 0

Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00 

 I/O error: dev 08:20, sector 0

scsi2: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00 00 00 00 00 00 00 01 00 

Current sd08:20: sns = 70  3

ASC=3a ASCQ= 0

Raw sense data:0x70 0x00 0x03 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00 

 I/O error: dev 08:20, sector 0

 I/O error: dev 08:20, sector 0

 I/O error: dev 08:20, sector 0

ldm_validate_partition_table(): Disk read failed.

 I/O error: dev 08:20, sector 0

 unable to read partition table

scsi singledevice 2 0 1 0

scsi singledevice 2 0 2 0

scsi singledevice 2 0 3 0

scsi singledevice 2 0 4 0

scsi singledevice 2 0 5 0

scsi singledevice 2 0 6 0

scsi singledevice 2 0 7 0

```

----------

## ckdake

hmm.

where you have 

```
Attached scsi disk sdc at scsi2, channel 0, id 0, lun 0

SCSI device sdc: 1 512-byte hdwr sectors (0 MB)

 /dev/scsi/host2/bus0/target0/lun0:scsi2: ERROR on channel 0, id 0, lun 0, CDB: 0x28 00
```

 it should look like this (with the numbers different of course) 

```
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0

SCSI device sda: 39062520 512-byte hdwr sectors (20000 MB)

sda: test WP failed, assume Write Enabled

 /dev/scsi/host1/bus0/target0/lun0: p1 p2
```

This says to me that most likely linux isn't liking the firewire controller in your hard drive.  however there are a few other things...

1. Do you use iee1394 networking? (if not try with that off in the kernel, actually if you do just turn it off to see if that is the problem..)

2. Do you have SCSI emulation support turned on under the ATA drivers in the kernel you are using?

3. Have the hard drives worked on other operating systems on this computer or on other computers?

4. What type of partition table and file system are on the harddrives and do you have support for the both of these compiled into your kernel?

----------

## palminator

 *Quote:*   

> 
> 
> 1. Do you use iee1394 networking? (if not try with that off in the kernel, actually if you do just turn it off to see if that is the problem..) 
> 
> 

 

That's what I'm going to do next. And I think I have dma turned on for firewire. I will remove that to.

 *Quote:*   

> 
> 
> 2. Do you have SCSI emulation support turned on under the ATA drivers in the kernel you are using? 
> 
> 

 

SCSI emulation support is compiled into the kernel

 *Quote:*   

> 
> 
> 3. Have the hard drives worked on other operating systems on this computer or on other computers? 
> 
> 

 

Yes, the hard drives worked in this system. They worked fine as they were plugged directly in the IDE Bus.

 *Quote:*   

> 
> 
> 4. What type of partition table and file system are on the harddrives and do you have support for the both of these compiled into your kernel?
> 
> 

 

I think the answer is a yes, because of question 3, but I'm uncertain because you probably have a reason to ask it.

----------

## ckdake

I couldn't get my iPod working for the longest time in linux because its partition table is an apple partiton table and i didnt have support for that. Check out  2.6 kernel -> file systems -> partition type selection.  turn on advance partition type selection and turn on any of those you think might help.  Linux is ok with the default fdisk partition type and whatever windows should use by default,  but depending on how things were set up before, it might be something else.  There is probably no need to worry about filesystems until the hard drive shows up as actually having space on it. heh.

I forgot about turning of DMA.  that might be it too..

----------

## palminator

 *Quote:*   

> 
> 
> I forgot about turning of DMA. that might be it too..
> 
> 

 

I only turned off the DMA option for sdb2, should I disable it somewhere else too?

----------

## ckdake

 *Quote:*   

> I only turned off the DMA option for sdb2, should I disable it somewhere else too? 

  That is the only place that should matter. As far as I remember that should be the only place dma has anything to do with scsi/sdb2/1394 stuff.

The main symptom of the problem is definitely this line:  *Quote:*   

> SCSI device sdc: 1 512-byte hdwr sectors (0 MB) 

  It is saying that your device has no capacity.  Do you know what chipset is in your firewire harddrive?

----------

## palminator

I would say it is a genesys chipset.

----------

## ckdake

Any more details on what type of genesys chipset?  How about a model number of the hard drive or the case?

Checking out http://www.linux1394.org/ I couldn't find anything abotu Genesys on there.  Probably a Texas Instruments chipset but it could be something else.

here is someone using debian that speaks french that has the same problem: http://lists.debian.org/debian-user-french/2003/debian-user-french-200312/msg01699.html  No follow up posts to that one but it might be worth an email to see if they ever resolved their problem.

[edit]

oh yeah.  I also dug around in the kernel source code and couldn't find anything that mentioned genesys.

----------

## palminator

 *Quote:*   

> 
> 
> Any more details on what type of genesys chipset? How about a model number of the hard drive or the case? 
> 
> 

 

The case is a mapower case.

There is a chip with

```

AGERE

FW802B

57508433

0345T

```

and anotherone with

```

GL711FW

0343MGNLS-04a

```

but I don't know what that means.

I found the error. Wasn't anything about the software. I wrongly assumed that the harddrive jumper settings were correct because the usb functionality did work, but the jumper setting was incorrect. The hdd had to be set as master.

Now the log locks much better.

 *Quote:*   

> 
> 
>   Vendor: IC35L060  Model: AVER07-0          Rev: 0.01
> 
>   Type:   Direct-Access                      ANSI SCSI revision: 02
> ...

 

but the second hdd still gives me a headache

 *Quote:*   

> 
> 
>   Vendor: IC35L120  Model: AVV207-0          Rev: 0.01
> 
>   Type:   Direct-Access                      ANSI SCSI revision: 02
> ...

 

the second hdd (IC35L120) won't mount either

----------

## palminator

Is there a way to avoid the rescan-scsi-bus.sh? That is, do you know how to setup hotplug for firewire? 

Hotplug is set to default:

```

[bash-2.05b# rc-update show

.

.

.

             hotplug |      default

.

.

.

```

And thank you very much for the help so far, you helped me big time. I couldn't have done it without you.

----------

## ckdake

I never used the rescan shell script.  I think once I got it all working they worked fine just booting up the system with them plugged in. I don't even recall using hotplug.

Stoupid jumpers.  First time i took apart a computer to replace a hard drive... definitely ended up having to pay someone to fix the jumpers... heh. 

If i am reading things correctly, "Agere FW802B" is your chipset for future reference. (http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=agere+FW802B&btnG=Google+Search

(one thing that may be interesting:  http://www.linux1394.org/view_device.php?id=593 If that is your drive/case (i can't tell from the numbers you found) those settings for sb2 may be helpful)

It looks like all of the drive sizes are showing up now.  Is the first one working perfectly? What happens when you try to mount the second one?

----------

## palminator

```

It looks like all of the drive sizes are showing up now. Is the first one working perfectly? What happens when you try to mount the second one?

```

Yes, the first is working with no problems.

The process of mounting the second one just hangs.

----------

## ckdake

What happens when you run fdisk on the second one?  Do you know what filesystem it is?

----------

## palminator

fdisk show the disk properties and partition table right, well as far as I can see. I just cannot mount the partition. Is there any problem with big partitions, it's approx. 120GB. I thought that maybe I should empty the disk an repart. the disk. Do you think hat could help? I just wonder why it does not work. Plugged into usb it works fine. I'm saving data from the disk through usb right now.

----------

## ckdake

repartitioning might do the trick. I currently have a 200 gig internal harddrive in my server that is one partition, but it is ext3 so its a native linux filesystem.  Other filesystems might have partition size limitations, but I am not aware of any for sure.

[edit]however... i just looked at your hard drive sizes and some firewire controllers have issues with drives over 80 gigs, some with over 120 if i remember correctly.  It might be that that your firewire controller just doesn't like having a drive that big conencted to it, but try the repartitioning first..

----------

## palminator

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

 *ckdake wrote:*   

> 
> 
> (one thing that may be interesting:  http://www.linux1394.org/view_device.php?id=593 If that is your drive/case (i can't tell from the numbers you found) those settings for sb2 may be helpful)
> 
> 

 

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

This settings really made a changement. Now I can boot the second Harddrive too. The performance increased drasticly. And I can look dvd over firewire. 

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## ckdake

Awesome!  :Razz:  glad to be able to help out. anything else or is this thing fixed up for good (for now)?

----------

## palminator

To get it working I had to compile everythings as module and unload after boot the sbp2 module and reload it with the new parameters. Is there a way to bring this parameters into the kernel? I tried to give the parameters as kernel parameters in the grub.conf, but that doesn't work. 

```

title=Gentoo Source Selfcompiled Kernel 2.4.22

root (hd1,0)

kernel (hd1,0)/boot/bzImage root=/dev/sdb1 sbp2_max_speed=0 sbp2_serialize_io=1

```

How do I get the parameters into the kernel? Or at least the modules to load with the right parameters during start-up.

----------

## ckdake

check out the file /etc/modules.conf and for a better explination than I could give you here, do "man modules.conf"

----------

