Kasperian Moving Parts

kinda like Batman, but with a wife and 3 kids

Installing Fedora Linux using a USB thumbdrive

This is the coolest thing since sliced mustard, just let me tell you!! =:) I spent more time trying to figure out how to do it than actually doing it. As it turns out, Fedora gives you a disk image for precisely this reason.

It turned out like this then….

1) Search Google for a good hour at least, trying to find any references to anyone else doing this.
2) Failing at #1, search for something obscure and find a link to a README for something else which mentions that the diskboot.img is intended to be used for USB thumb drives, etc., and that one should download it instead of boot.iso for this purpose and use dd to get it onto one’s USB drive. Note–I cannot find this README now, nor is it in the Fedora/images/ directory where one might think it would be.
3) Download the current diskboot.img file (link for Fedora Core 3–the most current release as of this posting).
4) run “dd if=diskboot.img of=/dev/sda” from a terminal/console.

Then it simply a matter of getting your BIOS to allow you to boot from a USB device. For me and my IBM A31 laptop, I had to enable BIOS USB or some-such, and then move the detected USB drive above my main hard drive in the boot order.

Cool stuff!! Allowed me to pretty painlessly (after I figured out how to do it, exactly) do a network install of the latest Fedora Core release.

One last tidbit… At the boot prompt screen from the diskboot.img, I use “linux xfs askmethod” to be able to install via Network and to be able to use XFS as my filesystem.

Okay, bye.

12 Replies to “Installing Fedora Linux using a USB thumbdrive”

  • hi jason,
    a good thing and it works fine, but is there a way to get the rest of the fedora installation dvd on the same usb-device then just using it for booting ??

    i would like to boot from the usb-hdd, and have all the installation-stuff (fedora, other applications,…) on it too. because a 10 GB disc is just to big for just booting form it.

    thanks in advance
    andiy

  • Hi AndiY! =;)

    Hm. Well, it’s sure been a while since I did this last, so I’m not entirely up to snuff on all the latest Fedora images, etc. I actually wouldn’t do things this way now, but would instead just download the latest DVD or CD ISO images, burn those, and use them. I think what prompted me to do things this way (the USB install) was more trying to figure out how to do it than needing to do it ever again. =;)

    So, I’m sorry, but I don’t have an answer for ya. Please do post back, though, if you can figure out how to do it!! =:)

    One thing you might try is downloading the DVD ISO and then copying that to a partition on your external drive. In other words, you might download the bootable image, dd that onto one partition and use that one to boot off of. Then copy the contents of the iso (after you mount it via loopback) to another partition on the same usb hard drive and see if you can tell the installer where you have the contents it needs for the rest of the install. Seems a bit obtuse and honestly, I’d just burn the DVD iso and be done with it, but it does sound like an interesting experiment! =:)

  • Hi

    this is the solution for Fedora 8. It’s not perfect but it works.

    1. Download the Fedora DVD ISO
    2. Get yourself a 4gb USB drive or USB harddisk.
    3. Create two Win95 FAT16 partitions on the USB device, the first 20mb and the second the remainder of the drive.
    4. Mark the first partition bootable.
    5. dd if=diskboot.img of=dev/sda1 where you downloaded diskboot.img from a Fedora mirror or you extracted the file from the ISO using WINRAR on Win XP.
    6. mount the second USB partion.
    eg
    mkdir /mnt/u2
    mount /dev/sda2 /mnt/u2
    7. Copy the DVD ISO to the second partition. Don’t DD the ISO, just plain simple copy.
    eg. cp Fedora-8-i386-DVD.iso /mnt/u2
    8. Leave the USB device in the computer and reboot; may need to adjust the BIOS on start up so that the boot order recognises it should start from the USB device.
    9. The USB device partition 1 will boot and you will be offered an introduction. Follow the instructions and navigate the HDD install menu to /dev/sda2 (your USB device). This will detect your Fedora-8-i386-DVD.iso and boot it.
    10. Following the installation instructions generated by Fedora-8-i386-DVD.iso
    11. Over to you.

    Kind regards

    Michael.

  • Having similar problems as described above, I tried to apply Michael Hartley’s suggestions. However, I couldn’t get it to work – until I revided the approach as follows. Maybe others can benefit from this hazzle… The key problem for my Shuttle K45 PC was that it wouldn’t accept two partitions on one USB stick. Fortunately, the PC has more than one USB port – and I had more than one USB stick…

    Here we go:

    1. Download the Fedora DVD ISO
    2. Get yourself two USB drives, one of which is a 4+gb USB drive or USB harddisk.
    3. Create a 20 MB Win95 FAT16 partition on the smaller USB drive/stick: First fdisk /dev/sda – create a partition and mark it FAT16 and bootable (option “a”). Exit and then mkfs.vfat /dev/sda1.
    4. Create a 4+GB FAT32 partition on the larger USB drive/stick (a FAT16 partition won’t give you enough space): mkfs.vfat /dev/sda2 to create the file system.
    5. Mount the smaller FAT16 USBstick and run dd if=diskboot.img of=dev/sda1 where you downloaded diskboot.img from a Fedora mirror or CentOS or you extracted the file from the ISO using WINRAR on Win XP.
    6. Mount the second USB
    7. Copy the DVD ISO to the second USB. Don’t DD the ISO, just plain simple copy – eg. cp Fedora-8-i386-DVD.iso /mnt/u2
    8. Leave the USB devices in the computer and reboot; may need to adjust the BIOS on start up so that the boot order recognises it should start from the USB device (note: USB sticks are often recognized as USB-ZIP (see http://www.rm.com/Support/TechnicalArticle.asp?cref=TEC160822)
    9. The USB device 1 will boot and you will be offered an introduction. Follow the instructions and navigate the HDD install menu to the second USB device. This will detect your Fedora-8-i386-DVD.iso and boot it.
    10. Following the installation instructions generated by Fedora-8-i386-DVD.iso
    11. Over to you.

    At any rate, thanks, Michael – without your input above, I’d never succeeded.

    /Per Hertz

  • I have Windows XP system.
    How do I do the following ? What utilities are you using for the partitioning and for the following ?
    5. dd if=diskboot.img of=dev/sda1 where you downloaded diskboot.img from a Fedora mirror or you extracted the file from the ISO using WINRAR on Win XP.

    Thank you.

  • Raymond, if you try to do this under Windows, you won’t be able to see the second partition (if you’re using a USB flash drive) only the first one (20Mb) because Windows, by default, is not able to handle two partitions from USB flash drivers unless these are USB Hard disk drivers (I read this somewhere but don’t have the link anymore :().

  • Hi Michel,

    I am trying to load Fedora from USB stick. I do follow similar steps as you in mentioned above.

    9. The USB device partition 1 will boot and you will be offered an introduction. Follow the instructions and navigate the HDD install menu to /dev/sda2 (your USB device). This will detect your Fedora-8-i386-DVD.iso and boot it.

    I would like to prevent manual selection/navigation of HDD install menu to USB device in step 9. I tried modifying kickstart file to point to USB device but it still prompts with HDD menu (for the OS image).

    Appreciate any ideas on how I can get around this.

    Thank you,
    Ramki

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.