LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 11-27-2005, 03:21 PM   #1
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 739

Rep: Reputation: 31
Cloning a hard drive


I have the following drive configuration:
hda: Windows 2000 40G ATA
hdb: Mandrake 10.1 40G ATA
hdc: CD-writer
hdd: DVD-ROM
sda: Debian 160G SATA
sdb: not used (yet)

I need an ATA drive for another PC so, rather than buy one I would prefer to buy a SATA drive and transfer the Mandrake installation to it. Possible even transfer the Windows installation and gain a spare drive (which will soon be snapped up by another machine, no doubt).

Is there a way to transfer the Mandrake installation to the SATA drive while not using all of the drive. I don't need 160MB for the Mandrake installation, it's essentailly there to get me out of trouble if I mess up Debian. It is stable and I would prefer not to have to install from scratch.

Ideally I'd use 40GB or less for Mandrake, same for Windows (It's only there for AutoCAD, Access and testing purposes) and use the remaining 80 or more GB for things like backup, shared folders etc.

I've googled for this but didn't get quite what I wanted. Would Ghost do the job?
 
Old 11-27-2005, 05:37 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
What boot loader you using? Grub or lilo
I would use Ghost for Linux. Its a bootable cd you can download and burn.

This is the way I would do it.
You need Ghost for Linux
Also a Live CD like Knoppix or Rescue CD (Knoppix perfered)
Know where the following files are on which partition: /etc/fstab, etc/mtab, /boot/grub/grub.conf. I would make backups of all the files and also make a print off of them so you can make changes on paper to make sure you fully understand.

Now the tricky part. I will use grub as the example. Also I assuming you are going to remove the Debian install. If not you should be able to edit the files mentioned above and below for placement of all partitions.

1. Plugin all harddrives you need. Before starting:
If you need to shrink partitions on the sata drive before copy over partition use the knoppix or rescue CD and use the program parted or qtparted to modify partition sizes.
2. Boot up using Ghost for Linux CD
3. Copy your partitions from your /dev/hdb drive to /dev/sda (guessing it will be sda)
4. Once done remove the hdb ide drive
5. Boot up using the knoppix disk.
6. Goto your /boot/grub directory on the sata drive.
7. You need to edit grub.conf or if not there menu.1st.
8. Here you need to change references from /dev/hdb* to match number /dev/sda*. Example /dev/hdb1 to /dev/sda1
9. Also need to edit /etc/fstab and do the same. Change /dev/hdb* to /dev/sda*.
10 Only other file maybe is /etc/mtab. This is needed if fstab file is using LABELS instead of /dev/. It mostly a Redhat/FC and similiar distros.
11. You may have to run grub-install unless the grub mbr is on the first /dev/hda drive. From what I can tell you plan on not removing that drive.

Reboot and ready to go.

Hope this helps.
Brian
 
Old 11-27-2005, 11:17 PM   #3
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 739

Original Poster
Rep: Reputation: 31
Sounds good, thanks.

Actually sda stays. It's my Debian installation. hdb goes to sdb.

I assume that I can then play with the remainig space on the drive.

Thanks.
 
Old 11-28-2005, 05:36 PM   #4
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
No problem using the extra space. Either add partitions or expand or shrink others.

Brian
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cloning 1 hard disk to smaller hard disk, dd or ghost? fireman949 Linux - Hardware 8 12-23-2012 12:51 AM
cloning a drive in Red Hat 8 mustang05 Linux - Software 1 08-23-2004 07:46 PM
Cloning Hard Drives and Partitions! an alternative to Norton ghost thebover Linux - Software 3 08-18-2004 03:40 PM
Cloning Hard Drive rls Linux - Software 3 08-23-2003 02:32 PM
cloning hard drives with RH8 willcox Linux - Hardware 0 06-10-2003 07:44 PM


All times are GMT -5. The time now is 05:13 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration