Installing Fedora 11, 10 or 9 From USB Stick
Updated on JUL 1, 2009: To install Fedora 11, please follow the instructions given for Fedora 10 below but make sure the bootable partition is slightly bigger because the net install iso on Fedora 11 is bigger than the one in Fedora 10. I gave the bootable partition 512 megs and it worked perfectly.
The aim of this post is to explain how to install Fedora directly from a USB stick containing the Fedora*-DVD.iso image. For those impatient, just go to the Instructions section.
It’s been almost 2 years since I said goodbye to Windows and moved my work laptop to Fedora, and I couldn’t be happier with the move. If you wanna find out why I’m happier with Fedora, just carry on reading my blog over the coming months. For the moment, I’ll be focusing on the Fedora installation process. One of the best things about Fedora is that it gets released twice a year so you keep upgrading your machine to the get the latest features, latest bugs…etc. This means that you end up downloading and burning a Fedora ISO into a brand new DVD every 6 months. As you can imagine, I was quickly piling up DVDs that were useless soon after. So, after having looking around in electronic shops, I realised that USB keys had gone down in price and that you could get an 8GB USB stick for little money. This happened at the same time that I was getting a new laptop at work, so I wondered, what about I get myself one of those sticks, put the latest Fedora image on it and install it from there rather than burning yet another DVD? For sure, installing from an USB key was always going to be faster than from a DVD, so that was a plus as well.
For some reason, maybe because people haven’t tried this that much, it took me a while to find some decent instructions on how to do this. Eventually, this came from Michale Hartley’s comment on Haral Hoyer’s blog entry on “Fedora 8 on a USB stick”. However, I had some issues with these instructions, specially when trying to create the bootable partition in the USB stick, so I ended up writing my own set of instructions for Fedora 9:
Installing Fedora 9 from USB stick
- Download Fedora-9-i386-DVD.iso
- Download Fedora-9-i386-netinst.iso
- Create 2 ext3 partitions in USB stick (Hint: GParted is a wicked graphical tool to create partitions): A 200 MB bootable partition and another partition with the rest of space.
- Copy Fedora-9-i386-netinst.iso to 1st partition:
1
livecd-iso-to-disk Fedora-9-i386-netinst.iso /dev/sdb1
- Copy DVD iso image to 2nd partition:
1 2 3
mount /dev/sdb2 mnt-sdb2/ cp Fedora-9-i386-DVD.iso mnt-sdb2/ umount mnt-sdb2/
- Reboot with USB key inserted.
- Select install from Hard Drive and select /dev/sdb2
When Fedora 10 was released, I followed the same steps to install as I did for Fedora 9 but I kept getting an error saying that no image could be found in /dev/sdb2 even though the Fedora 10 DVD iso image was there and had passed the SHA1SUM test successfully. After exchanging some emails within Red Hat I was pointed to the Installation from a Hard Drive section of the Fedora 10 documentation, which mentioned that install.img had to be present under the images/ directory in the partition from where Fedora 10 had to be installed.
On my 2nd attempt, I extracted the entire DVD iso and put it in the USB stick so that images/install.img would be found but doing only that didn’t work. In the 2nd phase of the installation, I was told that an image was missing. I just couldn’t understand what the hell was going on, so eventually, after a few further email exchanges, I worked out what needed doing: First, images/install.img had to be in the USB stick and next to the images/ folder, you needed to have Fedora-10-i386-DVD.iso. So, here’re the instructions to install Fedora 10 from USB stick:
Installing Fedora 10 from USB stick
- Download Fedora-10-i386-DVD.iso
- Download Fedora-10-i386-netinst.iso
- Create 2 ext3 partitions in USB stick (Hint: GParted is a wicked graphical tool to create partitions): A 200 MB bootable partition and another partition with the rest of space.
- Copy Fedora-10-i386-netinst.iso to 1st partition:
1
livecd-iso-to-disk Fedora-10-i386-netinst.iso /dev/sdb1
- Extract images/ folder from Fedora-9-i386-DVD.iso and copy to 2nd partition:
1 2 3 4
mount -t iso9660 Fedora-10-i386-DVD.iso mnt-dvd/ -o loop mount /dev/sdb2 mnt-sdb2/ cp -rp mnt-dvd/images mnt-sdb2/ umount mnt-dvd/
Note: If you do a ‘cp -a’ as recommended in the Installing from Hard Drive section, you’ll get an error like this, so just use ‘cp -rp’ instead:
SELinux is preventing cp from creating a file with a context of iso9660_t on a filesystem. Usually this happens when you ask the cp command to maintain the context of a file when copying between file systems, “cp -a” for example. Not all file contexts should be maintained between the file systems. For example, a read-only file type like iso9660_t should not be placed on a r/w system. “cp -P” might be a better solution, as this will adopt the default file context for the destination. . - Copy DVD iso image to 2nd partition:
1 2
cp Fedora-10-i386-DVD.iso mnt-sdb2/ umount mnt-sdb2/
- Reboot with USB key inserted.
- Select install from Hard Drive and select /dev/sdb2
And that’s it. I’m fully aware that these instructions could be simplified/reduced but can’t be bothered to do that right now. It’s not something that I’m doing on a daily basis and it works, so I’m happy to leave them as they are for the time being. If anyone has any suggestions, please feel free to comment.
Merry Xmas and a happy new year to all :)
Tagged as fc10, fc11, fc9, fedora + Categorized as How To
I’ve tried your guidelines for installing Fedora 10
form a USB stick.
I failed, because the USB couldn’t boot.
Then I found another website:
http://www.pendrivelinux.com/usb-x-ubuntu-610/
where I learned that the first partition on the USB
stick should be of the type FAT16.
I followed the instructions there how to create the
first (FAT16) and second (ext2) partitions on the
USB stick.
Then I followed your instructions on how to populate
these partitions. After that all went like a charm!
So I guess, for some people it might be necessary to
not use the ext3 partition types, as you suggest.
Regards,
Rob.
Hi Rob,
First of all, thanks very for providing such valuable feedback.
I’ve gone and double checked how I set up partitions in my USB stick and I can confirm that both partitions are ext3. So, setting the bootable partition works for me as ext3. I have no idea why it doesn’t work for you and why it works for me though :(.
Regards,
Galder
hi galder..
just a clarification: fedora can be installed on your computer’s hard drive via usb only if you can boot your sistem via usb. Otherwise there will be no chance to get fedora on your computer. I have a 1999 laptop and time ago i tried and tried to get usb booting. There’s been nothin to do.
So theese instruction are valid only for recent computers (for recent i mean departing from 2003). I think it’s a good idea to include this info in the article.
Cheers.
Hi Giovanni,
I dunno when systems started to be able to from USB but it looks pretty obvious requirement. If you have problems, you can always fall back on the DVD/CD method :)
Regards,
Galder
I wonder why it is necessary to have 2 partitions.
My 4GB USB stick is short of a few MB to have the
full iso image of the Fedora 11 installation DVD on it.
However, if I create one single partition, it’ll fit.
Would it work with a USB stick which has just one
single partition with everything copied into there?
I ask here, as I don’t want to ruin my F10 installation
by a corrupt F11 installation from USB…..
Rob.
I suppose it could be done in a single partition. You definitely need a bootable partition. Afterwards, the image could really be located in any partition. I separated it in two to have a logical separation.
I can’t see how you’d ruin it, if anything, you wouldn’t be able to progress the step where the DVD image is looked up but I can’t see any other potential side effects.
Finally, I upgraded to Fedora 11 over the weekend and the instructions that I had given for Fedora 10 worked perfectly with Fedora 11.
Hi Galder,
I am following the tutorial for F10 and using a 4gb flash disk. The problem is when i am in the final step copying the F10 dvd image. i get the command line error msg that the disk has run out of space. Wanted to if u were using 4gb mem stick or external hard-disk?
Thanks
Hi Antoine, first of all, I’ve just updated instructions for Fedora 11. They’re the same as for Fedora 10 but making the bootable partition slightly bigger. As I said earlier, this might be doable with a single partition. I’ll try that for Fedora 12 :)
With regards to the mem stick size, I bought an 8gb USB stick on purpose so that a DVD would fit perfectly. IIRC, there might be a CD version as well for Fedora 11 , so you might be able to put the image for that and download the rest of packages.
Hi,
Thanks for the instructions. I’ve had a hard time finding good instructions for doing an install without a cd/dvd drive. I think it’s strange that the major distros put so much effort into liveCD’s and neglect live usb’s.
Anyway, I was wondering why you need the boot partition at all? Can’t you use the livecd-iso-to-disk command on the dvd.iso image? I have done this with a liveCD, but was not satisfied with the install. I have not tried it with a DVD image, but it may give the same results. BTW the liveCD install did not give me the option to customize my packages, I’ve never used a liveCD, so I may just be ignorant of how to customize the install.
If anyone is interested you can use a small <1GB USB drive with only the netinst.iso image. When it asks for the distor source choose network install, and give the url of a mirror site. This method work for me doing a CentOS 5.3 install.
Thanks again, your instructions put me over the hump
Hi Galder,
From where we will get Fedora-11-i386-netinst.iso to install FC11.
Henry, Ashish, first of all, apologies for the later reply. I’ve been on holiday and tried to avoid using the laptop as much as possible :)
@Henry, Not sure if it would work fine if the image was in the same partition as the bootable partition. I can’t remember the exact reason I did that but it works. Might try to put both in the same partition for Fedora 12.
@Ashish, a bit of browsing should make it obvious :)
http://fedora.inode.at/fedora/linux/releases/11/Fedora/i386/iso/Fedora-11-i386-netinst.iso
Trying to install Fedora 11 from SATA disk . Copied DVD iso and images/install.img as directed, but the installer can not locate install images in the /dev/sdb3 and directory that I told it. Any suggestions?
My problem is similiar to yours, but simpler, no USB device is used, this is a simple install from the hard drive, does not work.
@Greg, no idea. Maybe you’re pointing to the wrong mount point? Did you try other mount points?
Hi
Many thanx for information. I am using fedora since FC 7. I like it . I want to install to a usb external hard disk 80GB, can it be done as in internal hard drive? Can this be used in other computer rather than where it was installed without interfering/conflicting primary hard drive and windows operating system? If yes please inform the procedure.
@Munna, what you seem to ask is off-topic. You seem to be asking how to install Fedora on a separate USB drive, whereas where are talking on how to install Fedora *from* a USB drive containing the Fedora DVD message. May I also inform you that this is not a support forum ;)