RE: transfering amongst partitions
Hrrm, I'll try to explain a bit better this time :-)
I currently have a hard drive laid out like this:
hda1 = NTFS 4Gigs
hda2 = ext2 / 2Gigs
hda5 = swap 128 Megs
hda6 = ext2 /home 2 Gigs
and I want to end up with:
hda1 = ext2 / 4Gigs
hda2 = ext2 /home 4Gigs
hda3 = swap 128 megs
So my idea was, blow away the ntfs partition, and transfer everything over
there, then blow away the other partitions, create a new 4 gig partition and
transfer /home back. My two problems were: what can I use to copy the data
without screwing anything up (I guess cp -ap will work?) and how to tell lilo
where the new kernel is without booting off of a floppy (which, I guess I
could probably work around). As I said, probably making a mountain out of a
molehill, I'm just fairly new at this and don't want to screw up one of our
web servers. The reason I want to do the "giant root partitioning scheme",
is that everytime I start dividing stuff up, I run into a situation where I
have plenty of space on one partition, and am cramped on another. This seems
to be a simple way to avoid that :-)
Thanks for all the suggestions so far, I'm gonna start playing around with
it.
D.A.Bishop
On Fri, 2 Mar 2001 11:14:34 +0200, G.Brits said:
> I will explain it my way , got a bit confused with your explination ..
>
> You have one hard drive lets say 10 GIG. 4 Gig for NT , 2 GIG for var .. and
> what ever
>
> If you don't want any data from the NT drive , do the following
>
> Unmout the NT partition , so when you type in " mount " at the bash , it
> should not be in there ( The NT partition) now you can mke2fs or format that
> partition . so now you have an epty , unmouted partition . Lets say you want
> to use that partition as /var. Make a directory called var2 , and copy all
> of /var into var2 ... so you are copying the /var contents into a folder
> var2. Now unmount the /var partition , since you did not have a /var
> partition , but a /var folder , you can delete it afterwards. now mount /var
> onto the empty partition , so when you are done , and type " mount " at the
> prompt again , it shoul show you that /dev/hdax is now mounted as /var . Now
> just copy the var2 contents into the /var partition .
>
> Reboot if you want to check that everything comes up fine
>
> Regards
>
> G.Brits
> Linux Systems Engineer
> Technology Concepts
> Tel +27 11 803 2169
> Fax +27 11 803 2189
>
> -----Original Message-----
> From: David Bishop [mailto:david@bishop.dhs.org]
> Sent: 02 March 2001 01:21
> To: debian-isp@lists.debian.org
> Subject: transfering amongst partitions
>
>
> So, I trying to convert a machine that has been dual-booting NT and Debian
> for awhile, mainly because I just noticed that I haven't booted into NT in
> over two months :-) I want to reclaim that lost disk space that is
> currently
> an NTFS partition, and that's where I'm stuck. The current layout of the
> drive is hda1=ntfs, hda2=/, hda5=swap, and hda6=/home. hda1 is 4 gigs, and
> hda2 and 6 are two gigs each. Now, I assume it would be easiest to
> re-fdisk/format hda1 to be ext2, then copy all of hda2 over, then hda6 as
> well, delete everything but hda1, and refdisk to make a four-gig hda2, and
> recreate the swap. Sounds easy, right? Well, therein lies the troubles.
>
> First, I don't know of a safe way to transfer all of those files. I've
> tried
> to use tar in the past, but had permision issues (things ended up being
> owned
> by root). I could use dd, but that's a block-by-block transfer, right? So
> the partitions would have to be the same size? cp has the same problems as
> tar, and how does copying device files work? I thought I read that would
> screw stuff up.
>
> Oh, and how do I boot up afterwards? I forgot to mention that there is no
> floppy disk available, so I can't just boot off of a rescue floppy and rerun
> lilo when everything is schootched around.
>
> So, I am undoubtably making a mountain out of a molehill, and I just ask
> that
> you guys not laugh too loudly. Laughing up your sleeve is perfectly
> acceptable, though :-)
>
> TIA and HAND,
>
> D.A.Bishop
>
> P.S. Of course this box is running some web services so it can't be down for
> longer than about 1/2 hour. Just making things easy on me B-)
>
>
> --
> To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
>
>
> --
> To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
Reply to: