Booting Linux from EPROM

This is a quick look at making Linux bootable from EPROM on a 486 single board computer.
Programming EPROMs

The process of programming (“burning”) the EPROMs starts out by archiving the small disk drive with tar, then extracting the files onto a clean (zeroed out) file system. By putting the file system onto a clean disk, all unused sectors are zeroed out, and the disk compression works (Listing 1).

To tar the disk image, the “full ”Linux partition was booted, and the 6MB partition mounted. By doing this, the proc file system is not included in the tar. The following commands can be used:

mount -t ext2 /dev/hda2 /mnt
cd /mnt
tar -cpf /tmp/eprom.tar *

To create the (uncompressed) disk image, I used a different machine with a 6MB RAM disk and the following commands:

dd if=/dev/zero of=/dev/ram count=12288
mke2fs /dev/ram 6144
mount -t ext2 /dev/ram /mnt
cd /mnt
tar -xpf ~/eprom.tar .
dd if=/dev/ram of=~/eprom.dsk count=12288

This creates a file (eprom.dsk) which is a sector-by-sector image of the disk. The data to be programmed into the EPROMs is the compressed image. This is done with a program (med.c) which reads the disk image (eprom.dsk), runs the disk compression, and outputs a binary file (eprom.img) which will be programmed into the EPROMs.

med ~/eprom.dsk ~/eprom.img

The EPROM image is then moved to an EPROM programmer and the images are burned.

DOS boot SSD

Fortunately the SBC came with SSD utilities to help build the disk image. The DOS SSD disk has a bare minimum of files in it: the DOS boot files,, autoexec.bat, the keyboard loading program, loadlin and zImage.

Listing 3

Listing 4


The development of what goes on the disk is a large part of the job, and methods need to be developed to minimize this effort. Using the EPROM disk is working well in our application.

Dave Bennett “works with computers” at Boeing in the commercial Flight Test group. When not at work, he enjoys the company of his significant other, two cats, a bunch of fish and millions of yeasties. Dave enjoys building things, a few of which are featured on the web page Dave can be reached at or



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Booting Linux from EPROM

Anonymous's picture

I have a BaseMemory of 512KB.
I have A: drive of 2MB where DOS resides.
I have SRAM of 16 MB for other executables storage for my
DOS system.

I would like to know - where should i place the linux ,
so that my handheld(DOS OS) comes with that of linux ?
should i need to place my linux image in the Base Memory ?
SHould i need to place my linux image in the place of
DOS operating system ?

Do give some Good links or tutorials regarding a SBC
design with linux and about a normal embedded linux
based Handheld boot process along with the h/w .

do lead me, regards,
karthik bala guru

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState