Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22nd November 2009, 07:05 AM
vinu Offline
Registered User
 
Join Date: May 2004
Location: Vellore, Tamil Nadu, India
Posts: 192
linuxfedorafirefox
Howto - Creating a bootable USB flash disk for DOS (using Fedora 12)

Hi,

I had to spend quite a while reading through multiple documents to figure out how to get a working bootable USB boot disk for DOS using Fedora 12. I needed the dos boot disk to flash my motherboard BIOS as it did not support linux for updating the bios. Thought I'd put the steps involved to help other people who wanted to do something similar. The steps outlined here are for a Fedora 12 system. You should be able to extrapolate the minor changes that may be required for other linux distributions. All commands listed below to be typed in on a command prompt, logged in as root. Here goes...

1. Prerequisites:
syslinux
testdisk
freedos base cd (http://www.freedos.org/)

If you don't have syslinux and testdisk, you can install them with the following command from a command prompt:
yum install syslinux testdisk

If you haven't already downloaded the FreeDOS Base CD ISO, you can do it from the following URL: http://www.ibiblio.org/pub/micro/pc-...0/fdbasecd.iso (About 8MB in size).

2. Prepare the USB flash drive:
Warning - this will erase all existing data on your flash disk. Please make a backup of your USB flash disk data, if you need to.

Plug in your USB flash disk, find out which /dev/xxx entry it uses by looking at /var/log/messages, and using "fdisk"
- create a single primary partition on your USB flash disk
- change the partition type to FAT16 (type 06)
- mark the single primary partition as bootable
- write changes and exit fdisk.

3. Create a formatted dos filesystem on the USB disk with the following command:
mkdosfs /dev/xxxA
at a command prompt, where xxx corresponds to the device name (eg: sdc) that your plugged in USB disk, and A is the partition that you'd like the filesystem to be created in (usually "1" in this case).

4. Install a master boot record (MBR) on the USB disk using testdisk by typing the following command:
testdisk
at a command prompt and using the following options from the program
- select [No Log]
- From the menu, select the disk that corresponds to your USB disk.
- select [Intel ]
- select [MBR Code]
- type "Y" when it prompts you to 'Write a new copy of MBR code to first sector? (Y/N)"
- type "Y" when it prompts you to "Write a new copy of MBR code, confirm ? (Y/N)"
- select [Ok]
- select [Quit]
- select [Quit]

5. Install a bootloader on the USB disk using syslinux, by typing the following command:
syslinux -s /dev/xxxA
at a command prompt where xxx corresponds to the device that corresponds to the device name (eg: sdc) of your USB disk and A is the partition that you want the bootloader to be installed in (usually "1" in this context).

6. Mount the partition on the USB disk using the following command:
mount /dev/xxxA /mnt
at a command prompt where xxx corresponds to the device that corresponds to the device name (eg: sdc) of your USB disk and A is the partition that you want the bootloader to be installed in (usually "1" in this context).

7. Mount your FreeDOS base CD ISO image that you downloaded earlier, with the following command:
mkdir /tmp/freedos
mount -o loop <path-to-fdbasecd.iso> /tmp/freedos

8. Copy all files from the FreeDOS ISO image that you mounted on /tmp to the partition in the USB disk with the following command:
cp -a /tmp/freedos/* /mnt/

9. Create the appropriate configuration files on the USB disk by typing the following from a command prompt:
cp /mnt/isolinux/isolinux.cfg / mnt/syslinux.cfg
cp /mnt/isolinux/* /mnt

10. Unmount mounted partitions with the following commands from a command prompt:
umount /mnt
umount /tmp/freedos

Reboot your PC with your USB disk plugged in, select the relevant BIOS options from the BIOS setup menu to boot from this USB disk, and it should work.

Would love to hear your feedback if this mini howto was helpful / unhelpful to you.

Acknowledgements:
1. Leigh123linux @ http://forums.fedoraforum.org/showpo...55&postcount=2 for enlightening me on the fact that testdisk could be used instead of install-mbr

2. https://www.ilikelinux.com/tips-and-...stick-in-linux upon which this howto is broadly based.

--Vinu.
Reply With Quote
  #2  
Old 22nd November 2009, 02:40 PM
Hansvon Offline
Registered User
 
Join Date: Apr 2009
Posts: 83
linuxfedorafirefox
Last time I did such thing, I used unetbootin. It was hum easier:
su -
yum install unetbootin
unetbootin
select FreeDos as distribution, choose the usb stick partition, press OK
Reply With Quote
Reply

Tags
bootable, creating, disk, dos, fedora, flash, howto, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a non-GUI Bootable USB Flash Drive radicaltangent Installation and Live Media 1 10th December 2007 12:52 PM
Creating Fedora Core 4 disk 1 bootable rpgjunkie101 Installation and Live Media 1 19th July 2005 07:36 PM


Current GMT-time: 23:27 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat