Hard Disk Install Setup Tips

From NST Wiki
Jump to: navigation, search
Warning.png This page is only relevant to older versions of the NST distribution. If you are using version 2.11.0 or later of the NST, the hard disk installation procedure has changed - see the "To Install To Hard Disk" section on the Getting Started page.

nsthdinstall tips

Try this, assuming your boot partition is sda1, and your swap is sda5:

Command: "nsthdinstall"
[root@probe-9 root]# nsthdinstall --device /dev/sda1 --format --label "NST v1.8.0" --swap-devices /dev/sda5 --swap-format-label --grub-install


The NST installation will fit into a 2 gigabyte partition nicely, if you move the growing /var directory to it's own partition. The following partition guide will work well, if you do move the /var directory.

A good partition setup is as follows:

Partition 1 NST Installation 2 Gigabytes
Partition 2 NST backup Installation 2 Gigabytes
Partition 3 Linux Swap 1 Gigabytes
Partition 4 /var Remaining Disk

Mounting /var to a new partition

After a successful nsthdinstall, and reboot, you will have the /var directory in your base partition. Since this directory can grow quickly due to log files and such, it is advised you move it to it's own partition. Follow these commands to move /var from the base partition to a newly mounted partition. This assumes that /var/sda4 is your new /var partition.

mke2fs -c /dev/sda4
mkdir /newvar
mount /dev/sda4 /newvar
cd /var
cp -ax * /newvar
cd /
mv var oldvar
mkdir var
  • Edit /etc/fstab to add
/dev/sda4            /var              ext2            defaults                        1 2
  • reboot

HD Installation Recipe

The following details a set of steps to Partition Hard disk to accept two NST installations and 3 ethernet NICs. Move /var to a new large partition of it's own.

HD Install

  • Boot From CD
  • Log in
  • cfdisk
    • create 2G NST install #1 /dev/sda1 Make bootable
    • create 2G NST install #2 /dev/sda2
    • Create 1G swap /dev/sda3
    • create /dev/sda4 for /var/nst
  • reboot
  • nsthdinstall
nsthdinstall --device /dev/sda2 --format --label "NST v1.8.0-2" --swap-devices /dev/sda5 --swap-format-label --grub-install   
nsthdinstall --device /dev/sda1 --format --label "NST v1.8.0-1" --swap-devices /dev/sda5 --grub-install       (waste of time to format the swap partition 2x)
  • reboot to HD.
  • Login with nst default password.
  • Create var partition, and move var to it:
mke2fs -c /dev/sda4
mkdir /newvar
mount /dev/sda4 /newvar
cd /var
cp -ax * /newvar
cd /
mv var oldvar
mkdir var
  • Edit /etc/fstab to add
/dev/sda4            /var              ext2            defaults                        1 2
  • reboot

if you are not booting from the correct partition:

boot, when the grub menu is showing hit c for command mode
root (hd0,0)
setup (hd0)
this tells grub to use the boot menu (/boot/grub/menu.lst) on disk 0 partition 0 
the second line is to write the changes to the Master Boot Record on hd0

Set Host Name

nsthostname -n nprobe9

NIC Setup

Set up 3 nics. On my particular system, I used two PCI cards (eth0 and eth1) as probes and the onboard nic (eth2) as the management port

  • cdnet
    • Set probe ports eth0 and eth1 to static
    • Set management port eth2 (the onboard nic) to static, and set ip address 10.<campus>.1.6

[root@nprobe9 network-scripts]# cat ifcfg-eth0
[root@nprobe9 network-scripts]# cat ifcfg-eth1
# PROBE PORT 3com NIC #2
[root@nprobe9 network-scripts]# cat ifcfg-eth3
# onboard nic management interface

System Time Sync

Sometimes when using a VMWare session the time will slow down or perhapes speed up. To correct this just
follow these steps.
- While in X, open a bash prompt and create a script file with a .sh extension in the root directory.
- In the script add the line, "/usr/bin/rdate -s time.chu.nrc.ca". For a list of time servers check this
- don't forget to set it as executable chmod +x /timekeeper.sh 
  link here.
- Open /etc/crontab and add "*/1 * * * root sh timekeeper.sh" (make sure you put the name of the file you
  made earlier.
- Restart the crond service with "/sbin/service crond restart" and the time will now sync every minute.