Loading

Friday, July 31, 2009

BT4 PreFinal Manual Installation to Hard Drive

Create the following volumes:

  • /dev/sda1 +64M Partition Boot Sector
  • /dev/sda2 Varies Swap
  • /dev/sda3 Varies /
  • /dev/sda4 Varies Windows (this is optional)

Format Drives

  • root@bt:~# mke2fs /dev/sda1
  • root@bt:~# mkswap /dev/sda2
  • root@bt:~# swapon /dev/sda2
  • root@bt:~# mkreiserfs /dev/sda3

Manually Copy OS Files

  • root@bt:~# mkdir /mnt/bt4
  • root@bt:~# mount /dev/sda3 /mnt/bt4/
  • root@bt:~# mkdir /mnt/bt4/boot
  • root@bt:~# mount /dev/sda1 /mnt/bt4/boot
  • root@bt:~# cp --preserve -R /{bin,dev,home,pentest,root,usr,boot,etc,lib,opt,sbin,var} /mnt/bt4/
  • root@bt:~# mkdir /mnt/bt4/{mnt,tmp,proc,sys}
  • root@bt:~# mount -t proc proc /mnt/bt4/proc
  • root@bt:~# mount -o bind /dev /mnt/bt4/dev/

Kernel BootSplash

  • root@bt:~# cd /media/cdrom0/boot
  • root@bt:~# cp --preserve -R {bootsplash,vmlinuz,initrd.gz} /mnt/bt4/boot/

Switch to Newly Created Installation

  • root@bt:~# chroot /mnt/bt4/ /bin/bash

Edit GRUB

  • root@bt:~# nano /boot/grub/menu.lst

----------------------------------------------------------------------------------
timeout 5 #The number of seconds GRUB should wait before booting an OS
default 0 #The entry which should be booted by default
fallback 1 #The entry which should be booted in the event of the first one failing

splashimage=(hd0,0)/grub/bt4.xpm.gz

# This is an example of using a separate partition for /boot (as in this example)
title BT4 PreFinal
root (hd0,0) # Boot Partition
kernel /vmlinuz root=/dev/sda3 rw vga=0x317 # 0x317 defines the right resolution for the monitor
initrd /initrd.gz
bootsplash

title Microsoft Windows XP Home #An entry for a Windows installation
root (hd0,3)
makeactive
chainloader +1
----------------------------------------------------------------------------------

Installing GRUB (When /boot resides in its own partition as in this example)

  • root@bt:~# grub
  • grub> find /grub/stage1
    (hd0,0)
  • grub> root (hd0,0)
  • grub> setup (hd0)
  • grub> quit

Note: The “root” line must point to the location of your /boot/ partition if you have one. If you do not have one, point it at your / partition.

No comments:

Post a Comment