Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.