On Tue, 22 Oct 2002 21:07, Ronald Highet wrote:
> I have just purchased a 20gig drive for my laptop and need some info on
> how to transfer my Linux partition onto the new drive.

> My current setup is a 8 gig drive with
> 4 gig winxp partition
> 4 gig debian 3.0 unstable (of course with necessary swap and so on)

> My question is 'is it possible to keep my setup' and just transfer it
> all to the new harddrive.

Assuming your new harddrive can be installed in the computer at the same time 
as the old one or you have another machine which can do that?

If you can't then you'll need to use netcat to get the data out of the laptop 
& across the network.  Guru meditation definately required :-)

Partition the new disk as you want using fdisk or cfdisk -- the latter is 
easier.

Create the file systems on it.
NB make sure the partitons are exactly the same order i.e. numbers as in the 
partiton table on the old disk. 

At this point I think I'd reboot into a rescue disk such as the lnx-bbc cdrom, 
or toms root and boot floppy.

make a mount point for the filesystems on the new drive

mount the empty new / partition.
mount the old / partition.

Use find and cpio to copy the old / partition to the new one

find /mnt/oldroot | cpio -pdv /mnt/newroot 
( check the cpio flags with the manual, it's late & it's off the top of my 
head. man cpio for the whole ugly story. remember to set the option to not 
change the times )

now mount the other new partitions and and repeat the above command
you will get lots of messages about existing files. ignore them,
shutdown

remove the old disk, put the new disk onto the primary ide disk channel
restart the rescue disk.

mount the new disk's partitions 

chroot to make the new disk root partition be the root of the file system
run lilo to establish a boot record.
remove rescue floppy
shutdown

Anoint machine with Penguin Pee, cross legs, fingers etc

boot

rejoice

worked for me a few years back.


> It took me bloody ages to get the debian
> working correctly as I need all sorts of weird and wonderful kernel
> patches and fix it's to get my very strange network card going and the
> screen at the correct resolution.


> To top it off Im also running out of space on the 4gig partition and
> would like to when I copy the current setup to my new harddrive but into
> a larger (10-15gig) partition for future expansion.

> The setup is a:
> Dell Inspiron 3800
> Mobile pIII 700
> With 128mb ram
> Belkin Cardbus PCMCIA nic

> Maybe Im dreaming and will need to reinstall,
I don't think so.

> but the last time I did
> that I almost had to pawn my kidneys to get help getting it going, and I
> only have so many kidneys you know!
Student's rates -- right arm and left eye only.  

If you get totally stuck I expect that you could bring your machine to the 
CLUG meeting on the 14 Nov and say please nicely to some geek, and you'll be 
fixed up in no time.

> Cheers
> Ronald
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]

-- 
Sincerely etc.,
Christopher Sawtell

Reply via email to