LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-12-2002, 10:30 AM   #1
sx10
Member
 
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
Sx10
 
Old 12-12-2002, 10:34 AM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
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, 10:35 AM   #3
Skilless
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, 11:40 AM   #4
sx10
Member
 
Registered: Jan 2002
Posts: 34

Original Poster
Rep: Reputation: 15
Thx, works!
 
  


Reply



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 06:14 PM
disk to disk backup for debian/Mempis on bootable cd-- advice loninappleton Linux - Software 3 05-27-2005 01:00 AM
Reclaim disk partition from hard disk installation EStester Linux - General 1 03-09-2005 11:25 AM
Creating an ISO from a Disk(Unreal Tournament 2003 Disk 2) Mustard010 Linux - General 15 11-12-2003 07:45 AM
Installing Slack using Boot Disk (root disk stalls!) guardian653 Slackware 3 10-07-2003 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:59 PM.

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