Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Resize (shrink) Image the safest way?
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Resize (shrink) Image the safest way?
27th Mar, 2013, 10:02 PM
Post: #1
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
Resize (shrink) Image the safest way?
Hi all,

I have an 8GB image that I would now like to fit onto a new 4GB card.

I've had a look on the net but it's confusing and I can't seem to find anything specific to Xbian.

So what is the best/safest way to do this? Use Gparted on the card to shrink and re-save the image prior to writing to the new card?

Any hints or help greatly appreciated :-)

Skywatch
Find all posts by this user
Quote this message in a reply
27th Mar, 2013, 10:49 PM
Post: #2
Koenkk Offline
Registered
Posts: 1,238
Joined: Dec 2012
Reputation: 112
RE: Resize (shrink) Image the safest way?
1. Use gparted to shrink the partition till +- 3.8gb
2. Use dd (with the count parameter) to create a .img file
3. Restore the .img file to the 4gb SD card

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
27th Mar, 2013, 11:27 PM
Post: #3
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: Resize (shrink) Image the safest way?
Thank you Koenkk, Fast clear and consise.

It didn't work the way I thought it would in my first post. I will have a little look on the net and find out how to use dd and 'count' and hopefully that will be the answer and I won't have to reinstall everything (especially the shh keys! - They do take a little time to get set up).

Cheers for the info.

Skywatch
Find all posts by this user
Quote this message in a reply
28th Mar, 2013, 12:37 AM
Post: #4
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: Resize (shrink) Image the safest way?
No joy. :-(

Here's what I did.

Gparted, resize to 1.9 Gb

dd if=/dev/sdb of=xb1a5.img bs=1M count=2000

dd if=xb1a5.img of=/dev/sdb bs=1M count=2000

But the new card won't boot. Where have I gone wrong?

Skywatch
Find all posts by this user
Quote this message in a reply
28th Mar, 2013, 02:02 AM
Post: #5
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: Resize (shrink) Image the safest way?
Now Solved.....

I used Easus to completely wipe the 4GB card. Then used...

dd if=xb1a5.img of=/dev/sdb

and I waited.

Now it's all working! Thanks, I have learned something new today! :-)

Skywatch
Find all posts by this user
Quote this message in a reply
4th Apr, 2013, 08:36 PM
Post: #6
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: Resize (shrink) Image the safest way?
Just a quick update that may be of interest.

It is a week since changing from a Transcend 8GB Class 6 card to a Transcend 4GB class 10 card and I have had no corruption of the SD card.

I am also now setting the device at 'Xbian' overclock setting with no trouble (the old card was on the lowest setting and still seeing problems sometimes).

So all in all it was a worthwhile upgrade for £5.50

Skywatch.
Find all posts by this user
Quote this message in a reply
5th Apr, 2013, 04:36 AM
Post: #7
zilexa Offline
Registered
Posts: 231
Joined: Feb 2013
Reputation: 9
RE: Resize (shrink) Image the safest way?
Great this topic, I am going to do exactly the same. But I only have a Macbook Air (no disc drive). Will figure out if I can access the SD card in Virtualbox so I can run the Gparted live cd from there.
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  [SOLVED] How to shrink BTRFS image Skywatch 11 25,494 1st Apr, 2016 04:53 AM
Last Post: Skywatch

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 11:26 PM Powered By MyBB, © 2002-2025 MyBB Group.