smshiera
Posts: 37
Joined: Fri Feb 22, 2013 6:59 am

how to transfer a SD-8g to a SD_4g,only used 3g space

Fri May 03, 2013 3:16 pm

I have a 8g sd card,already installed many stuff ,only used 3g ,
now I find a 4g sd card,
how can i transfer 8g to 4g?

yottskry
Posts: 73
Joined: Wed Mar 06, 2013 10:11 pm

Re: how to transfer a SD-8g to a SD_4g,only used 3g space

Fri May 03, 2013 3:46 pm

Use gparted to resize the partition so that it's only 4gb in size. Then use dd to write the image to a file. Then use dd again to write the image to the 4gb SD card.

This is for linux. I don't know how you'd do it in Windows, I don't use it.

smshiera
Posts: 37
Joined: Fri Feb 22, 2013 6:59 am

Re: how to transfer a SD-8g to a SD_4g,only used 3g space

Fri May 03, 2013 5:55 pm

yottskry wrote:Use gparted to resize the partition so that it's only 4gb in size. Then use dd to write the image to a file. Then use dd again to write the image to the 4gb SD card.

This is for linux. I don't know how you'd do it in Windows, I don't use it.
I installed gparted in pi,but resize_option is unselectable,do i need another linux pc to do this?

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: how to transfer a SD-8g to a SD_4g,only used 3g space

Fri May 03, 2013 7:19 pm

smshiera wrote:
yottskry wrote:Use gparted to resize the partition so that it's only 4gb in size. Then use dd to write the image to a file. Then use dd again to write the image to the 4gb SD card.

This is for linux. I don't know how you'd do it in Windows, I don't use it.
I installed gparted in pi,but resize_option is unselectable,do i need another linux pc to do this?
You could probably achieve with a Pi using a USB SD card reader to adjust an SD card the Pi wasn't running from. It gets awfully involved working on a live mounted partition.... Or use a Linux live CD on your PC, I'd favour Ubuntu myself (all the Ubuntu CDs are live, when you make them) but there are many others. You could even make your PC dual bootable so you can still play Call of Duty Black Ops when you're not playing with the Pi.... ;)
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

smshiera
Posts: 37
Joined: Fri Feb 22, 2013 6:59 am

Re: how to transfer a SD-8g to a SD_4g,only used 3g space

Fri May 03, 2013 7:49 pm

thanks,I will try to make a ubuntu cd

smshiera
Posts: 37
Joined: Fri Feb 22, 2013 6:59 am

Re: how to transfer a SD-8g to a SD_4g,only used 3g space

Sat May 04, 2013 12:36 pm

i succeed to transfer it. it's so complicated.

if there is a easy way to make a image like pi's wheezy-img that
i can use expand_rootfs @ sudo raspi-config ? so i can give my-img to my friend.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: how to transfer a SD-8g to a SD_4g,only used 3g space

Sat May 04, 2013 12:52 pm

i succeed to transfer it. it's so complicated.
That's interesting (that you would say that). As it turns out, I had composed and was about to send a response on this thread, that was titled "Why not do it the easy way?". The easy way is just to copy the files - from the imaged SD card to a new SD card (basically, from /dev/mmcblk0* to /dev/sda*). The funny thing is, though, that even though I really do think that it is easier to do it this way (than it is to mess around with Live CDs, GParted, and etc ,etc, etc), it is a little more complicated to explain. So you have the paradox of it being easier to do, but harder to explain (in a newbie-proof way - that is, with all the dots and tittles supplied).

So, I canceled out of it (did not post the post).

By the way (and for what it is worth...), if I were actually doing this (transferring a system to a new media set), I would copy it to a SD+flashdrive combo. That is, I'd get the smallest SD card I cold find (say, 512M) and copy the contents of /boot to that. Then I'd get the smallest USB flash drive (aka, "memory stick") that I could find (say, 4G) and copy the rest of the files there. Then modify cmdline.txt accordingly and away you go.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

smshiera
Posts: 37
Joined: Fri Feb 22, 2013 6:59 am

Re: how to transfer a SD-8g to a SD_4g,only used 3g space

Sun May 05, 2013 4:55 am

[quote="Joe Schmoe"]
thanks for reply,I learned a lot

Return to “Beginners”