Install Gentoo Livedvd to hard drive

Source: Internet
Author: User
Tags system log in python

The importance of Linux is beyond doubt, and has played a lot of distributions before, the beginning of the play is fedora, and later in order to find the server version and installed RHEL5, heard CentOS, on the basis of RHEL5, replaced the Redhat logo, Through the Yum update became CentOS5, as for the desktop release of the photolithography plate on N, with LiveCD also played a lot of Linux, there are Ubuntu, OpenSuse, GOS, Jolicloud, Mono. This time I intend to migrate to the Gentoo and do not intend to change it.  So this is the installation of a diary. The First Evil to fill the background knowledge ~

Master directly skip (many are from the official document, Gentoo document is the name of the detailed, so that not many people seriously read, bad fill is my unfamiliar knowledge ... )

1.Gentoo pronunciation
Gentoo pronunciation is "gen-too" ("Gentoo" in "G" does not accent, it is similar to "gentle" in "G"), the phonetic symbol is roughly [Gen tʊ| | ' Dʒentʊ] (reading wrong pronunciation is a very embarrassing thing, such as Linux, the phonetic symbol for [' li:nэks], you can listen to Linus Torvalds recordings ~)

the fundamental and characteristics of 2.Gentoo
"The fundamental survival of Gentoo is giving users the right to choose", "When you install Gentoo, you will know clearly-you can choose how to compile the software, how to install the Gentoo, and which system log program to use, and so on." "" Gentoo is a fast and modern yuan distribution, with a concise and flexible design concept. Gentoo is built on free software and does not hide any underlying details from the user. ”

3. What is stage in Stage1, Stage2, Stage3
    Gentoo refers to several stages of installation, " Gentoo still provides the tarball of Stage1 and Stage2. But they are prepared for development (releasing engineering teams from Stage1 Tarball generating Stage3 tarball) "Stage in
   grub :" Grub contains several Images files, two basic (required) Stages files (Stage1 and stage2), optional stage (also known as stage1.5), and two network-booted images files Nxgrub and Xegrub). Stage1 is a necessary image file to guide the gurb. Usually it is embedded in the MBR. Or a partition's boot sector. Because the boot sector of the PC is 512 bytes, stage1 is also 512 bytes. The role of Stage1 is to load Stage 2 or stage 1.5 from a local disk. Because of the size limit, stage1 encodes the position of stage2 or stage 1.5, which means that stage1 is not able to recognize the file system format. Stage2 is the core image of GRUB. It handles almost everything (except to load itself) and usually puts him on file systems, but not necessarily. Once you perform the Grub-install install the boot loader, the Stage1 file is not required and can be moved to any location because it has been embedded in the MBR or PBR. Stage1 and Stage2 files are generally located in the/boot/grub/directory, and there are many stage 1.5 files in this directory, and are named in the file system format. Their aim is to build a bridge between Stage1 and Stage2, namely Stage 1 loading stage 1.5, stage 1.5 loading stage2. The difference between Stage1 and stage 1.5 is that stage1 cannot recognize the file system, stage 1.5 can. The

4. What SQUASHFS file system
SQUASHFS is a read-only file system that compresses files and directories stored on it and supports a maximum of 1.024 million bytes of extents to provide a larger compression ratio. is now widely used in the production of LIVE-CD. For example, Gentoo10.1 Livedvd in the Image.squashfs file size of 2.52G, mounted after the copy came out about 9 g, the compression rate can be seen.

5.Portage, emerge, Ebuilds
Portage is a Gentoo package management system that is written entirely in Python and bash, and most users will use the emerge tool for Portage, and of course GUI tools such as Kuroo. When we talk about packages, we usually refer to the names of packages provided by the Portage tree for Gentoo users. The Portage Tree is a collection of ebuilds files that contain the Portage management tool maintenance software (installation, search, query, ...). All the information required, and is placed in the/usr/portage directory by default. Gentoo actually does not "save" any packages. Instead, Gentoo provides such ebuild scripts that can resolve dependencies, obtain source code, and compile executable files for a particular version of your software.

Formal Installation ~

choose the appropriate installation method
1. Use the minimal installation CD provided by gentoo.org, such as Install-x86-minimal-20091103.iso, which requires networking to download Stage3 packages and Portage snapshots during installation
2. Use the universal Install CD provided by gentoo.org, such as Install-hppa-universal-2008.0.iso, does not require networking and has a graphical installation wizard based on GTK or dialog.
3. Will gentoo 10 anniversary version of the Livedvd directly installed to the hard disk, I just choose this method, all kinds of software are configured, very convenient.
PS: As for how to guide, see a person likes, I am accustomed to burning directly into a CD, of course, can also be guided by other means, such as through grub to guide

specific steps Flow:

1. Turn on, choose to boot from CD , when prompted, start LiveCD: #gentoo NOx

2. Partition first, recommended to use Cfdisk, I installed before openSUSE, and Windows is dual-boot, so basically do not change what, first view the partition: #cfdisk/DEV/SDA

For example, my previous two Linux partitions (/boot I did not take out alone),/dev/sda2 is a ext3 partition,/dev/sda3 is a swap partition.

Format partition: #mkfs. ext3/dev/sda2

Activate swap partition: #swapon/dev/sda3

3. Mount the/DEV/EXT3 partition to the Gentoo directory and enter the #mount/dev/sda2/mnt/gentoo

4. Copy the file , under the/mnt, there should be LiveCD this directory, this is the Image.squashfs file mentioned above content, if not, you can mount: #mount-o loop/mnt/cdrom/ Image.squashfs/mnt/livecd

Copy all files: #cp-af/mnt/livecd/*/mnt/gentoo/

5. then mount the proc and dev directory , input: #mount –t proc Proc/mnt/gentoo/proc #mount –o Bind/dev/mnt/gentoo/dev

6. Modify root password , input: #passwd root

Then copy the shadow file to the system you want to install, and then the root password is the one you set: #cp/etc/shadow/mnt/gentoo/etc/shadow

7. Change the environment , input #chroot/mnt/gentoo

This is for the operation of the habit, not to change is also possible

8. Compiling the kernel , using the Genkernel tool directly, is enough by default, #genkernel

If you need to choose which to compile, you can add parameters--menuconfig, about half an hour, compile the end.

9. Modify/etc/fstab, enter #nano/etc/fstab

Add the following two lines

/DEV/SDA2/EXT3 defaults 0 1/dev/sda3 None swap SW 0 0

10. Install grub to MBR, enter #grub-install––root-directory=/––no-floppy hd0

11. Modify the Grub.conf file , modify the name of the kernel, the location of the partition, input: #nano/boot/grub/grub.conf

I have the following

Default 0 Timeout splashimage= (hd0,1)/boot/grub/splash.xpm.gz title Gentoo Linux 2.6.30-r5 Root (hd0,1) Kernel/boot/ke RNEL-GENKERNEL-X86_64-2.6.30-GENTOO-R5 Root=/dev/ram0 real_root=/dev/sda2 initrd/boot/initramfs-genkernel-x86_ X64-2.6.30-GENTOO-R5 title Windows rootnoverify (hd0,0) Chainloader +1

11. Prevent the system from starting after modifying the root password just set , input #rm/etc/runlevels/default/pwgen

12. reboot, input #reboot

No surprises can enter the Gentoo, the default KDE interface has a Gentoo user can automatically login, of course, can also modify their own. The rest is the other configuration, such as displaying Chinese, installing the Chinese input method, configuring the time zone, configuring KDE, installing other software, and solving it in the next article.

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.