Login
Immutable PageDiscussionInfoAttachments
neotaso/GentooInstallBattle 3rd

MMA

マシン

戦闘ログ

Round1

sda1

/boot

128MB

ext3

sda5

/

512MB

btrfs

sda6

(lvm)

128GB

-

lv_usr

/usr

4GB

btrfs

lv portage

/usr/portage

2GB

btrfs

lv_var

/var

1GB

btrfs

lv_tmp

/tmp

4GB

btrfs

lv_opt

/opt

512MB

btrfs

lv_home

/home

4GB

btrfs

lv_swap

swap

4GB

swap

(LVM空き)

-

-

(空き)

-

約170GB

-

# mkfs.ext3 /dev/sda1
# mkfs.btrfs /dev/sda5
# pvcreate /dev/sda6
# vgcreate rootvg /dev/sda6
# lvcreate -L4G -nlv_usr rootvg
 //同様のコマンドをすべてのLVMパーティションに行う

# mkfs.btrfs /dev/rootvg/lv_usr
 //(ry

# mkswap /dev/rootvg/lv_swap
# swapon /dev/rootvg/lv_swap
# mount /dev/sda5 /mnt/gentoo
# cd /mnt/gentoo
# mkdir boot usr var tmp opt home proc dev
# mount /dev/sda3 /mnt/gentoo/boot
# mount /dev/rootvg/lv_usr /mnt/gentoo/usr
# mkdir /mnt/gentoo/usr/portage
# mount /dev/rootvg/lv_portage /mnt/gentoo/usr/portage
# mount /dev/rootvg/lv_var /mnt/gentoo/var
 //(ry

# mkdir /mnt/gentoo/tmp/portage

# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev

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

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

# emacs /etc/portage/make.conf

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -march=core2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="bindist mmx sse sse2 bash-completion alsa cdr dcd emacs ipv6 unicode usb X"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
PORTAGE_TMPDIR="/tmp/portage"

INPUT_DEVICES="keyboard mouse"

LINGUAS="ja"

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

# emacs etc/locale.gen //英語と日本語の#を外す

Round 3

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

# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"
(chroot)# ln -sf /usr/share/zoneinfo/Japan /etc/localtime

以下chrootは省略

# emerge --sync
# emerge portage

# emerge -ev world

# rm -rf /tmp/portage/*
# emerge --resume
# energe --resume --skipfirst //どうにもならない時

# dispatch-conf

# emerge -av lvm2 grub gentoolkit syslog-ng pciutils usbutils bind-tools sudo vim btrfs-progs genkernel bash-completion

# /etc/conf.d/net //IPアドレスの設定
# cd /etc/init.d
# ln -s net.lo net.enp2s0
# rc-update add net.enp2s0 default
# rc-update add sshd default
# passwd

# emacs /etc/conf.d/keymaps //jp106とcaps2ctrlを

Round 4

# emerge gentoo-sources
# genkernel --menuconfig all //btrfsを加える

# mkdir /boot/grub
# emacs /boot/grub/grub.conf

default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux xxx
root (hd0,0)
kernel /boot/kernel-genkernel-hoge root=/dev/ram0 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-hoge

# grep -v rootfs /proc/mounts > /etc/mtab
# grub2-install /dev/sda //よくわからんけど2が入ってた

(chroot) # exit
# umount hogehoge //省略
# reboot

# vgscan
# vgchange -ay
//以下マウント

# genkernel --lvm --menuconfig all
// ついでにnvidia関係のも入れておく
# emerge nvidia-drivers

# emacs /etc/default/grub

GRUB_CMDLINE_LINUX="dolvm"

# grub2-install /dev/sda
# grub2-mkconfig -o /boot/grub/grub.cfg

neotaso/GentooInstallBattle 3rd (last edited 2014-02-14 10:46:14 by neotaso)