linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:32:08 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info
Adding a Hard drive in Linux--
In five steps

Written By: shaggy112

This NHF assumes that you have already physically installed your hard drive in your computer and configured it in your computers bios

1. Type "dmesg | more" to find out what the drive is called. If this will be the second drive in your system...it will probably be something like "/dev/hdb" (while the first drive is hda). Once you have found this in dmesg...make a note of it as you will need it later. For this NHF, we will assume that the new drive is /dev/hdb.

2. You must now partition your new disk. In your shell type:

fdisk /dev/hdb2

This will take you to a prompt that says "Command (m for help):". At the prompt, type "p" to display the existing partitions. If you have partitions that you need to delete, type "d", then at the prompt, type the # of the partition that you wish to delete. Next, type "n" to create new.

Type "1" (assuming that this will be the first partition on new drive), and hit enter. Then you will be prompted for the cylinder that you want to start with on the drive. Assuming that this is the first partition on the drive, type "2" (as it is unsafe to start on 1). You will now be asked for your ending cylinder, hit enter to consume the whole drive, or specify cylinder to use only part of the drive (that created /dev/hdb1). If you would like to continue making partitions, repeat this step...otherwise we are through partitioning.

3. Now, we need put a filesystem on the disk (similiar to format in the MS-OS world). To put a clean filesystem on your newly partitioned drive, type:

mkfs /dev/hdb1

Repeat this step as with appropriate partition number, or with multiple new partitions...just type:

mkfs /dev/hdb1 && mkfs /dev/hdb2

This will put a filesytem on each partition, as long as the previous exits with no errors.

4. You will now need to decide the mount point for each new partition on your drive (which would be a directory below /). For this NHF we will mount our new partition in /new.
Type:

mkdir /new

That will be the mount point for your drive. Now you will need to edit "/etc/fstab". You will want to make an entry at the end of the file similiar to this:

/dev/hdb1       /new     ext2          defaults       1   1
After you have created a similiar entry for each partition, write the file.

5. FINALLY, type:

mount -a

This will mount the partions in the directory that you specified in /etc/fstab. If the mount command exits with no errors....you are done!!

Hopefully this NHF has been of some use to you!

Any questions/problems or feedback -- shaggy112



We would like to hear your feedback.
[-NHF Control Panel-]
The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif