gentoo安装个人总结2015版

#disk
parted -a optimal /dev/sda
    (GPT)
    mklabel gpt
    unit mib
    mkpart primary 1 3
    name 1 grub
    set 1 bios_grub on
    mkpart primary 3 131
    name 2 boot
    mkpart primary 131 -1
    name 3 rootfs
    set 2 boot on
mkfs.ext2 /dev/sda2
mkfs.ext4 /dev/sda3
##################################
#mount the disk
mount /dev/sda3 /mnt/gentoo
cd /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda2 /mnt/gentoo/boot
##################################
#stage3
links http://mirrors.stuhome.net/
    download somethings
tar xvjpf stage3-xxxxxx.tar.bz2 --xattrs
nano -w ./etc/portage/make.conf
    CFLAGS="-march=native -02 -pipe"
    MAKEOPTS="-j2"
    ACCEPT_KEYWORDS="~amd64"
cp -L /ect/resolv.conf ./etc/
##################################
#chroot
mount -t proc proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
chroot ./ /bin/bash
source /etc/profile
##################################
#locale
emerge-webrsync
eselect porfile set xx
    USE:/usr/portage/profiles/use.desc
    USE:systemd -consolekit
echo "Asia/Chongqing" > /etc/timezone
emerge --config sys-libs/timezone-data
vim /etc/locale.gen
locale-gen
eselect locale set 3
env-update && source /etc/profile
##################################
#emerge
emerge --ask sys-kernel/gentoo-sources
eselect kernel set xx
emerge -a sys-apps/pciutils
cd /usr/src/linux
make menuconfig
    see wiki.gentoo.org/wiki/Systemd
make && make modules_install && make install
mkdir -p /boot/efi/boot
cp /boot/vmlinuz-* /boot/efi/boot/bootx64.efi
emerge systemd
emerge --deselect sys-f-/udev
ln -sf /proc/self/mounts /ect/mtab
emerge -av grub
grub2-install /dev/sda (bios)
grub2-install --target=x86_64-efi --efi-directory=/boot (uefi)
grub2-mkconfig -o /boot/grub/grub.cfg
vim /etc/fstab
    do the somethings that you want.
vim /etc/default/grub
    GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"
localectl set-keymap dvorak
localectl set-x11-keymap dvorak
systemctl enable systemd-networkd.service
ln -snf /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl enable systemd-resolved.service
ln -s /etc/init.d/net.lo /etc/init.d/net.enp0s3
############################
#skill
#see the information of <package>
emerge -vp <package>
#find installed package documentation
equery files <package> | less
#clean the package
emerge --depclean
revdep-rebuild #app-portage/gentoolkit
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值