Thursday, May 24, 2007

Chroot: Gentoo installation steps

mount /dev/hda8 /mnt/gentoo
mount /dev/hda7 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
/usr/sbin/chroot /mnt/gentoo /bin/bash

source /etc/profile && env-update
export PS1="(chroot) $PS1"


###################################

rc-update add net.eth0 default

passwd

useradd -m -G users acardh
# passwd acardh

nano -w /etc/rc.conf

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

emerge vixie-cron
# rc-update add vixie-cron default

emerge dhcpcd

emerge grub
vi /boot/grub/grub.conf
grub
grub> root (hd0,6) (Specify where your /boot partition resides)
grub> setup (hd0,6) (Install GRUB in the MBR)
grub> quit (Exit the GRUB shell)

emerge firefox
emerge aspell



# exit
cdimage ~# cd
cdimage ~# umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
cdimage ~# reboot





# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,10)
# kernel /vmlinuz-version ro root=/dev/hda12
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=15
splashimage=(hd0,10)/grub/splash.xpm.gz
#hiddenmenu
title Fedora Core (2.6.18-1.2257.fc5)
root (hd0,10)
kernel /vmlinuz-2.6.18-1.2257.fc5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-1.2257.fc5.img

title=Gentoo Linux 2.6.18-r6 (genkernel)
root (hd0,6)
kernel /boot/kernel-genkernel-x86-2.6.18-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda8 udev
initrd /boot/initramfs-genkernel-x86-2.6.18-gentoo-r6

#title Fedora Core (2.6.18-1.2239.fc5)
# root (hd0,10)
# kernel /vmlinuz-2.6.18-1.2239.fc5 ro root=LABEL=/ rhgb quiet
# initrd /initrd-2.6.18-1.2239.fc5.img
~