Copy Gentoo livecd system to hard disk howto

Source: Internet
Author: User

If I say that I can install a Gentoo Linux Desktop System in less than 15 minutes, you cannot believe it, because it usually takes about a week to install Gentoo desktop system normally, only 15 minutes? Dreaming? After reading the methods described below, you will never have any doubts: P

First, start the system with livecd. When prompted by boot, enter Gentoo NOx and directly enter the text mode. set two optimization parameters:

Hdparm-d1c1u1a1m16a64/dev/hda
Hdparm-d1c1u1/dev/CDROM

Then fdisk partitions the hard disk. If you have already divided the partitions, you can skip this step.

After the partition is completed, format the partition. Here I suppose the partition on the hard disk is: hda1-hda5 is used in windows, hda6 is/boot, hda7 is swap, hda8 is the root partition, now format the corresponding 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

Start copying the system on livecd:

CP-AF/mnt/livecd/*/mnt/Gentoo/

After the replication is complete, modify the following 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 changing the root password after each startup, resulting in logon failure.

Modify/mnt/Gentoo/etc/make. conf. Take the single-core CPU as an 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://mydesk.asiaosc.org/gentoo /"
Sync = "rsync: // gentoo.139pay.com/gentoo-portage"
Use = "cjk nls zh_cn nptl nptlonly"

Modify/mnt/Gentoo/etc/fstab. The previous partition conditions are as follows:

/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 defaults 0 0
SHM/dev/SHM tmpfs nodev, nosuid, noexec, size = 128 M 0 0

Modify/mnt/Gentoo/etc/CONF. d/clock and 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

Install grub to MBR

[Coolcode] grub-install-root-directory =/mnt/Gentoo-no-floppy hd0 [/coolcode]

Modify/mnt/Gentoo/etc/shadow, remove the "*" between the two ":" After root, and then reboot.

After the restart, log on to the system as root and set the password with passwd. The system has been installed!

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.