hdparm -d1c1u1A1m16a64 /dev/hda
hdparm -d1c1u1 /dev/cdrom

mke2fs /dev/hda6
mke2fs -j /dev/hda8
mkswap /dev/hda7
swapon /dev/hda7
mount /dev/hda8 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/hda6 /mnt/gentoo/boot

cp -af /mnt/livecd/* /mnt/gentoo/

cd /mnt/gentoo/boot
ln -s kernel-genkernel-x86-2.6.15-gentoo-r5 vmlinuz
ln -s System.map-genkernel-x86-2.6.15-gentoo-r5 System.map
ln -s initramfs-genkernel-x86-2.6.15-gentoo-r5 initrd.img
cd /mnt/gentoo/etc
rm localtime
ln -s ../usr/share/zoneinfo/PRC localtime
rm /mnt/gentoo/etc/runlevels/default/pwgen

CFLAGS=”-O2 -march=pentium4 -pipe -fomit-frame-pointer”
CHOST=”i686-pc-linux-gnu”
CXXFLAGS=”${CFLAGS}”
MAKEOPTS=”-j2″
GENTOO_MIRRORS=”http://gentoo.139pay.com/ http://ftp.gentoo.or.kr/ http://mymirror.asiaosc.org/gentoo/”
SYNC=”rsync://gentoo.139pay.com/gentoo-portage”
USE=”cjk nls zh_CN nptl nptlonly”

/dev/hda6 /boot ext2 noauto,noatime 1 2
/dev/hda8 / ext3 noatime 0 1
/dev/hda7 none swap sw 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,ro 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec,size=128m 0 0

all_args=”-d1c1u1″
hda_args=”-d1c1u1A1m16a64″

HOSTNAME=”shunz”

timeout 10
default 0
fallback 1
splashimage=(hd0,0)/grub/splash.xpm.gz

title Gentoo Linux Without X
root (hd0,5)
kernel /vmlinuz root=/dev/ram0 real_root=/dev/hda8 ramdisk_size=8192 vga=791 nox
initrd /initrd.img

title Gentoo Linux With X
root (hd0,5)
kernel /vmlinuz root=/dev/ram0 real_root=/dev/hda8 ramdisk_size=8192 vga=791
initrd /initrd.img

title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1

[coolcode]grub-install –root-directory=/mnt/gentoo –no-floppy hd0[/coolcode]

发表回复