what to do with a new harddisk

Jeff Kinz jkinz at kinz.org
Thu May 5 02:44:48 UTC 2005


On Wed, May 04, 2005 at 07:10:22PM -0700, Charles Li wrote:
> I have FC3 installed.  Now I just put in a new HD,
> which use to have Windows on it.  What do I need to do
> to this HD to make FC3 use it, should I reformat it?

Assuming this is a second ide drive:

no need to reformat, unless you have security concerns about the data.

Install the drive
boot up
bring up a root shell/xterm
run fdisk on the drive
delete all the existing partitions
then create a new partition using the whole disk
then write the partition out
exit from fdisk 
run mkfs to create a new file system on that device
mount the new file system on the desired directory.

Looks like this:  (/* means "a comment" )

###################################################################

[root at redline /]# fdisk /dev/hdb       /* start the fdisk program

The number of cylinders for this disk is set to 1870.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p             /* print out the current partition
				    /*table

Disk /dev/hdb: 255 heads, 63 sectors, 1870 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1       638   5120104+  83  Linux
/dev/hdb2           638      1275   5120136   83  Linux

Command (m for help): m        /* print help
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): d               /* delete a partition
Partition number (1-4): 2             /* partition 2

Command (m for help): d               /* delete a partition
Partition number (1-4): 1             /* partition 1

Command (m for help): p               /* print part. table

Disk /dev/hdb: 255 heads, 63 sectors, 1870 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System

Command (m for help): n     /* add a new partition
Command action
   e   extended
   p   primary partition (1-4)
p                                    /* use "primary"
Partition number (1-4): 1            /* start with #1
First cylinder (1-1870, default 1):
Using default value 1              /* use the defaults, Luke
Last cylinder or +size or +sizeM or +sizeK (1-1870, default 1870):
Using default value 1870           /* use the defaults, Luke

Command (m for help): p

Disk /dev/hdb: 255 heads, 63 sectors, 1870 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1             1      1870  15020743+  83  Linux

Command (m for help): w           /* write table to disk
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
[root at redline /]#   /* done w/fdisk  start mkfs now

[root at redline /]# mkfs -t ext2 -v /dev/hdb1   /* make a filesystem
mke2fs 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1880480 inodes, 3755185 blocks
187759 blocks (5.00%) reserved for the super user
First data block=0
115 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632,
2654208

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root at redline /]# mount -t ext2 /dev/hdb1 /my_new_directory

###########################################################################









> 
> Thanks,
> Charles Li
> 
> 
> 		
> __________________________________ 
> Yahoo! Mail Mobile 
> Take Yahoo! Mail with you! Check email on your mobile phone. 
> http://mobile.yahoo.com/learn/mail 
> 
> -- 
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> 

-- 
Jeff Kinz, Emergent Research, Hudson, MA.




More information about the fedora-list mailing list