Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-12-2002, 11:30 AM   #1
Registered: Jan 2002
Posts: 34

Rep: Reputation: 15
new disk, no can use

Sorry about this again, vmware of course but probably not the reason. Added a new IDE drive as the old one filled up. Boot can see the new /dev/hdb and using fdisk -l I can see it is "blank".
Many hints say use cfdisk, well where can I get it? Part of utilities?
Is there another easy way to "format" the new drive or what do I have to do to get data allocated on it. Message out is
Disk /dev/hdb doesn't contain a valid partition table
Old 12-12-2002, 11:34 AM   #2
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
As root, you can use fdisk /dev/hdb, or you can use cfdisk. It provides a nicer interface than fdisk does, but it essentially does the same job. Which distro are you running, by the way? It comes already installed on some/most.
Old 12-12-2002, 11:35 AM   #3
LQ Newbie
Registered: Dec 2002
Distribution: MDK 9.0
Posts: 8

Rep: Reputation: 0
This is something I wrote for another forum awhile back; I'm just doing a copy-n-paste due to my laziness, but you should be able to get enough info out of it to do what you want....


Adding HD Space to Existing Linux Installation

Essentially, you either need to add a HD or allocate more space from a current HD (if you are dual booting). Here are the steps for doing so, you'll need to be root/su to do this stuff;

1. If you put in another HD, you'll need to partition the drive unless you want one big disk
a. fdisk is the tool of choice here

2. You'll need to format with a Linux file system (ext3 is my pref) --> I'm going to call the 'new' HD hdb.
a. mke2fs /dev/hdbX (repeat for each partition)
b. tune2fs -j /dev/hdbX (repeat for each partition)

3. You'll need to name the new partitions and move/copy files over, this can be where you screw stuff up, because you already have a running system, and now you're going to want to replace directories in the complete system (like you probably have a /usr and a /home partition|directory| file), so if you are going to "transfer" those to the new HD, be sure to read up on doing the "move" at various Linux doc/help sites before doing anything!!!

-- Assuming you want to make /home bigger --
a. prepare to move /home to hdb1
mkdir /temphdb
mount /dev/hdb1 /temphdb

b. copy the files over to the new drive
cd /home
cp * /temphdb (you could tar everything up first, I guess, but that's more trouble than its work if you ask me)

c. prepare to make the change in venue
umount /temphdb
rm -rf /home/*
rm -rf /home/.*

d. make hdb1 the new /home
mount /dev/hdb1 /home

e. repeat for each "new" location/partition (such as /usr, or whatever), mounting as above to the temporary directory, etc.
mount /dev/hdb2 /temphdb

4. You'll need to add a line into /etc/fstab to mount the drive at boot up. Be sure to back up your previous fstab
a. cp /etc/fstab /etc/fstab.bak
b. vi /etc/fstab

-- You probably can use one of the other HD mounting lines as an example, but basically you just change the line as follows;

c. /dev/hdb1 /home ext3 defaults 0 0 (using the first example above, I'm mounting the new HD partition 1 to /home).

Appendix: One tool I've used before within the GUI is DiskDrake, which will allow you to work on the partitions.

Good luck!

Old 12-12-2002, 12:40 PM   #4
Registered: Jan 2002
Posts: 34

Original Poster
Rep: Reputation: 15
Thx, works!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk Error with Promise ultra133TX2 Controller and UDMA 120 GB Maxtor Disk samudhanar Linux - Hardware 3 06-13-2006 07:14 PM
disk to disk backup for debian/Mempis on bootable cd-- advice loninappleton Linux - Software 3 05-27-2005 02:00 AM
Reclaim disk partition from hard disk installation EStester Linux - General 1 03-09-2005 12:25 PM
Creating an ISO from a Disk(Unreal Tournament 2003 Disk 2) Mustard010 Linux - General 15 11-12-2003 08:45 AM
Installing Slack using Boot Disk (root disk stalls!) guardian653 Slackware 3 10-07-2003 05:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration