LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-09-2006, 12:21 AM   #1
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Rep: Reputation: 30
ghosting two hard drives? one bigger than other


Hey guys,

I've been successfully ghosting hard drives using:
Code:
dd if=/dev/sda of=/dev/sdb ibs=1M obs=1M
I use dd because i want all of the partition info to copy, the MBR, and so forth... this would not be possible with a cp method

However i've run into the problem of wanting to ghost an 80gb hard drive to a 30gb hard drive. The caviat is that the 80gb drive only has 15gb in use. The problem I see here is that the data could be out past 15GB worth of sectors... therefore a dd of 15gb might not catch all the data. The only way i could think of this being done is to re-arrange the data on the disk, which I have no clue how to do or if it is possible.

therefore I was wondering if anyone knows of a way of doing this? Not necessarily re-arranging the data, just solving the problem in general

Thanks!
George
 
Old 08-09-2006, 03:15 AM   #2
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
Um.... messy. You could use qtparted on the 80GB HD to resize the partition to, say 20GB for example, then use dd. Your only problem, as far as I as can see, is that dd if=/dev/sda ... will 'ghost' the entire HD regardless of partition size, hence you would still end up trying to fit 80GB on a 15GB HD. You might need to use dd if=/dev/sda1 to ghost the first partition (on the 80GB HD after resizing it with qtparted) instead and then possible install a bootloader into the MBR of the 15GB HD seperately using a liveCD or something. You'd probably have to make sure you've copied the partition table from the 80GB HD first though.

I'm not entirely sure myself how you'd do this but I don't think you're going to be able to simply 'ghost' the 80GB HD on to 30GB without some serious messing about.

Last edited by mickyg; 08-09-2006 at 03:18 AM.
 
Old 08-09-2006, 08:20 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
LVM can change the size of its volumes. AFAIR there is a command from LVM to take a snapshot of a file system, but that would work only if you have your 80 GB disk on LVM. Maybe a scheme for the future?
 
  


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
2 hard drives, XP on my main sata drives, 10.2 on my IDE LILO doesnt show on boot up Dachy Slackware 14 01-03-2008 07:01 AM
Help ! LILO prints only LI after Ghosting hard drive z536 Linux - Software 1 05-27-2005 09:59 PM
External Hard Drives/Hard Drives ddrfreak Mandriva 1 12-16-2004 06:12 PM
Upgrading hard drives on Software raid 1 boot drives. linuxboy123 Linux - General 0 12-11-2003 03:28 PM
Sampling bits of information in bigger and bigger pieces lugoteehalt General 0 10-29-2003 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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