I recently bought a Connectland 5.25" external enclosure, allowing to
connect a IDE peripheral (CD/DVD reader/writer, hard disk...) to a
firewire or USB2 (works with USB1 too) computer.
For 75€, it was a bit expansive, but it can be quite useful if :
The design is a bit flashy but decent (light gray, blue and purple) ;
the included cables are nice (silvery cables, à la Apple) but a
bit short (there's a 6-6 firewire cable, and a A-B USB cable). The
enclosure has 2 firewire ports and an USB port (similar to the one you
probably have on your USB scanners, printers, and other devices) ; so
you can plug a longer cable if you need. I used a 2 meters (6 feet) USB
extender without any problem.
- you want a very large movable storage. Just put a 250 GB IDE disk
in the box. It won't fit in your pockets or as a necklace (it's not a
little and sexy USB key!), but the box itself is just a little bit
bigger than a CD/DVD drive, and quite light. Note that it has an
external power supply.
- you have a DVD writer but want to use it on many computers ; some
of them having no internal 5.25" drive bay.
- you want to play with USB2 and firewire peripherals. ;-)
To get that thing to work with Linux thru the USB connector, you just
need to insert the right HCI module (this is needed for any USB
peripheral to work) :
Then, you need the usb_storage module ; and your disk or CD/DVD
reader/writer will show up as an SCSI device. You can skip the next
- ehci-hcd if you have USB2 (any kernel)
- ohci-hcd or uhci-hcd for USB1 with 2.6 kernels
- usb-ohci or usb-uhci for USB1 with 2.4 kernels
To use it with the firewire link, you need to insert the ohci1394
module (needed for every ieee1394 device), and the sbp2 module. Then,
you need an extra step there, because the kernel won't scan
scsi/firewire hosts for peripherals ; you will need to hot-add them.
You can do it manually with echo
scsi add-single-device H C I L > /proc/scsi/scsi, where H is
the host (as shown in the kernel as scsi0:
SCSI emulation for IEEE-1394 SBP-2 Devices), C the SCSI channel
(usually 0 ; maybe more if you have many firewire cards, I don't know),
I the SCSI ID (0 for first peripheral ; I think that the next
peripheral will be assigned ID 1, etc., but I could not try), L the
SCSI LUN (always 0 I guess). So, to make it short, echo scsi add-single-device 0 0 0 0
> /proc/scsi/scsi should work if you don't have other SCSI
interfaces, and only one peripheral. You can also use this
Once that your USB or firewire device is recognized as an SCSI device,
you need sd_mod module (for hard disks) or sr_mod module (for cd/dvd
drives). You might need sg for cd/dvd writers. Your device should then
show up in kernel messages :
scsi2 : SCSI emulation for USB
Mass Storage devices (this is usb_storage module)
PIONEER Model: DVD-RW DVR-107D Rev: 1.10
(this is the "scan" of the USB/SCSI host)
ANSI SCSI revision: 02
Attached scsi CD-ROM sr1 at
scsi2, channel 0, id 0, lun 0 (this is sr_mod)
sr1: scsi3-mmc drive: 40x/40x
writer cd/rw xa/form2 cdda tray
You can then mount your device and have fun.
NOTE FOR FIREWIRE USERS : if you get some freezes and very slow overall
speed, and kernel mesages like the following one :
kernel: ieee1394: sbp2: aborting
kernel: Read (10) 00 08 b3 f2 5a 00 00 fe 00
... you might want to try to insert the sbp2 module with a special
option, as explained here
Just do modprobe sbp2
sbp2_serialize_io=1 and it should be fixed (it worked for me ;
my DVD writer can read 8 MB/s without problems, else it's closer to 8
THINGS TO DO : try to daisy-chain 2 computers with firewire, and have
them share a peripheral. Try to connect the enclosure thru firewire and
USB2 simultaneously (don't try this at home, kids).
Some useful pages :
Now, if you have a DVD writer, here are some recipes that I used :
Then, I wanted to create a Video DVD from a DivX source. That's quite
tricky. You need mjpegtools
dvdauthor mencoder (or, rather, it's what I used). Being
familiar with those tools will help.
- apt-get install dvd+rw-tools
(or get them for your favourite distro)
- growisofs -Z /dev/scd0 -R
-J -hfs /path/to/burn - this will erase the media inserted in
the writer (-Z for Zero),
and generate a ISO filesystem with RockRidge, Joliet and HFS extensions
(-R -J -hfs ; it will be
readable with Win32, UNIX and Macs) with all files and directories
under /path/to/burn, and
write it to the media.
- growisofs -M /dev/scd0 -R
-J -hfs /some/extra/files - will add (-M for Multi-session?) the
files in /some/extra/files
to the media. In fact, growisofs
will invoke mkisofs and
take care of special multi-session options for you. For those of you
who already did "manual" multi-session recording with mkisofs and cdrecord, this should seem
quite trivial ; for others, it might be deep voodoo.
- growisofs -Z
/dev/scd0=my_iso_image - to burn an already made ISO image.
This got me a DVD good enough for mplayer, but VLC had some problems
with it (it read 2 seconds, then paused ; I could seek a bit, but when
seeking worked, it just played a couple of seconds then paused again).
I don't know if it's my fault or VLC's (I had a lot of negative
experiences with it, and even though it's streaming capabilites are
awesome, it's overall stability and features on my specific hardware
setup are very low compared to mplayer's or xine's. Your Mileage May
Vary). I could not try with a set-top DVD player as I don't have one.
- You need to encode the audio track into MPEG-2 layer-II, using mp2enc for instance. You should
aim 224kbps bitrate, 2 channels, 48khz stream. It might be possible
directly with mencoder
(or your favorite transcoding/encoding software) ; you can also do mplayer -vo null -ao pcm foobar.avi
and get a very large audiodump.wav
file, then run mp2enc -b 224 -r
48 -s -o audiotrack.mp2 for instance. I positively think that
there are better ways to do that, and it should be quite easy to figure
- You need to encode the video track. Here comes the hard part. In
your MPEG-2 encoder, you must select "DVD profile" ; and even more, it
seems that you have to insert special "navigation packets" at some
point ; I used mpeg2enc,
with -f 8 option. Quoting
the manpage : This version
adds special dummy navigation packets into the output stream that the
dvdauthor tool fills in to make
a proper .VOB for authoring. As mpeg2enc only accepts YUV4MPEG
input, you can use for instance mplayer
-ao null -vo yuv4mpeg foobar.avi (warning, this will produce a very large stream.yuv file, up to 1 GB per
minute) and then mpeg2enc -F 1
-f 8 -s -n p -b 4000 -o video.mpv (-F 1 specifies the framerate ;
check mplayer output to
see which framerate to use, and use -F 0 to see available
framerates in the MPEG-2 encoder ; specifies special dvdauthor profile
; -n p is for PAL, and -b 4000 means 4000 kbps
- Multiplex the audio and video track together : mplex -f 8 audio.mp2 video.mpv -o
- Now, mkdir mydvd,
and do dvdauthor -o mydvd
muxed.mpg ; if you split your MPEG file in parts, you can do dvdauthor -o mydvd a.mpg b.mpg
foobar.mpg and they will end up as separate chapters on the DVD.
- Do dvdauthor --toc.
- Almost there ! mkisofs
-dvd-video -udf -o mydvd.iso mydvd will make a good ISO image
out of your directory (which should contain AUDIO_TS and VIDEO_TS like on "regular"
- Finally, growisofs -Z
/dev/scd0=mydvd.iso and voilà !
This site explains (in french) how to author a Video DVD with menus.
It's worth a look.
No warranty whatsoever, use at your own risk, feel free to send
comments and corrections to skaya at enix dot org.