On Wed, 19 Mar, Taylor Mr wrote:
This is a simple one and I assume I will be blasted for it but..I have a
working system with a smallish drive. I want to change it over (and use
the old drive in another machine) to a new drive without too much
headache. What is the easiest procedure?
Let me start the ball rolling. A year or so ago I wanted to dedicate a HDD to
running Squid. These are the notes I kept from that exercise. I think I was
using Redhat 6 at the time.
The disk was already in the machine.
Logged on as root.
(Lines starting with # are commands to run)
# fdisk /dev/hdb
You get a colon prompt. Type p to print out current partition table. I noted
down start , end [525[, blocks , ID , system [linux] from this
info - numbers in [ ] are what I noted down. Type n at this colon to start the
dialogue to create a new partition. The information you noted will allow you to
make decisions on partitioning the drive.
# mkdir /usr/local/squid
Edit /etc/fstab to give /dev/hdb2 (this is the partition you created on hdb) a
directory where it mounts - in my case /usr/local/squid.
Create the filesystem for /dev/hdb2 with
# mke2fs -c /dev/hdb2 4144770
This 4144770 number comes from blocks from the partition table info. My notes
do say that maybe I should have done this straight after creating the partition
Then to make the changes to /etc/fstab take effect do:
# /bin/mount -a
I'd appreciate it if other people could critique and add to this.
St. John's School, Northwood