티스토리 뷰
Gentoo Installation Checklist
Create three partitions. 128MB for /boot, 32GB which same memory size for swap and the rest for /
# cfdisk /dev/sda
Format the three paritions:
# mkfs.ext2 /dev/sda1
# mkfs.ext4 /dev/sda3
# mkswap /dev/sda2 && swapon /dev/sda2
Mount Partitions.
# mkdir -pr /mnt/gentoo
# mount /dev/sda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/sda1 /mnt/gentoo/boot
Get Stage3 image.
Find nearest mirror from http://www.gentoo.org/main/en/mirrors2.xml
# cd /mnt/gentoo
# wget http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64/stage3-amd64-20140410.tar.bz2
# tar xjpf stage3*
Chroot
# cd /mnt/gentoo
# mount -t proc none proc
# mount --rbind /sys sys
# mount --rbind /dev dev
# cp /etc/resolv.conf etc
# chroot . /bin/bash
# source /etc/profile
Portage
# mkdir /usr/portage
# emerge-webrsync
User accounts
# passwd
# user add -g users -G wheel,portage,audio,void,usb,cdrom -m ${USER_NAME}
# passwd ${USER_NAME}
Configure System
Configure /etc/fstab to match the actual partitioning performed in the step above:
# /etc/fstab
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda3 / ext4 noatime 0 1
/dev/sda2 none swap sw 0 0
Set perferred Portage options
# /etc/portage/make.conf
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# Do NOT change CHOST setting
CHOST="x86_64-pc-linux-gnu"
# Choose desired USE flags
USE="alsa usb"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
Timezone
Set the appropriate timezone
# ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
Kernel
If sys-kernel/gentoo-sources has been selected
# emerge -av sys-kernel/gentoo-sources sys-kernel/linux-firmware
# cd /usr/src/linux
If things are working nicely in the current install environment, it's possibl to use localyesconfig to select all modules currently loaded by the LivcCD.
# make menuconfig
# make -j2
# make modules_install
# make install
Bootloader
Specify the correct setting for the system's firmware. BIOS/MBR is pc, 64-bit UEFI is efi-64, 32-bit UEFI is efi-32.
# /etc/portage/make.conf : PC BIOS settings for GRUB2
GRUB_PLATFORMS="pc"
A simple GRUB2 configuration file for openrc, please see Install systemd guide if you want to install based on systemd.
# /boot/grub/grub.cfg : Example for openrc.
set default=0
set timeout=1
menuentry "Gentoo" {
linux (hd0,1)/vmlinuz-3.14.4-gentoo root=/dev/sda3 rootfstype=ext4 net.ifnames=0 quiet ro
}
Install grub
# emerge --ask sys-boot/grub
# grub-mkconfig -o /boot/grub/grub.cfg
# grub-install /dev/sda
Install Network tools
# emerge --ask sys-apps/iproute2 net-misc/dhcpcd
Clean up
# exit
# cd /mnt
# umount -R gentoo
# reboot
References.
1. https://wiki.gentoo.org/wiki/Quick_Installation_Checklist
'소프트웨어' 카테고리의 다른 글
Git Configuration (0) | 2016.11.10 |
---|---|
Systemd & Installing Gnome3 from scratch (0) | 2016.11.07 |
ubuntu 14.04 에서 RDP 사용 (0) | 2016.10.13 |
슬랙 사용하기 (0) | 2015.11.20 |
친절한 임베디드 시스템 개발자 되기 강좌 (0) | 2015.11.09 |
- Total
- Today
- Yesterday