M-Systems Flash Disk Pioneers 91-SR-005-10-7L Booting Linux from the DiskOnChip

Page 13

Using the DiskOnChip with Linux OS

5 Booting Linux from the DiskOnChip

Being able to boot Linux from the DiskOnChip makes it possible to use the DiskOnChip as the only disk in the system, holding the OS itself in addition to all other applications and files.

In order to make a block device bootable on Linux, the kernel and the Lilo program should be copied to the block device and a root file system needs to be created. Creating a root file system on Linux is necessary, as from this root file system the kernel is activating several programs, such as:

Init Initialize all processes

Swapo Activate swapping

n

Mount Mount the root and proc filesystems

Sh Shell

For further details refer to http://sunsite.unc.edu/LDP/ or type:

#zcat /usr/doc/HOWTO/Bootdisk-HOWTO.gz more

Warning: Notice that the DiskOnChip firmware (i.e. doc121.exb) collides with Lilo. This means that it is not possible to load Linux from the HDD after the original firmware is restored (see par. 5.1.4). This doesn’t mean that the HDD is non-functional. It only means that the alternate firmware (doc2.fff) needs to be reloaded (see par. 4.1).

If it is required to boot Linux from both the HDD and the DiskOnChip, it is necessary to use both pLilo and boot.b (provided with the TrueFFS driver). For further details, refer to Appendix II.

5.1 Creating a Root File System

5.1.1 Introduction

This section is based on Bootdisk-HOWTO and other experiments. Since each distribution has a different file location and different installations, it is possible that you won’t succeed in booting Linux the first time from the DiskOnChip. When you receive errors, follow each error and try to fix things, but reload Linux from the HDD and remount the DiskOnChip each time.

Note: There are several programs that create a root file system. It is not possible to say that any of them is complete right now, but they are worth trying. The following program is recommended:

Yard: Yard creates rescue disks (also called boot disks) for Linux. A rescue disk usually contains utilities for diagnosing and manipulating hard disks and file systems. It is used when it is not possible (or if it is not required) to boot from your HDD. This package contains mainly perl scripts. Refer to http://www.croftj.net/~fawcet/yard/.

Note: For a sample root file system, refer to the file /tmp/doc-driver/samplefs.txtwhich is part of the compressed file driver.tgz.

91-SR-005-10-7L REV. 2.0

13

Image 13
Contents Using the DiskOnChip with Linux OS Limited Warranty Contents Hardware Requirements for the DiskOnChip IntroductionUtilities Diskette Content Requirements for Installation of the DiskOnChip into LinuxLinux Driver for DiskOnChip Updating the Firmware Installing the DiskOnChip as an Additional DriveIf the /dev/fd0 doesn’t appear in the first column, type Floppy drive must be active. Verify this by typingAdding the Driver to the Kernel Configure the kernel as followsRemove the old object files Check dependenciesMake the inodes for the DiskOnChip Booting the Compiled Kernel from HDDCreating a Linux Partition on the DiskOnChip Recheck the partition table Creating a Native Linux File System on the DiskOnChipSave the new partition table disregard any fdisk warnings Mount the file system to a directoryCreating a Root File System Introduction Booting Linux from the DiskOnChipPopulating the File System OverviewRun the script Create the list of files to be mountedCopying the Kernel, Updating the Boot Sector and Rebooting Reboot and load DOS, and reinstall the original firmware TroubleshootingLinux will now boot from the DiskOnChip Most likely, you forgot to do Sys.com Additional Information and ToolsAppendix I Making a Root File System Diskonchip/bin/programname Copy the library loaders as follows For exampleYou now have pLilo sources There are 5 files that you will need to patch Appendix III Applying a Patch ManuallyUsing the DiskOnChip with Linux OS Atidim Industrial Park P.O.B How to Contact UsTel Aviv 61580, Israel