LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-13-2004, 06:17 PM   #1
sigma957
Member
 
Registered: Sep 2003
Location: Portland Oregon
Distribution: Debian Testing
Posts: 112

Rep: Reputation: 15
Copying partition to another partiion


I have a debian install that I want to move to a larger partition.

One, can I just copy it to the new one, chroot to it, run lilo and have it work?

And if so, what would be the commands to do so?

Thanks!

Barbara
 
Old 12-13-2004, 07:05 PM   #2
Moloko
Member
 
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
boot in read-only and issue from the top level:
find . -xdev | cpio -pm /mnt

Mount the other partition to /mnt and you can copy everything. If you have the /var on another partition, do the same for this one to the new location.
 
Old 12-14-2004, 03:25 PM   #3
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
I've moved my /home, /var, etc. on the fly simply by

1) mounting the new partition somewhere
2) copying the files from old partition with "cp -a <source> <destination>" to the new one
3) unmounting old and new partitions
4) mounting the new partition to the old's mountpoint

Of course, you have to update your fstab also, and before everything, if needed, to fdisk and mkfs.ext2.

This method has worked for me several times without problems.

The -a switch in cp means "archive" - preserve file permissions and links.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help copying a Windows98 partition? IsaacKuo Linux - General 6 09-02-2005 07:32 PM
problem with copying in windows partition.. pankaj_iiitian89 Linux - Newbie 5 09-02-2005 01:50 PM
copying root system to another partition TheOneAndOnlySM Linux - General 5 06-01-2005 04:03 PM
Copying Partition? dun_noe Debian 4 10-16-2004 01:23 PM
copying from win partition Nechos Linux - Software 4 09-29-2003 11:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration