Solved

Adding Hard Disk to Linux

Posted on 1997-09-07
1
212 Views
Last Modified: 2013-12-15
I have used up all the space on my existing HD, and have added another to my system.  I have partitioned with Linux
Fdisk.  I need to format it and get my system(slackware 3) to recognize it.  What are the steps, and how do I complete them...also, does it require rebuilding the kernel?
0
Comment
Question by:racy
1 Comment
 

Accepted Solution

by:
asmodean earned 50 total points
Comment Utility
It is very easy to add a second hard disk to linux.
You have performed the first step. I assume you partitioned
the disk as type "Linux native".

Next, you need to frmat the disk. This is done using the
"mke2fs" command.

You can type "mke2fs /dev/hdX" to format an ide hard disk.
X is "a" for the first drive, "b" for the second, and so on.
type "man mke2fs" to see some options you can give it, but it
should do a good job in its default configuration. Be warned that
ALL data on the disk you are formating will be lost.

Lastly, you need to modify the /ets/fstab file to tell linux to
mount your disk when it starts up. You need to add a line
of this form to it:

/dev/hdb2       /        ext2        defaults   1   1

The above line means
mount /dev/hdb2 (the second partition of drive 2) in the
directory / using the ext2fs filesystem. Dont worry about the
last three parameters, they are ok being set to "defaults 1 1"

The above line means that drive hdb2 will contain everything
starting with the directory "/" and going deeper. You will need
to choose a directory to mount your new drive on. A good thing
to do is to move the /home directory to your new disk.


k
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now