Login
Immutable PageDiscussionInfoAttachments
neotaso/GentooInstall 2nd

MMA

マシン

戦闘ログ

準備

Round 1

boot: gentoo

# ifconfig
# passwd
# /etc/init.d/sshd start

ここから先はリモートから操作する(隣の端末)

コピペが使えて楽

Round 2

# fdisk /dev/sda

sda1

/boot

64MB

ext2

sda2

swap

512MB

(swap)

sda3

/

20GB

btrfs

(空き)

約375GB

(none)

# fdisk

fdisk

# mkfs.ext2 /dev/sda1
# mkfs.btrfs /dev/sda3

# mkswap /dev/sda2
# swapon /dev/sda2

# mount /dev/sda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/sda1 /mnt/gentoo/boot

Round 3

# cd /mnt/gentoo
# links http://www.gentoo.org/main/en/mirrors.xml

# tar xvjpf stage3-hogehoge
# tar xvjf portage-latest.tar.bz2 -C /mnt/gentoo/usr

# emacs ./etc/portage/make.conf

CFLAGS="-O2 -march=core2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"

Round 4

インストールのお時間です

# cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

# mount -t proc none /mnt/gentoo/proc
# mount --rbind /dev /mnt/gentoo/dev

# chroot /mnt/gentoo /bin/bash
chroot: failed to run command '/bin/bash': Exec format error

# env-update
# source /etc/profile

# emerge --sync

# mirrorselect -io >> /mnt/gentoo/etc/portage/make.conf
# mirrorselect -iro >> /mnt/gentoo/etc/portage/make.conf

# eselect profile list
# eselect profile set x

# less /usr/portage/profiles/use.desc

# nano -w /etc/portage/make.conf

USE="bindist mmx sse sse2 -oss alsa canna cjk cdr dvd emacs imagemagick java mozilla mule ruby unicode usb ipv6 X"

# nano -w /etc/locale.gen

//英語日本語関連のコメントアウトを外す
ja_JP.SHIFT_JIS SHIFT_JIS //追加

# locale-gen

# ln -sf /usr/share/zoneinfo/Japan /etc/localtime

# emerge gentoo-sources

# emerge genkernel
# genkernel --menuconfig all

# nano -w /etc/fstab

/dev/sda1  /boot      ext2  defaults            1 2
/dev/sda3  /          btrfs noatime             0 1
/dev/sda2  none       swap  sw                  0 0
/dev/cdrom /mnt/cdrom auto  noauto,user         0 0

proc       /proc      proc  defaults            0 0
shm        /dev/shm   tmpfs nodev,nosuid,noexec 0 0

Round 5

# echo hostname="Myucel" > /etc/conf.d/hostname
# echo my_domain_lo="neota.so" >> /etc/conf.d/net

# nano -w /etc/conf.d/net

config_enp2s0="192.168.0.128 netmask 255.255.255.0 brd 192.168.0.255"
routes_enp2s0="default via 192.168.0.1"

# ls /etc/init.d
# ln -s net.lo net.enp2s0
# rc-update add net.enp2s0 default
# rc-update add sshd default //しれっと追加

 # nano -w /etc/conf.d/keymaps //jaに

# emerge syslog-ng
# rc-update add syslog-ng default

# emerge dhcpcd

# emerge btrfs-prog

Round 6

# emerge grub
# nano -w /boot/grub/grub.conf

neotaso/GentooInstall 2nd (last edited 2014-02-06 15:16:51 by neotaso)