News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

How to boot Linux from an external USB or FireWire drive

Jul 21, 2004 — by LinuxDevices Staff — from the LinuxDevices Archive — 5 views

IBM developerWorks has published a detailed technical article on booting Linux from external FireWire or USB drives, in conjunction with a boot floppy, USB storage device, internal drive partition, or another device recognized by the system BIOS. The article also explains basic bootloader concepts that may interest embedded Linux developers.

The article delves into two approaches. The first is a single-stage method that relies on several kernel patches that cause Linux to do a second bootup scan for emulated SCSI devices, such as USB mass storage or FireWire drives. This second scan enables the OS to identify and use drives not recognized by the BIOS, but which are recognized by the kernel (kernel modules don't count, here).

The second, preferred approach involves placing the kernel and an initrd filesystem image on a boot partition recognized by the BIOS. The kernel must support initrd images — most do. The kernel boots, mounts the initrd image on a RAM disk as the temporary root filesystem, and executes the /linuxrc script that it contains. The script then attempts to load the kernel modules needed to support the device containing the real root filesystem (the external USB/FireWire drive), and attempts to create a device file for it. When the script exits, the kernel unmounts and destroys the temporary root filesystem and mounts the real root filesystem from the external drive before proceding to boot.

The second method described requires some initial work, so to speak, in building an initrd image and linuxrc script, but does not rely on kernel patches, which can make kernel upgrades difficult or impossible.

Read about booting Linux from USB and firewire drives


 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.