# Installing grub howto for slackware/windows
# cd to /root
cd /root
# download the grub source code
wget ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz
wget http://www.linuxfromscratch.org/patches/lfs/6.2/grub-0.97-disk_geometry-1.patch
tar zxvf grub-0.97.tar.gz
cd grub-0.97
# Patch the source
patch -Np1 -i ../grub-0.97-disk_geometry-1.patch
# Configuire the source package
./configure --prefix=/usr
# Compile the source
make
# Install the package
make install
mkdir -v /boot/grub
cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub
# Create the menu.lst for grub
cat > /boot/grub/menu.lst << "EOF"
# Begin /boot/grub/menu.lst
# By default boot the first menu entry.
default 0
# Allow 30 seconds before booting the default.
timeout 30
Use prettier colors.
color green/black light-green/black
# First boot option
title Windows
rootnoverify (hd0,0) <-- this will change debending on partion see below
chainloader +1
# second boot option
title Slackware
root (hd1,1) #<-- this will change debending on partion see below
kernel /boot/vmlinuz-ide-2.4.31 root=/dev/hdb2 ro vga=794 #<-- on this line there is hdb2 this will change from pc to pc
EOF
# Installing GRUB into MBR
grub
root (hd1,1) #<-- this will change debending on partion see below
setup (hd0) #<-- this will allways be the same as the pc looks for hda first to boot the bootloader
quit
#grub uses a difernt way to list disks
#/dev/hda1 = root (hd0,0)
#/dev/hdb2 = root (hd1,1) if you notice grub starts counting at 0 were as linux starts from 1
#/dev/hdc3 = root (hd2,2) the first number is the phsical disk the second number is the partion
#/dev/hdd4 = root (hd3,3)