linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:39:31 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info

How to create a multiple partition system

(cont'd)
I don't have enough space free for a 1GB partition

Well, if your hard drive is just completely full, with no more room for partitions and you really want to try out multiple partitions, then I think it's actually easiest to backup the most important data that you can somehow and then reinstall with the multi-partition strategy. But, there are other ways of doing this:

The bottom line is, you need somewhere to store an archive with all your stuff in it while you delete your big partitions, so that you can make room for more. You will most likely want to have a full-featured bootdisk to do this sort of stuff, though. Especially if you plan on using the Internet for storage, because you will need to have PPP or Ethernet or whatever working with that bootdisk because we are temporarily cleaning off the entire hard drive of all data.

The bottom line is this. You have to compress all your data into big files and put it somewhere else. Then, using the bootdisk, we will go into fdisk, and delete all the partitions. From there, we then access the files that we put "somewhere else", and uncompress them into their appropriate places. This is actually a common way of changing partition configurations around when you already have a multiple partition setup. For example, I recently moved all my /usr stuff from a 1GB partition to a 2GB partition that way (well, not by deleting all my partitions of course, but you get the idea).

Probably the easiest and most convenient way to do this would be to use an existing Windows partition to do this. It has the biggest and quickest storage capacity (typically) of all the choices mentioned above. You just need to make sure you get a bootdisk that will allow you to mount Windows partitions so you can access the data once you are done.

The second easiest would probably be using recordable media like CD-R's, simply because CD-ROM drives are supported by just about every bootdisk I've ever seen.

The most painful, though potentially the largest file store, would be using the Internet to store your files while we mess with the partitions. But, with your bootdisk, you need to make sure that you get a bootdisk that will support your connection to the Internet as well as having some basic binaries such as ftp (or ncftp, as I prefer). This is also generally a much slower method because of the slow connection speeds to the 'net compared to the fast access times of disks and CD's (relatively speaking).

So, what you need to do before even thinking about this journey is to:

a - pick your method of storage
b - get a bootdisk that will accomodate that method
c - make sure you have everything important backed up!

Once that is done, things get much simpler.

The next step in this process is to create the archives that you will uncompress later. You have a few choices when it comes to compression, but I always use tar and gzip because I have never seen a bootdisk without those either. You may choose to use a compressor like bzip2 however because of a better compression algorithm, especially if you are using the Internet as your method of storage. However, I'm going to show you how to use tar and gzip in my examples from here on out.

The archives you need to make correspond to the partition scheme you should have already drawn up. Basically, you tar and gzip up those directories and then you simply inflate them into the partitions we create with the bootdisk once the data is off the drive. For example (continuing with my one above), say /usr/src was one of the partitions in my scheme. I'd want to tar up the /usr/src directory and then inflate it when I got my partitions set up. Here's how to tar and gzip it up:


tar cvfz _usr_src.tar.gz /usr/src

I like using underscores where the /'s normally go just to make sure that there is no confusion which archive that is when I get them all made. You may also want to omit the "v" because this will print out a lot of information. Also, obviously, substitute the filename (mine was _usr_src.tar.gz, yours should end in .tar.gz as well, though it's not compulsory), and directory (mine was /usr/src) that is appropriate to your archiving.

So, once I do this for ALL the partitions on my scheme, I move them to my storage area (for me, it's my Windows partition).

Then, I pop in my bootdisk and reboot.

Once everything comes up on the bootdisk, I make ABSOLUTELY SURE that I:

a - can access the files I just moved
b - that I have BACKED UP all my important stuff!

Once I have verifired both a and b, as well as verifying that I really really really want to go to this multi-partition setup, then I go ahead and fire up fdisk and remove all my Linux partitions and add new ones according to my strategy (see my fdisk NHF if necessary for a refresher). Then, if I have room for them all on one of my partitions, I copy all those archives down onto a Linux partition (notice I said copy and not move).

Once they are copied down to the Linux partition, I feel much much better. The next thing to do is to mount the partitions according to plan. That was discussed in section 3 above, so refer to that section and then come back here. You need to do this for all the partitions (or, at least you might as well do it for all of them right now). Then, you need to inflate the archives. If you did them the way I told you, this should be very easy. First, make sure the archive is in the root (/) directory. If it's not on that partition right now, move it there. Then, simply issue practically the same tar command:


tar xvfz <filename>.tar.gz

or, in this case it'd be:


tar xvfz _usr_src.tar.gz

At this point, a list of files should go flying by - these are the files being inflated. They should also all have a leading path of some sort - like mine is /usr/src - unless, of course, this is your root (/) partition archive (which I normally name _.tar.gz, even though it's odd... it's consistent). Once you have successfully inflated each of the archives, you may delete them all from your Linux partitions (and from those partitions only), but do NOT delete them on your storage media just yet, we may need them later.

The next thing you need to do is configure your /etc/fstab so that things work right on startup. See section 5 above on that. Once that is done, remove the bootdisk and reboot, and (if you believe in doing so) pray. If things DO go wrong and it won't boot correctly, there's not much lost in doing a reinstall. You still have your partition scheme and your archives somewhere, right? Well, reinstall, and simply inflate the archives on top of the freshly installed files and see if that works. If this is done correctly, it should not hose your system, though I won't say that I have never hosed my system by doing things like this.

Well, with any luck, you have just set up your system for its new multi-partition setup. If things didn't go perfectly, I apologize. Otherwise, have fun!




Would you like to have your article published online? Send them in to
newfiles@linuxnewbie.org
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