您的位置:首页 > 其它

gentoo 使用 livedvd-amd64-multilib-20140826.iso 安装到硬盘

2015-05-29 10:50 387 查看
/**

* @filename os.linux.gentoo.install.from_livedvd

* @use 用livedvd安装gentoo

*

* 2015-05-29.16:13:52, 下午, 星期五, 第21周 第149天 中国标准时间 +0800

* @access public

* @category

* @package

* @author <root_@126.com>

* @copyright

* @license GPL_v2 <http://www.gnu.org/licenses/gpl-2.0.html>

* @version

* @link

* <http://so-u.info>

* <http://timeline.menu>

* <http://exploreroot.com>

*

* ------------------------------------------------

*

* Write algorithm here

*

*

*

*/

使用 livedvd-amd64-multilib-20140826.iso 安装到硬盘

先下载好后刻录到光盘,或者写入到U盘上,(附下载链接)
http://mirrors.us.kernel.org/gentoo//releases/amd64/20140826/livedvd-amd64-multilib-20140826.iso
{

// -- 正式安装过程 --

用gentoo livedvd 启动

点开konsole

gentoo@livecd ~ $ sudo passwd

gentoo@livecd ~ $ su

livecd gentoo # fdisk /dev/sda

livecd gentoo # mkfs.ext4 /dev/sda1

livecd gentoo # mount /dev/sda1 /mnt/gentoo

livecd gentoo # cp -apfv /mnt/livecd/* /mnt/gentoo

livecd gentoo # cp /mnt/gentoo/etc/portage/make.conf /mnt/gentoo/etc/portage/make.conf.backup.20150528

livecd gentoo # mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf

livecd gentoo # mirrorselect -i -r -o >> /mnt/gentoo/etc/portage/make.conf

livecd gentoo # cp -L /etc/resolv.conf /mnt/gentoo/etc/

livecd gentoo # mount -t proc proc /mnt/gentoo/proc

livecd gentoo # mount --rbind /sys /mnt/gentoo/sys

livecd gentoo # mount --make-rslave /mnt/gentoo/sys

livecd gentoo # mount --rbind /dev /mnt/gentoo/dev

livecd gentoo # mount --make-rslave /mnt/gentoo/dev

livecd gentoo # chroot /mnt/gentoo /bin/bash

livecd gentoo # source /etc/profile

livecd gentoo # export PS1="(chroot) $PS1"

(chroot) livecd / # passwd

(chroot) livecd / # emerge --sync

(chroot) livecd / # ls /usr/share/zoneinfo

(chroot) livecd / # echo "Asia/Shanghai" > /etc/timezone

(chroot) livecd / # emerge --config sys-libs/timezone-data

(chroot) livecd / # nano -w /etc/locale.gen

(chroot) livecd / # locale-gen

(chroot) livecd / # nano -w /etc/fstab // -- 把 / 的类型改成了 noatime --

(chroot) livecd / # emerge --ask net-misc/dhcpcd

(chroot) livecd / # emerge --ask sys-apps/pciutils

(chroot) livecd / # emerge --ask sys-kernel/linux-firmware

(chroot) livecd / # emerge --ask sys-kernel/gentoo-sources

(chroot) livecd / # eselect kernel list

(chroot) livecd / # eselect kernel set 2 // -- 设置链连到新的内核上 --

(chroot) livecd / # ls -l /usr/src/linux // -- 查看一下链连以确认 --

(chroot) livecd / # zcat /proc/config.gz > /usr/src/linux/.config

(chroot) livecd / # cd /usr/src/linux

(chroot) livecd / # make olddefconfig // -- 直接利用原配置 --

(chroot) livecd / # make modules_prepare

(chroot) livecd / # make && make modules_install

(chroot) livecd / # make install

(chroot) livecd / # emerge --ask sys-kernel/genkernel

(chroot) livecd / # genkernel --install initramfs

(chroot) livecd / # emerge --ask sys-boot/grub

(chroot) livecd / # grub2-install /dev/sda

(chroot) livecd / # grub2-mkconfig -o /boot/grub/grub.cfg

(chroot) livecd / # rc-update del autoconfig default // -- 从默认boot中移除启动AutoConfig服务,否则您的root密码是每次启动时复位。--

(chroot) livecd / # exit

livecd gentoo # poweroff

livecd gentoo #

livecd gentoo #

livecd gentoo #

livecd gentoo #

livecd gentoo #

// -- 正式安装过程 --^

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: