Ubuntu8.04 installation for beginners (preparation)

Source: Internet
Author: User
Maybe when you see the dense text below, it's starting to grow. Which of the following is a zero command! However, please allow me to repeat it here. Maybe you are familiar with the knowledge to be introduced below, but I suggest you simply browse it or pick it up for me. If you are installing Ubuntu for the first time, the following preparations are necessary for the smooth installation of Ubuntu. This article is not intended to be an encyclopedian introduction, so the following content is very rough. If you want to learn more, you can consult the search engine.

Maybe when you see the dense text below, it's starting to grow. Which of the following is a zero command! However, please allow me to repeat it here. Maybe you are familiar with the knowledge to be introduced below, but I suggest you simply browse it or pick it up for me. If you are installing Ubuntu for the first time, the following preparations are necessary for the smooth installation of Ubuntu. This article is not intended to be an encyclopedian introduction, so the following content is very rough. If you want to learn more, you can consult the search engine. My only suggestion is to read new articles as much as possible. The development of Linux is changing with each passing day. The old Linux documents may mislead readers about Linux.

1. Hard Disk partitioning
A hard disk can be divided into four primary partitions, or three primary partitions plus an extended partition. Extended partitions are actually just a container. We don't actually use them directly. In extended partitions, we can continue to divide logical partitions. It is generally believed that in an extended partition, countless logical partitions can be separated. A hard disk can be divided into multiple partitions because of logical partitions.

Another concept that may be involved is the active partition. When the computer is powered on and started, the BIOS will find the operating system boot program for the partition with the active partition ID on the hard disk. If there is no active partition on a hard disk, the boot will fail even if the hard disk has a boot program and a sound operating system. (The Bootstrap program will be described later .) One hard disk can only have one active partition, and only the primary partition can become an active partition.

2. Hard Disk Partitions in Linux
Unlike Windows, Linux does not use drive letters such as C, D, E, and F to identify each partition. Instead, it uses a series of device files to mark all hardware devices as files. For example, in Linux, the four primary partitions correspond to/dev/sda1,/dev/sda2,/dev/sda3,/dev/sda4, respectively. Where/dev is the directory where the device file is located (I .e., folder, the same below), sd represents SCSI Disk, a represents the first SCSI device, Number 1, 2, generation 3 and 4 represent four primary partitions. If you don't know what a SCSI Disk is, don't worry, because you don't need to know what it is. Generally, if you only have one hard disk in your computer, the hard disk must be/dev/sda.

You may have been familiar with Linux before, or have seen/dev/hda in some old documents to represent the hard disk on the first primary IDE channel ,...... You do not need to know this now. Ubuntu has removed the mechanism for distinguishing hard disks of different types with hd and sd. Instead, it uses sda to represent the first hard disk in the computer.

In Linux, the numbers X in/dev/sdaX are limited. In Linux, the maximum Partition Number is 16. Therefore, the primary and extended partition numbers occupy 1 ~ 4. logical partitions occupy 5 ~ 16. Even if your hard disk only has one primary partition (for example,/dev/sda1) and one extended partition (/dev/sda2), the remaining two primary partition numbers are:/dev/sda3, dev/sda4 is not allocated to the logical partition either. The first logical partition must start with/dev/sda5. This is similar to the preparation of drive letters in Windows. For example, disk A must be A 3.5 inch soft drive, disk B must be A 5.25 Inch software, and disk C is A hard drive partition. Even if there is no drive on the computer, the number of the first hard disk partition is C, not.

3. BOOT program and MBR
The boot program is responsible for loading the operating system kernel from the hard disk to the program in the memory. When using Windows, we seem to have never cared about the boot program. However, readers who have installed dual Windows systems must understand Windows boot programs, even if you have never realized this. The boot program of Windows is called OS Loader, which is the operating system Loader. in ini, the operating system selection menu is displayed on the screen, and the appropriate operating system is guided according to the user's choice.

Linux has two boot programs: Lilo and Grub. Lilo is a very classic Bootstrap program. Grub was initially replaced because it does not support booting the Linux kernel located after the 1024 cylindrical kernel. The new version of Lilo supports Linux kernel after 1024 cylindrical boot. Currently, almost all mainstream releases use Grub as the default boot program. The Linux boot program is similar to the Windows OS Loader. For example, Grub is responsible for reading the configuration file (menu. lst), displaying the selection menu of the operating system, and guiding the appropriate operating system according to the user's selection.

MBR, also known as the primary Boot Record, is located in the first sector of the first track of the first cylindrical disk. The boot program is located in MBR. During boot, the BIOS reads and runs the boot program in MBR to load the operating system kernel. The primary Partition Table is also located in the first sector of the first track of the first cylinder. Because the size of the primary Partition Table is limited, only information about the four partitions can be saved. This is why a hard disk can only be divided into four primary partitions. As you may have guessed, there is another stuff called "extended partition table", which is located at the very beginning of the extended partition and stores the information of the logical partition.

During Linux installation, Grub is usually installed in MBR. In this way, you can use Grub to guide both Linux and Windows.

4. File System and SWAP
Before a hard disk partition can be used, it must be formatted into a specific file system. Common file systems in Windows include FAT32 and NTFS. Some USB flash drives may also be in the FAT (16) format. For the differences between FAT (16), FAT32, and NTFS file systems, you only need to know that FAT (16) supports a maximum of 2 GB single file, the maximum size of a single file supported by FAT32 is 4 GB, while NTFS supports a single file larger than 4 GB.

Linux supports many different types of file systems. Linux can read and write FAT16/32 and NTFS. However, because these two file systems do not support Linux File permissions, the Linux operating system cannot be installed in the partitions of these two file systems. Common Linux file systems include EXT3, ReiserFS, XFS, and JFS. I can list a string of file systems supported by Linux. But you know that these four file systems are enough. We usually use EXT3 as the default file system. There are too many arguments about the advantages and disadvantages of various file systems. I don't want to comment on them. My personal opinion is that we use Ubuntu as a desktop system. In most cases, the performance of the file system is not a major concern. You may see a lot of negative comments on EXT3, but I can tell you that EXT3 is the oldest and tested Linux file system, so it is right to choose it. In fact, if this article introduces Gentoo Linux, I will recommend ReiserFS. Because ReiserFS has outstanding performance in processing a large number of small files. (You may also see a file system called EXT2. As its name implies, EXT3 is an upgraded version of EXT2 .)

Linux Swap (Linux Swap partition) is also a file system. It serves as the virtual memory of Linux. In Windows, the virtual memory is a file: pagefile. sys. in Linux, the virtual memory needs to use independent partitions. This is said to improve the performance of the virtual memory. Generally, the virtual memory size is set to 1 ~ of the physical memory ~ 2 times. (The following Partition suggestions will describe more about swap partitions in Linux .)

5. Linux File structure, mounting and partitioning suggestions
Windows File structure is a parallel tree structure with different disks (partitions) at the top, such as C, D, E, and F. The file structure of Linux is a single tree structure. At the top is the root directory, that is /. The root directory contains multiple subdirectories, including/bin,/boot,/dev,/etc,/home,/lib,/media,/mnt,/opt, /proc,/root,/sbin,/tmp,/usr,/var, etc. I will not detail the specific functions of these directories. All Disk Partitions must be mounted to a directory in the directory tree for read and write.

Obviously, the root directory is where all Linux Files And Directories are located, and a disk partition needs to be mounted. As mentioned above, Linux swap partitions also need to be used independently. Therefore, installing a Linux system requires at least two partitions. (In fact, it is also possible to install Linux using only one partition. If the physical memory of the computer is large enough, swap partitions is not necessary. However, this article does not describe this advanced topic .)

In different Linux installation tutorials, different authors explain various partition suggestions. This tutorial is no exception. Many of the following suggestions have strong personal preferences. Therefore, readers do not have to partition according to my suggestions. The best solution is to select the one that best suits them. Even so, I hope readers can refer to some of my suggestions below.

/Boot: In many old tutorials, users will mount an independent partition of about mb in the/boot directory, we recommend that you put the/boot file in front of the hard disk, that is, before the 1024 cylinder. As a matter of fact, this is what Lilo cannot guide the operating system kernel after 1024 cylinders. Of course, some authors claim that the benefit of independent mounting/boot is that multiple Linux instances can share one/boot.
In fact, no matter which of the above reasons, there is no need to separate the/boot partition. First, Grub can boot the Linux kernel after the 1024 cylinder. Second, even if multiple Linux systems are installed, the/boot is completely available. Because the size of the/boot directory is usually very small, about 20 MB, a MB partition is undoubtedly a waste, and the hard disk is also fragmented, not convenient to manage. In addition, if two Linux systems share one/boot, every time the kernel is upgraded, Grub configuration files may conflict with each other, causing unnecessary trouble. In addition, the non-independent/boot partition only occupies about 20 mb of space in the root directory, and does not affect the use of the root directory.
It is worth noting that as the hard disk capacity increases, the Linux kernel cannot be guided to appear again, which is also known as the GB limitation. Unfortunately, Grub cannot boot the Linux kernel in the shard after GB. If you encounter such a situation (I have met it), you should consider attaching/boot to an independent partition located in front of 137GB, or simply move all Linux partitions forward so that the root directory is located before GB.
/Usr/local: It is recommended that you set/opt,/usr or/usr/local to an independent tutorial, which is basically very old. When we use Ubuntu, we usually use the software package manager of the system to install software, and seldom compile and install any software by ourselves. However, we recommend that you use an earlier version for independent/usr,/opt,/usr/local, instead of re-compiling the software when reinstalling the system. However, for most common users, this suggestion is usually meaningless.
/Var: It is recommended that the/var and/tmp independent tutorials are usually server-oriented. Because high-load servers usually generate log files, temporary files, and these files are often changed, separating/var and/tmp is conducive to improving server performance. We use Ubuntu as a desktop, and even some users never care about system logs. Therefore, there is no need to independently Mount partitions for/var and/tmp.
/Home: this may be the only directory worthy of independent partitioning. /Home is the place where the user folder is located. A user may store a large amount of File Information in/home/user. If you mount/home independently, you can immediately reinstall the system even if Ubuntu is killed for no reason, obtain your own documents. Therefore,/home is the only directory that can consider independent Mount partitions.
After reading some of the above introductions, you may already know my suggestions:

Dual-partition solution:
/: At least 3 GB. It is recommended that you give as many points as possible based on the actual situation-especially for users who like to play with various types of software.
Swap: the physical memory is less than or equal to 512 MB. We recommend that you allocate a SWAP with two times the actual physical memory capacity. The physical memory is greater than 512 MB. We recommend that you allocate SWAP with physical memory and other capacity.

Three-zone solution:
/: At least 3 GB. It is recommended that you give as many points as possible based on the actual situation-especially for users who like to play with various types of software.
/Home: 1 GB ~ GB or more, as appropriate.
Swap: the physical memory is less than or equal to 512 MB. We recommend that you allocate a SWAP with two times the actual physical memory capacity. The physical memory is greater than 512 MB. We recommend that you allocate SWAP with physical memory and other capacity.

In addition, we recommend that you install Linux in the primary partition or mount a primary partition under/boot in some old tutorials. In fact, this is not required. All Linux partitions can be in logical partitions. Therefore, do not mislead these old tutorials. Do not waste limited primary partitions. install Linux in logical partitions with peace of mind!

There are so many introductions to preparation knowledge. Are you already sleepy? Okay, I will not hypnotize you. Next we will start to install Ubuntu!

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.