Install the Linux operating system through the image file on the hard disk

  

How to install the Linux system into the dos hard disk without the CD-ROM drive, no floppy disk drive, and no USB boot? (Of course, the premise is that there is already a windows system)

Recently, it was dispatched to do the installation of the system. The brothers actually said that the Linux installed before was too new (gcc is too new), his program did not run (faint, write the program also pick the compiler's fault), let me install an old one. In order to save trouble, I want to compile a gcc3.3 directly on the original redhat enterprise server 5, the result took half a day to do it, it seems that there is no successful example on the Internet. Finally decided to install a redhat 8 again.

The most frustrating thing is that the server drive to install the system is broken. Originally it was good at the beginning, and later it was actually hung up, not only can't read the content, and even can't eject the CD. In the end, I had to use a violent method to forcefully open the disc with a knife... It was really frustrating.

The most important equipment for installing the system is gone. Now I can only consider the floppy drive startup or usb startup. But the server is relatively old, it is estimated that it does not support usb boot, the floppy disk is now even more. How do I install the system in this situation??

I want to find a way to install a system with a pure hard disk. I know that many systems can be installed on the hard disk, but they all need to boot into the dos with an optical drive or usb or floppy drive, but I have none of these conditions. In fact, the main thing is to enter the dos environment, and it is very easy to install the system behind.

First of all, how to start into the dos in the case of "three no"? Think about a small broken dos, there should be no need to spend a lot of time to use the CD-ROM drive usb to enter. Sure enough, I found such a software: Dwarf XP2K pure DOS mode 2.0. After the installation, the boot menu will have an additional entry to enter the dos. Well, it’s a good thing, so the latter problem can be solved.

The back is the problem of hard disk installation. Because the optical drive can not be used, there are CDs can not do mirroring, can only find the Internet to go down, slow speed is not enough (eager to install, I have no time, etc.) so the system image file is also a problem. It took a long time to find a faster ftp (1Mbps) and downloaded three system iso files.

Ok, I have been researching for a long time, and now I am loading it.

1. Install the software under Windows “ Dwarf XP2K pure DOS mode 2.0”.

2, download the iso file of the system, put it in any partition of windows. It is best to put it in the fat32 format partition (because dos itself does not support ntfs partition, but dwarf XP2K pure DOS mode 2.0 seems to be possible) and placed in the root directory of the partition, such as D:\\xxxxxx1.iso, etc. Installation saves a lot of trouble.

3, extract the dosutils directory in an iso image (using a virtual drive or winrar), put it in the root directory of a partition, such as D:\\dosutils.

4, partition

You can use pqmagic and other tools for the linux partition to be installed (a swap partition and an ext3 partition is necessary); also in the process of system installation Manually partition yourself. I like to use the latter, but if you don't understand the Linux partition, it is best not to use the latter method.

Pre-installation knowledge:

The name of the Linux hard disk partition: the first hard disk is called /dev/hda, the second one is called /dev/hdb, and so on. The first partition of the first hard disk is called /dev/hda1, the second partition is called /dev/hda2, and so on. However, because the number of primary partitions can be up to four, the corresponding D drive in Windows (the first logical partition of the first hard drive) is not called /dev/hda2 under Linux, but /dev/hda5. (ie /dev/hda1 to /dev /hda4 is considered to be the primary partition).

5, installation

Reboot the system to enter "dwarf XP2K pure DOS";;

cd D:\\dosutils

Run autoboot.bat

After that is the general system installation, the difference is that the hard disk installation process is not a graphical interface, it does not matter.

After the system is installed, it is found that the development tools are not installed by default, such as make, gcc, etc., faint, and only installed from the image file. There is no virtual CD-ROM under Linux, because Linux mount itself can accomplish many tasks, including making a CD-ROM image into a CD-ROM and loading the image file into an optical drive (the so-called virtual drive). The method is also very simple:

a. Make the disc into an iso file:

cp /dev/cdrom /*/XXXXX.iso

b. will iso on the hard disk The file is loaded to the CD (so-called virtual drive):

mount -t iso9660 -o loop /*/XXXXX.iso /mnt/iso

c. If you add the removal program, the system will Prompt you to insert a CD, but only mirroring, what should I do?

For Redhat: redhat-install-packages --isodir=iso File directory

d.General case virtual CD-ROM

rm -rf /dev/cdrom

ln /dev/loop7 /dev/cdrom

losetup /dev/loop7 /*/XXXXX.iso

mount /mnt/Cdrom

Cancel this drive:

losetup -d /dev/loop7

Change disk: just transfer iso to /dev/loop

losetup /dev/loop7 /*/XXXXX.iso

Note: /* is the path

Copyright © Windows knowledge All Rights Reserved