LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-04-2005, 10:34 AM   #1
paul62
Member
 
Registered: Mar 2004
Location: glenview illinois
Distribution: fedora core 7
Posts: 458

Rep: Reputation: 30
transferring darta to another drive


I have another drive setup as a slave on my system and I would like to transfer the whole operatinsystem to the other disk, what would be the easiest way to accomplish this I am using slackware 10.0.
 
Old 04-04-2005, 10:43 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
The easiest way to do this is to use either rsync or plain cp to copy the files. Just format and mount the secondary hard drive appropriately, and perform a copy. You might want to exclude /dev, /proc, and/or /sys, as needed for your system.
 
Old 04-04-2005, 10:43 AM   #3
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
a simple method is :
( supposed hda1 = source & hdb1 = destination )

#dd if=/dev/hda1 of=/dev/hdb1

make sure your destination partition is equal or larger than the source partition.

egag
 
Old 04-04-2005, 10:45 AM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
The dd method also works well, though it will copy "empty" space (on a 100 GB partition, if only 20 GB are used, it will copy all 100 GB). It also becomes inconvenient when the partitions are of different sizes (the filesystem will be the old size) and when the system is on multiple partitions.
 
Old 04-04-2005, 10:46 AM   #5
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
Assuming you want to copy just the root partition and run Slackware from the slave drive, you could boot up a "live" distro from CD - e.g. Knoppix, mount your source partition (read-only) on /mnt/slack1, your target partition (read-write) on /mnt/slack2, and then do:

cp -a /mnt/slack1/* /mnt/slack2

After that you would want to modify /mnt/slack2/etc/fstab to reflect the new filesystem locations, add an option to boot the kernel from the slave drive to your bootloader config, and reboot.
 
Old 04-04-2005, 10:50 AM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
yip, but dd will take care of symlinks also.
and as i said, if the dest>=source it'll be ok.

and if it's spread over more partitions, you need to do the same for the other partitions.
but it's not meant to shrink a partition.

egag

Last edited by egag; 04-04-2005 at 10:51 AM.
 
Old 04-04-2005, 12:39 PM   #7
paul62
Member
 
Registered: Mar 2004
Location: glenview illinois
Distribution: fedora core 7
Posts: 458

Original Poster
Rep: Reputation: 30
Ok I got it working I would appreciate it if anyone can tell me if there is any way I can run programs off o this disk from console, without actually booting into it.?
 
  


Reply



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
Transferring Hard Drive to Newer Computer kaplan71 SUSE / openSUSE 2 11-04-2005 04:11 PM
Transferring Hard Drive to Newer Computer kaplan71 Fedora 1 11-04-2005 01:32 PM
Transferring OS to new Hard Drive thenebula Linux - Newbie 6 10-29-2004 09:06 PM
Transferring data from a WinXP Hard drive satimis Linux - Hardware 3 08-19-2004 06:34 AM
Transferring build to new hard drive NickC Mandriva 16 07-09-2004 08:59 PM

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

All times are GMT -5. The time now is 02: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