Hard Disk Install Setup Tips: Difference between revisions
No edit summary |
|||
(16 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<div class="wikiNote">[[Image: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 "[[Getting Started#To Install To Hard Disk|To Install To Hard Disk]]" section on the [[Getting Started]] page.</div> | |||
== nsthdinstall tips == | |||
Try this, assuming your boot partition is sda1, and your swap is sda5: | |||
<div class="screen"> | |||
<div class="screenTitle">''Command:'' "nsthdinstall"</div> | |||
<div class="userInput"><span class="prompt">[root@probe-9 root]# </span>nsthdinstall --device /dev/sda1 --format --label "NST v1.8.0" --swap-devices /dev/sda5 --swap-format-label --grub-install</div> | |||
</div> | |||
== Partitioning == | |||
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: | |||
{| cellspacing="0" border="1" | |||
|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 == | == HD Installation Recipe == | ||
The following details a set of steps to Partition Hard disk to accept two NST installations and 3 ethernet NICs. | 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 === | === HD Install === | ||
Line 8: | Line 62: | ||
* Log in | * Log in | ||
* cfdisk | * cfdisk | ||
** create 2G NST install #1 /dev/ | ** create 2G NST install #1 /dev/sda1 Make bootable | ||
** create 2G NST install #2 /dev/ | ** create 2G NST install #2 /dev/sda2 | ||
** Create 1G swap /dev/ | ** Create 1G swap /dev/sda3 | ||
** create /dev/ | ** create /dev/sda4 for /var/nst | ||
* reboot | * reboot | ||
* nsthdinstall | * nsthdinstall | ||
nsthdinstall --device /dev/ | nsthdinstall --device /dev/sda2 --format --label "NST v1.8.0-2" --swap-devices /dev/sda5 --swap-format-label --grub-install | ||
nsthdinstall --device /dev/ | 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. | * reboot to HD. | ||
Line 22: | Line 76: | ||
* Create var partition, and move var to it: | * Create var partition, and move var to it: | ||
mke2fs -c /dev/ | mke2fs -c /dev/sda4 | ||
mkdir /newvar | mkdir /newvar | ||
mount /dev/ | mount /dev/sda4 /newvar | ||
cd /var | cd /var | ||
cp -ax * /newvar | cp -ax * /newvar | ||
Line 32: | Line 86: | ||
* Edit /etc/fstab to add | * Edit /etc/fstab to add | ||
/dev/ | /dev/sda4 /var ext2 defaults 1 2 | ||
* reboot | * 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 === | === Set Host Name === | ||
Line 67: | Line 128: | ||
GATEWAY=10.9.1.1 | GATEWAY=10.9.1.1 | ||
NETMASK=255.255.255.0 | NETMASK=255.255.255.0 | ||
BROADCAST= | BROADCAST=10.9.1.255 | ||
NETWORK=10.9.1.0 | NETWORK=10.9.1.0 | ||
# onboard nic management interface | # 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 [http://support.ntp.org/bin/view/Servers/StratumTwoTimeServers 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. |
Latest revision as of 06:29, 4 November 2010
nsthdinstall tips
Try this, assuming your boot partition is sda1, and your swap is sda5:
Partitioning
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 DEVICE=eth0 BOOTPROTO=none ONBOOT=yes # PROBE PORT 3com NIC
[root@nprobe9 network-scripts]# cat ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none ONBOOT=yes # PROBE PORT 3com NIC #2
[root@nprobe9 network-scripts]# cat ifcfg-eth3 DEVICE=eth3 BOOTPROTO=static ONBOOT=yes IPADDR=10.9.1.6 GATEWAY=10.9.1.1 NETMASK=255.255.255.0 BROADCAST=10.9.1.255 NETWORK=10.9.1.0 # 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.