[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: combining linux partitions



On Tue, 5 Nov 1996, Igor Grobman wrote:

> I've recently installed Debian distribution.  I really like it, so I'd
> like to get rid of my old slackware install, and make the Slackware
> and Debian partition into one.  Is there a program out there that
> would do it.  

why not just reformat the slackware partition with mke2fs and mount it as
/usr or /home or something?

you don't use braindead drive letters like C: and D: under unix - you
can mount any partition to anywhere in the file system hierarchy you
like....need more space on /home? easy, just install a new drive, format
it, transfer the old files over, and mount it as /home.

you don't even need to reboot. if you're extremely careful and know
exactly what you're doing and have a good understanding of how your
system works (e.g. what programs are running and what files they have
open) you can even do it without dropping to single-user mode (not
recommended for novices!!)



if you do this, you'll have to transfer the files on /home or /usr to
the newly formatted partition before you actually mount it.

something like, for example:

# WARNING: IF YOU DON'T UNDERSTAND WHAT THIS IS DOING THEN
# RESEARCH IT FIRST.  LACK OF UNDERSTANDING CAN SCREW UP YOUR SYSTEM.
# DO NOT JUST BLINDLY RUN SCRIPTS WHICH SOME COMPLETE STRANGER OFF THE
# NET GIVES YOU.
#
# first mount the partition to a temporary mountpoint
# XXX = the partition's device node, e.g. /dev/hda2
mount /dev/XXX /mnt

# then copy the files to it
cd /usr
tar cf - . | (cd /mnt ; tar xf -)

# unmount it
umount /mnt

# move the old usr subdirectory out of the way for now.
# you can 'rm -rf /usr.old' later when you're sure everything's
# working
cd /
mv usr usr.old

# mount the new partition as /usr
mkdir usr
mount /dev/XXX /usr



Remember to add an entry to /etc/fstab so that the /usr partition is mounted
at boot time.

> I have Partition Magic, but it refuses to touch Linux partitions...

not surprising...it's a dos program.


Craig

--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: