Install Linux system from the image file on the hard disk

  

How to install linux system without hard drive, no floppy drive, and no usb boot? (Of course, the premise is that there is already a windows system)

Recently, it was distributed to install the system. Bad things. 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 into "Dwarf XP2K pure DOS";

The following is the code snippet:

cd D:\\dosutils

After running autoboot.bat

, it is a general system installation. The difference is that the hard disk installation process is not a graphical interface, so it doesn't 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 CD into an iso file:

The following is a code snippet:

cp /dev/cdrom /*/XXXXX.iso

b. Load the iso file on the hard disk to the CD (so-called virtual CD-ROM drive):

The following is the code snippet:

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

c. If you add the removal program, you will be prompted to insert the CD, but only the image, what should I do?

For Redhat: redhat-install-packages -- Isodir=iso File Directory

d. General Virtual Drive

The following is a code snippet:

rm -rf /dev/cdrom

ln /dev /loop7 /dev/cdrom

losetup /dev/loop7 /*/XXXXX.iso

mount /mnt/cdrom

Cancel this drive:

Here is the code snippet:

losetup -d /dev/loop7

Change disk: just transfer iso to /dev/loop

Here is the code snippet:

losetup /dev/loop7 /*/XXXXX.iso

Note /* For the path

Copyright © Windows knowledge All Rights Reserved