Quick Install Gentoo

Source: Internet
Author: User
Quick Install Gentoo

If I say I can install a Gentoo Linux desktop system in less than 15 minutes, you can't believe it, because the normal installation of Gentoo desktop system will take about a week, only 15 minutes. You're dreaming. When you look at the way I've described below, there's absolutely no doubt about it anymore: P

First, with the LiveCD boot system, in the boot prompt, input gentoo NOx, directly into the text mode, set two optimization parameters:

Hdparm-d1c1u1a1m16a64/dev/hda
Hdparm-d1c1u1/dev/cdrom

Then FDISK partitions the hard drive, and if you've already divided the area, you can skip this step.

After the partition is finished, format the partition. Here I assume that the partitions on the hard disk are: Hda1-hda5 is Windows use, Hda6 is/boot,hda7 is swap,hda8 is the root partition, now format the appropriate partition, and load:

Mke2fs/dev/hda6
Mke2fs-j/dev/hda8
Mkswap/dev/hda7
Swapon/dev/hda7
Mount/dev/hda8/mnt/gentoo
Mkdir/mnt/gentoo/boot
Mount/dev/hda6/mnt/gentoo/boot

To start replicating systems on LiveCD:

cp-af/mnt/livecd/*/mnt/gentoo/

After the replication is complete, modify some of the configurations:

Cd/mnt/gentoo/boot
Ln-s KERNEL-GENKERNEL-X86-2.6.15-GENTOO-R5 Vmlinuz
Ln-s SYSTEM.MAP-GENKERNEL-X86-2.6.15-GENTOO-R5 System.map
Ln-s INITRAMFS-GENKERNEL-X86-2.6.15-GENTOO-R5 initrd.img
Cd/mnt/gentoo/etc
RM localtime
Ln-s.. /USR/SHARE/ZONEINFO/PRC localtime
Rm/mnt/gentoo/etc/runlevels/default/pwgen

The last step is to prevent the system from automatically modifying the root password each time it is started, resulting in a situation that cannot be logged in.

To modify/mnt/gentoo/etc/make.conf, take the single core Centrino CPU for example:

Cflags= "-o2-march=pentium4-pipe-fomit-frame-pointer"
Chost= "I686-pc-linux-gnu"
cxxflags= "${cflags}"
Makeopts= "-j2″
Gentoo_mirrors= "http://gentoo.139pay.com/http://ftp.gentoo.or.kr/http://mymirror.asiaosc.org/gentoo/"
Sync= "Rsync://gentoo.139pay.com/gentoo-portage"
Use= "CJK NLS ZH_CN NPTL Nptlonly"

To modify the/mnt/gentoo/etc/fstab, take the preceding partitioning scenario as an example:

/dev/hda6/boot ext2 noauto,noatime 1 2
/DEV/HDA8/EXT3 Noatime 0 1
/dev/hda7 None swap SW 0 0
/dev/cdrom/mnt/cdrom iso9660 Noauto,ro 0 0
PROC/PROC proc Defaults 0 0
Shm/dev/shm Tmpfs nodev,nosuid,noexec,size=128m 0 0

Modify/mnt/gentoo/etc/conf.d/clock, set clock= "local"

Modify/mnt/gentoo/etc/conf.d/hdparm

All_args= "-d1c1u1″
Hda_args= "-d1c1u1a1m16a64″

Modify/mnt/gentoo/etc/conf.d/hostname

Hostname= "Shunz"

Modify/mnt/gentoo/boot/grub/grub.conf

Timeout 10
Default 0
Fallback 1
Splashimage= (hd0,0)/grub/splash.xpm.gz

Title Gentoo Linux without X
Root (hd0,5)
Kernel/vmlinuz root=/dev/ram0 real_root=/dev/hda8 ramdisk_size=8192 vga=791 NOx
Initrd/initrd.img

Title Gentoo Linux with X
Root (hd0,5)
Kernel/vmlinuz root=/dev/ram0 real_root=/dev/hda8 ramdisk_size=8192 vga=791
Initrd/initrd.img

Title Windows XP
Rootnoverify (hd0,0)
Makeactive
Chainloader +1

Installing grub to the MBR

[Coolcode]grub-install–root-directory=/mnt/gentoo–no-floppy Hd0[/coolcode]

Modify the/mnt/gentoo/etc/shadow, remove the "*" number from the two ":" Behind the root, and then reboot.

After reboot with root login, with passwd set password, system installation completed.

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.