0. Firewire devices and Fedora Core 1 Starting from kernel-2.4.21, the SBP2 module in the kernel no longer plugs Firewire devices to the SCSI layer. It's expected that userland will issue some commands to the SCSI layer to complete the hot-plug procedure. This has unfortunately made it difficult for the Fedora Core installer to support Firewire devices, so they are disabled by default. Worse: the changes needed to support it were only implemented in the last minute, and it was found safer to leave Firewire disabled than to attempt to integrate these changes, which could risk breaking stuff for everybody else. In this directory, you'll find everything you'll probably need to install Fedora Core from a Firewire CD driver, and to make Firewire hard disks visible to the installer. You'll also find tips on how to install even the root filesystem on such a hard disk. All of the information is provided in the hope that it is useful. No guarantees, implied or otherwise. If it breaks, you get to keep all the pieces. If your Firewire devices burst on flames, I'm sorry; mine didn't. This text is Copyright (C) 2003 Alexandre Oliva I hereby grant permission for anyone to distribute this file verbatim, if accompanied by the other files in this directory. Also, feel free to convert it to other formats, as long as the content is preserved. You may also make changes to it, as long as they're clearly marked. Translations are permitted as well. Constructive feedback is welcome :-) 1. Installation Ok, first thing you have to do is to enable the installer to recognize Firewire devices. Adding `firewire' to the installer boot command line helps, in that it loads the ohci1394 module, but it won't load the sbp2 module, nor will it rescan the scsi bus as needed. In the same directory as this file, you'll find everything you need to update the bootable media so as to support firewire devices. 1.1 What you will need: - loader-update - firewire-loader.bz2 - any bootable media image used to install Fedora Core 1, for example, yarrow-i386-disc1.iso (the install CD), rescuecd.iso (the rescue CD, available in i386/os/images/rescuecd.iso from the Fedora Download site), images/boot.iso, images/bootdisk.img, or maybe even isolinux/initrd.img (also known as images/pxeboot/initrd.img and dosutils/autoboot/initrd.img) if you know what you're doing. 1.2 Procedure bunzip2 firewire-loader.bz2 As root, run: ./loader-update firewire-loader yarrow-i386-disc1.iso rescuecd.iso ... Instead of the .iso files, you can list any of the filenames listed above as bootable media. Read the comments in the script for details. At the end, you'll have .iso.new (or .img.new) files in the current directory, that you can then burn as an alternate boot CD or floppy. 1.3 Booting the installer Add to whatever boot command line you'd use to boot the installer the parameters `firewire'. If you want to install *to* a firewire hard disk, you'll also have to add `expert', otherwise removable media won't be available from disk druid. Note that, if you do this, make sure you read part 2 *before* installation is completed, otherwise recovery might be, erhm, interesting. Unless you know what you're doing, I don't recommend installing the root filesystem on a Firewire device (not even as a RAID member of Physical Volume), since you'll need tweaks at the end of the install procedure to get it to be seen, see part 2 below. As for the /boot filesystem, unless your BIOS can boot from Firewire hard disks, don't even think about it. And even if it does, make sure grub, lilo or whatever bootloader you choose does as well. And even then, you might still prefer not to do it. I wouldn't :-) 1.4 Sources Oh, in case you didn't notice, this code is all GPLed, so I made the sources for firewire-loader.bz2 available at anaconda-9.2-2lxo.src.rpm available. If you rpmbuild -bi anaconda-9.2-2lxo.src.rpm, you'll find the loader program in the install tree. This is what I've bzip2ed into firewire-loader.bz2. In case you already have anaconda-9.2-2.src.rpm and want to save on downloads, you may prefer to download just the patches, anaconda-firewire.patch (to be dropped in the SOURCES dir) and anaconda-firewire-spec.patch (to be installed in SPEC/anaconda.spec, after rpm -i anaconda-9.2-2.src.rpm). 2 Post-install issues Ok, so you didn't take my advice and decided to install the root filesystem on the Firewire hard disk. Or maybe you just created some data partitions, RAID members or Physical Volumes on it, and you noticed they're not found after a reboot. I told you! :-) You'll need some programs to make the Firewire hard disks visible at boot time. If it's just data partitions, it's simpler (but untested); if it's the root filesystem, it's a bit trickier, but this is what I do myself, so I know it works. 2.1 What you'll need - rescan-scsi-bus - mkinitrd (or mkinitrd.patch) (only for section 2.3) - mkinitrd-sysconfig-sample (only for section 2.3) 2.2 For data partitions, CD/CDRW/DVD drives, etc Copy rescan-scsi-bus to /sbin (if you're in VT2 on the installer, after completing the install, the root filesystem is in /mnt/sysimage or somesuch; keep that in mind, and relocate all pathnames below, or just chroot to it) Edit /etc/rc.d/rc.sysinit. Look for a chunk of code like this: # Ooh, firewire too. if ! strstr "$cmdline" nofirewire ; then aliases=`/sbin/modprobe -c | awk '/^alias ieee1394-controller/ { print $3 }'` if [ -n "$aliases" -a "$aliases" != "off" ]; then for alias in $aliases ; do [ "$alias" = "off" ] && continue action $"Initializing firewire controller ($alias): " modprobe $alias done LC_ALL=C fgrep -q "SBP2" /proc/bus/ieee1394/devices 2>/dev/null && \ modprobe sbp2 >/dev/null 2>&1 fi fi After the line containing `modprobe sbp2', add something like: /sbin/rescan-scsi-bus I'm told by a number of people that this is enough, but I haven't tested this procedure myself. 2.3 For root filesystems, RAID devices, Physical Volumes. If you did 2.2 before, undo it. 2.2 and 2.3 are mutually exclusive. 2.3 covers all cases of 2.2, and then some, but it's more complex, which is why I keep 2.2. Copy rescan-scsi-bus to /sbin, with the same caveats as in 2.2. Replace /sbin/mkinitrd with the mkinitrd script (or patch /sbin/mkinitrd with mkinitrd.patch). It adds support for /etc/sysconfig/mkinitrd. Create /etc/sysconfig/mkinitrd with contents similar to mkinitrd-sysconfig-sample, i.e.: basicmodules="$basicmodules sd_mod sbp2 usb-uhci usb-storage" sd_mod and sbp2 are needed for Firewire devices to be available early in the kernel boot. usb-uhci and usb-storage are the equivalent for USB (I have this external hard drive that supports both, so I like to have both modules loaded during initrd). Run the modified /sbin/mkinitrd to create a new initrd.img using these new parameters: /sbin/mkinitrd -f /boot/initrd-2.4.22-1.2115.nptl.img 2.4.22-1.2115.nptl You can probably reboot now, and your Firewire partitions will hopefully be visible early enough in the boot that they can hold root filesystems, raid members, physical volumes or anything, really. Note: you may prefer to not overwrite /sbin/mkinitrd, and not create /etc/sysconfig/mkinitrd. That's fine, patch mkinitrd elsewhere, and run it --with= for all of the modules you'd have added to $basicmodules, and remember to re-run the modified mkinitrd with the additional options every time you upgrade the kernel. 2.4 Sources rescan-scsi-bus is built from rescan-sbp2-bus.c, with the follwing command line: diet gcc -DMAIN -O2 -s rescan-sbp2-bus.c -o rescan-scsi-bus. Note that rescan-sbp2-bus.c is also created as part of anaconda-firewire.patch, so if you've already downloaded it and want to avoid downloading the 4Kb source file :-), you can just run: filterdiff -i loader2/rescan-sbp2-bus.c . anaconda-firewire.patch | patch mkinitrd is the result of applying mkinitrd.patch to /sbin/mkinitrd as in Fedora Core 1. You may get additional details on the mkinitrd changes at Red Hat Bugzilla bug 103665. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=103665 3. Revision history Nov 6, 2003: first public release. Nov 7, 2003: fix embarrassing replace-regexp-introduced typos in loader-update script, pointed out by Greg Hamerly (thanks!). While at that, I noticed the script that some assumptions that the given filename would be `loader' (fixed), and another unrelated typo that would prevent it from fixing bootdisk.img. So much for fixing stuff *after* testing :-( Nov 8, 2003: Disabled xdelta by default in loader-update, it's pointless for most, and very memoy-intensive. Removed note about possibly needing `expert' for Firewire CD-ROMs, after feedback from Greg Hamerly (thanks again! :-) Nov 28, 2003: Fixed typo in rc.sysinit, reported by Christopher K. Johnson. Add notes about CD, CDRW and DVD drives. Recommend reverting 2.2 if you go with 2.3.