LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-06-2012, 11:45 AM   #1
bunchdaddy
LQ Newbie
 
Registered: Oct 2012
Location: TN US
Distribution: Ubuntu
Posts: 2

Rep: Reputation: Disabled
Post Need to reduce the size of a dd image file to fit onto a new smaller SSD drive


I have a 320GB drive I am trying to clone to a new 240GB SSD drive. The 320 has problems and CloneZilla would not work so I have created a dd image file onto a 3rd drive. Now I want to take that 320GB image and reduce it to fit on the 240GB. There is <100GB of used space so the data will fit fine.
What is the best way to accomplish this?
Thanks,
--bunchdaddy
 
Old 10-06-2012, 01:00 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885
I would rather do a file based copy out of the image to the SSD, for two reasons:
1. Shrinking the partitions/filesystems on the image is no trivial task and includes the risk of data loss.
2. If the 320GB drive from an older installation it is very likely that the partitions are not aligned in a way suitable for a SSD.

So my recommendation would be to partition the disk the way you need (recent versions of GParted will align the partitions automatically and also format the partitions in one go). Then mount the partitions in the image, use rsync or tar to copy the files to the SSD and then reinstall the bootloader.
 
Old 10-06-2012, 01:09 PM   #3
bunchdaddy
LQ Newbie
 
Registered: Oct 2012
Location: TN US
Distribution: Ubuntu
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the info and quick reply. Can you give me some more info on reinstalling the bootloader? This is a winXP install but could I use something like GRUB?
Thanks again - bunchdaddy
 
Old 10-06-2012, 01:51 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885
Just boot form your XP CD, start the recovery console and launch the commands
Code:
fixmbr
fixboot
On XP installs you can be sure that the partitions are not aligned in a way suitable for SSDs, so the file based approach is much better than copying the image.
 
  


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
How to reduce the size of an image without clipping it ? Aquarius_Girl General 14 04-08-2011 08:41 AM
Reduce virtual image size of Linux guest in VirtualBox chris1606 Linux - Server 3 04-14-2009 06:51 AM
How can I reduce and image size with php's GD library? abefroman Linux - Software 1 10-18-2005 11:29 AM
reduce the kernel image size further abirami Linux - Networking 1 10-05-2004 10:06 AM
Using Gimp to reduce size of image for web esteeven Linux - Software 2 10-01-2002 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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