Rabu, 27 Juni 2012

Install LiveDVD 11.2 to hard disk drive

Here is how to install the Gentoo LiveDVD 11.2 to Hard Disk Drive (HDD) This is inspired by old "how to" with little adjustments. HOWTO_Lightning_fast_install_from_LiveCD [1]
Steps to follow: Boot into the LiveDVD and create your filesystems
open terminal and
sudo su -
fdisk /dev/sda
And partition the HDD and format and mount to (/mnt/gentoo and /mnt/gentoo/boot) etc
Copy the DVD to your hdd (around 8.5GB)
eval `grep '^ROOT_' /usr/share/genkernel/defaults/initrd.defaults`
cd /
cp -avx $ROOT_LINKS /mnt/gentoo
cp -avx $ROOT_TREES /mnt/gentoo
cp /etc/passwd /etc/group /mnt/gentoo/etc
You might want to drop the "-v"s on the cp operations in order to not jam important error messages. Apparently due to the underlying aufs messing up inode numbers, it has been observed that cp attempts to make hardlinks in strange places. If you encounter this, try copying the affected subtrees once more, over the first attempt.
Finish the system and chroot into it.
mkdir /mnt/gentoo/proc /mnt/gentoo/dev
cd /mnt/gentoo/dev
mknod -m 660 console c 5 1
mknod -m 660 null c 1 3
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
mkdir /mnt/gentoo/sys
chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile
Remove the autoconfig service from default boot otherwise your root password is reset every time it starts.
rc-update del autoconfig default
Configure FSTAB
File: nano -w /etc/fstab
/dev/sda1   /boot        ext2    defaults,noatime     1 2 
/dev/sda2   none         swap    sw                   0 0 
/dev/sda3   /            ext3    noatime              0 1 
/dev/cdrom  /mnt/cdrom   auto    noauto,user          0 0 
proc        /proc        proc    defaults             0 0 
shm         /dev/shm     tmpfs   nodev,nosuid,noexec  0 0 
Copy kernel image and initramfs from the LiveDVD to your new system.
mkdir -p /mnt/cdrom/
mount /dev/cdrom /mnt/cdrom/
cp /mnt/cdrom/boot/gentoo /boot/kernel
cp /mnt/cdrom/boot/gentoo.igz /boot/initramfs
Configure and install GRUB
File: nano -w /boot/grub/grub.conf
default 0 
timeout 30 
title Gentoo Linux          
root (hd0,0) 
kernel /boot/kernel real_root=/dev/sda3 
initrd /boot/initramfs 
grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
You can reboot now

Tidak ada komentar:

Posting Komentar