Using USB disk to install Linux System Experience Summary __linux

Source: Internet
Author: User
Tags centos

Linux machine hardware and software Description:

Inter i386cpu,1.5ghz,512m Memory IDE Hard disk (very important, if it is a SATA hard drive, the name of the hard disk will be different)

The use of U disk capacity is greater than 3.7GB

First, you need to make a U disk installation disk

1. Download the ISO image file, I downloaded is Centos-5.3-i386-bin-dvd.iso

2. Extract Boot.iso, unzip the downloaded image file, or open the downloaded image file directly with the compression software, copy the Boot.iso in the images

3. Open UltraISO (if not directly download a, do not need to register, open choose "continue to use" can) the following figure

Double-click Boot.iso

As shown in figure:

Write the file to a U disk: Click on the boot in the menu bar to write to the hard drive image as shown:


Hard drives must be the USB drive you want to install. then click Write. Note that the data in the U disk will be formatted when written. About 10 seconds after the prompt write succeeded.

4. Copy download of the image file Centos-5.3-i386-bin-dvd.iso to the U disk, at this time the U disk content for


Note: Before using 4G u disk, you find that the capacity of u disk is insufficient, then switch to 8GU disk.

If your USB drive is larger than 3.7G. Maybe you can use it.


Second, Linux system installation

1. Set BIOS, power-on Enter setup option, select Startup>boot change boot order, set USB HDD as preference. Press F10 to save the exit.

2. Start the machine into the system installation interface, press ENTER directly into the installation process.

Language selection: Chinese (Simplified)

Keyboard selection: US

Installation method: Installation methods, this step selects hard Drive. Then choose/dev/sdan (U disk in Linux North identified as SDA, the following n is numbered, do not know whether the n==4 is set up, anyway, to find the disk containing the image file partition on the right). Ok.

Then click Next to go to the Select installation or Upgrade page and select the first installation.

Next: Select the partition and installation method, where I chose "to create a custom partition structure." ”

Next: Start partitioning

At this point, there will be two hard drives, that is,/dev/hda and/DEV/SDA which SDA for u disk. I chose/dev/hda and then clicked Delete to remove all partitions on the hard drive. The entire hard drive bit free status at this time.

Click New:

Mount point selection:/boot

File type: ext3

Allowed Partitions: Selected HDA

Size selection: 100M

And then create it in sequence.

Root partition:

mount point selection:/

File type: ext3

Allowed Partitions: Selected HDA

Size selection: 20480M

Swap partitions:

File type selected as: Swap

Size selection: 1024M (1.5~2 times for actual memory)

3. After the partition is set up, click Next to enter the formal installation process.

Boot loader selection:

When I install, there are only two items on the selection page:

The ①grub boot partition will be installed on the/DEV/SDA.

② no boot loader will be installed.

One of the ① items is noteworthy, IDE hard disks, which should normally be "grub boot partitions will be installed on the/dev/hda." "This may be the reason for the SDA hard drive first. This installation after the departure from the U disk, the boot will appear abnormal. Wait for the installation to be successful and then introduce "How to fix the bootstrapper."

Configure advanced boot loader options This option is used for multiple system startup option configurations.

Regardless of whether the above ① or ② is selected, let's continue with the process and click Next:

If ① is selected, the location of the boot loader record:

Two options:

①/DEV/SDA Master boot Record (MBR)

②/DEV/HDA1 the first sector of the boot partition

Selection of the ② option, the bootstrapper will be installed to the/boot/grub directory when the ② is selected.

Selecting the first option ① will install the bootstrapper to the main boot area of the U disk.

Note: Regardless of the choice of ① or ②, after the installation of a successful departure from the U disk, can not be normal access to the system, the choice of ② after installation is easier to deal with.

After the installation is successful, each of the two steps will be described in different ways.

Next: Select the time zone, set the root password, select the software to install, and so on, according to their own needs to choose.

Next: Installation, installation process according to the choice of software different consumption time is not the same, 30 minutes after the installation was successful. Click "Reboot".

Third, modify the boot program

1. Modify the MBR of the hard disk to point the boot program

When rebooting, because I chose the ①② combination, the GRUB boot partition will be installed on the/DEV/SDA. "and"/DEV/HDA1 boot partition of the first sector ", restart so that if you do not modify the boot sequence, do not unplug the U disk, you can start the normal boot into the Linux system.

Change the system boot order, set to IDE hard disk as the first boot entry, and discover stop at grub> after startup, at which point the Grub command can be used to enter the system. You can try it first, Setup (hd0), and reboot if you are prompted to succeed.

True to my partition: First partition mount/boot second partition mount/, execute the following command:

Root (hd0,0) carriage return

Root return, if there is no error at this point, the above settings are correct.

KERNEL/VM Tab key Auto-fill roroot=/dev/hda2 carriage return

The above command explains: kernel Specifies the system kernel program location, because the/boot independent key partition, the kernel program will be in the root directory, if the partition is created without specifying/boot as the first partition, but only one partition, then the kernel program in the/boot/directory, Press the TAB key when you enter a part of the character to automatically complete the completion. The Ro root=/dev/hda2 Specifies the root directory location, and the root is mounted on the second partition with the name/dev/hda2, because the first partition is mounted/boot.

The INITRD/INITRD tab key automatically complements the file path to the kernel program file path.

Boot executes the boot command to start the system.

System up, use root login, open terminal, execute GRUB command, need to wait for several 10 seconds, after grub>, input command: Setup (hd0) A little wait, execution success. Then reboot, there is no U disk, you can start the normal.

2, without grub, reinstall GRUB

This situation will be started directly error, not found grub and other information.

Treatment: Use the U disk installation disk to boot, if the original selection is ①① combination that is: "Grub boot partition will be installed on the/DEV/SDA." and/DEV/SDA Master boot Record (MBR), you can set the USB HDD to be the first boot entry and go directly to the system. After entering the system, enter the execution command Grub-install/dev/hda.

If the "② no boot loader will be installed" is selected, the start will be an error, without the boot program. Need to enter the rescue mode, use U disk installation disk, start, enter the installation interface, press F5, and then enter the Linux rescue carriage return, into the rescue mode. This process is consistent with the previous steps of the installation process. Then press ENTER to receive the default language, keyboard format, prompt to configure the NIC is generally selected "NO", and then the system will automatically find the Linux partition on the hard disk and try to mount it to the "/mnt/sysimage" directory (select "Continue" to confirm and continue). Next you need to pay special attention to: When the disk's warning window appears, be sure to select "NO" to avoid further damage to the hard drive data. The final "OK" confirmation will go to the bash shell environment with the "sh-3.2#" prompt.

Sh-3.2#chroot/mnt/sysimage//Switch to the Linux system root environment to be repaired
Sh-3.2#grub-install/dev/hda//Reload Grub
Sh-3.2#exit//Exit Chroot Environment
Sh-3.2#exit//Exit shsh-3.1 environment, the system will automatically reboot

If/boot/grub/grub.conf does not exist in the system, you need to create a new file that contains

Default 0

Timeout 10

Splashimage= (hd0,0)/boot/grub/splash.xpm.gz

Title CENTOS5.3

Root (hd0,0)

Kernel/vmlinuz-2.6.18-128.el5 ro root=/dev/hda2

Initrd/initrd-2.6.18-128.el5.img

Boot

After editing, save, restart the system can automatically enter the Linux system.

All in all: it takes three conditions to get into a Linux system smoothly

The ①grub boot installer is installed on the hard drive

The location of the ② boot loader is recorded in the master boot record of the hard disk (MBR)

The ③/boot/grub/grub.conf is configured correctly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.