Page 1 of 1

linux + new hard disk = confusion

Posted: Wed Mar 26, 2003 12:49 am
by Andrew_Baker
So, anyway, I got a new hard disk, installed it on my computer... and now I'm stumped. I'm running Redhat 8, and it has all the man pages and everything, but... MAN!!! man is extensive, man! I can't sort through all of that to figure out how to actually USE my new hard disk. My comp recognizes the existence of the hard disk and even calls it hdb. But, uh, I don't know how to actually use it... right... so....

Re:linux + new hard disk = confusion

Posted: Wed Mar 26, 2003 1:14 am
by sonneveld
been a while... I'm still running slackware 3 on my other machine so this info might be out of date. Redhat 8 might have graphical wotsits.

1) partitioning. use fdisk /dev/hdb (make SURE it's this hardrive's name) and add a ext3 or reis partition.

partitions will be called hdb1,hdb2....

2) formatting. use a tool called mkfs

mkfs -t [type] /dev/hdb1 (or whatever partition)

where type is ext2, ext3 or reis or whatever it's called.

"man mkfs" for more information

3) mounting. use mount. mount -t [type] /dev/hdb1 /mount/myhardrive (or whatever partition)

/mount/myhardrive is made up.. but you could use any directory.. preferably empty.

4) permanently mounting. this way your linux distribution will mount on bootup. try "man fstab" for your filesystem table. this file is stored in /etc/fstab.

typical fstab:

Code: Select all

# device   mount point  type   options   dump  fsck

/dev/hda1  /            ext2   defaults  0     1
hope that helps. or at least gives you somewhere to look.

fsck is an option for file system checking on bootup.

dump is for tape backups i think. (ie, dump this hardrive to tapebackup?) don't worry about that bit.

be careful with fdisk and mkfs 'n whatever. especially under root. You don't want to stuff up your primary disk.

- Nick