LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-27-2005, 03:21 PM   #1
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 863

Rep: Reputation: 45
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
LQ 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,700

Rep: Reputation: 65
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: 863

Original Poster
Rep: Reputation: 45
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
LQ 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,700

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

Brian
 
  


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
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

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

All times are GMT -5. The time now is 03:08 PM.

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