1. Physically put the new IDE hard drive in.
2. Boot up. Go into /dev and do 'ls | grep hd' to see all devices
starting with hd - ie all the IDE harddrives. In this case the new IDE HDD
was hdg. If it does not show up under /dev check the BIOS and jumper
settings if necessary to ensure the HD is powering up and getting detected.
3. Type 'fdisk /dev/hdg' This opens up the fdisk utility on hdg. We want
to partition it.
3a Type ? for help with fdisk commands if necessary. The ones we need are:
'p' (which means print partition information) to see the partition table
infor for that drive - it should be empty.
'n' (which means new partition) - follow the prompts - default options are
best selected to create a new partition on it called hdg1 which encompasses
the entire drive.
4 Once this is done you can quit out of fdisk. Now the partition is
created, we can format it as per our needs. formating will not work unless
we have a partition to format. Partitions are basically the OS's way of
looking at and interacting with HDs. Type the following:
mkfs -t ext3 -c /dev/hdg1
This should format hdg1 as a ext3 partition.
5 Now we can add it to the list of mounted disks. Since it was replacing
hda1 we need to mount hdg1 as /temp (a temporary location) and copy over the
contents of whatever was mounted on hda1 (in this case /backup2) to hdg1.
Also set the fstab to automatically mount hdg1 where hda1 was the next time
the OS reboots.
So, vi /etc/fstab - replace occurences hda1 with hdg1. Save and exit
cd /
mkdir /temp
mount /dev/hdg1 /temp
cd /backup2
cp -rp * /temp
...
cd /
umount /backup2
mount /backup2 - NOTICE how this time when you do 'df' /backup2 is mounted
on /dev/hdg1
You're done.
2. Boot up. Go into /dev and do 'ls | grep hd' to see all devices
starting with hd - ie all the IDE harddrives. In this case the new IDE HDD
was hdg. If it does not show up under /dev check the BIOS and jumper
settings if necessary to ensure the HD is powering up and getting detected.
3. Type 'fdisk /dev/hdg' This opens up the fdisk utility on hdg. We want
to partition it.
3a Type ? for help with fdisk commands if necessary. The ones we need are:
'p' (which means print partition information) to see the partition table
infor for that drive - it should be empty.
'n' (which means new partition) - follow the prompts - default options are
best selected to create a new partition on it called hdg1 which encompasses
the entire drive.
4 Once this is done you can quit out of fdisk. Now the partition is
created, we can format it as per our needs. formating will not work unless
we have a partition to format. Partitions are basically the OS's way of
looking at and interacting with HDs. Type the following:
mkfs -t ext3 -c /dev/hdg1
This should format hdg1 as a ext3 partition.
5 Now we can add it to the list of mounted disks. Since it was replacing
hda1 we need to mount hdg1 as /temp (a temporary location) and copy over the
contents of whatever was mounted on hda1 (in this case /backup2) to hdg1.
Also set the fstab to automatically mount hdg1 where hda1 was the next time
the OS reboots.
So, vi /etc/fstab - replace occurences hda1 with hdg1. Save and exit
cd /
mkdir /temp
mount /dev/hdg1 /temp
cd /backup2
cp -rp * /temp
...
cd /
umount /backup2
mount /backup2 - NOTICE how this time when you do 'df' /backup2 is mounted
on /dev/hdg1
You're done.
No comments:
Post a Comment