Making a Portable Hard Disk with Linux
1. Intruduction:
Project purpose is:
install an extra hard disk to the system, and install the Linux to the extra hard disk. Then move this disk to another machine to boot and run linux on that machine.
2. What we have done:
Two most important parts for this project:
one is hard disk installation ,
one is lilo.conf file modification.
Steps to do the project:
a. Install the hard disk on machine A.
Install the extra hard disk on the second IDE bus as /dev/hdc.
BIOS can auto-detect the disk's presence and their "geometry", needn't touch it.
b. Install the Linux.
At least two ways to install the Linux.
Through CD-ROM, easiest way: needn't partition and format the new disk,the
installation prgram will do it for you.
Through copying the files from the old disk with Linux: need partition,format and
mount the new disk before copying.
c. Modify the lilo.conf file and install LILO.
boot = /dev/hdc # overwrite MBR of hdc
disk=/dev/hdc # tell how hdc will look like
bios=0x80 # the BIOS will see it as first drive
image = /boot/vmlinuz-2.0.34-0.6 # root partition is /dev/hdc1
label = linux # hdc1 at boot will be hda1
root = /dev/hda1
read-only
d. Move the extra hard disk from machine A to machine B, install it as the primary
hard drive of the first IDE bus,which is /dev/hda,and the original /dev/hda as
/dev/hdb.
e. Reboot the system.
Fix the file system,modify the fstab file.
Modify the lilo.conf to fit currently system.
3. Problems not solved:
a. Cannot boot linux on machine B with floppy disk.
b. Cannot boot the DOS when it was on the second hard disk.4. Reference:
Hard Disk Upgrade Mini How-To
LILO Mini How-To