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