[Solved] A way to change SD card (to smaller SD card)

Ask questions about Arch Linux ARM. Please search before making a new topic.

[Solved] A way to change SD card (to smaller SD card)

Postby Fuson51 » Sat Jan 05, 2013 7:40 pm

Hi,
I'm looking for a way to change my 8GB SD Card to a 2GB !!!

It should not be a problem because I have less than 1GB of data:
$this->bbcode_second_pass_code('', 'root@rpi-bf8 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 1.8G 911M 763M 55% /
/dev/mmcblk0p1 94M 19M 76M 20% /boot
/dev/sda1 30G 5.2G 25G 18% /mnt')

but if I use DD like
$this->bbcode_second_pass_code('', 'dd if=/dev/mmcblk0 conv=sync,noerror bs=64k | gzip -c > /mnt/mmc.img.gz')
I can't restore the image on my 2GB SD Card because image sized 8GB (effective partition + empty unpartitioned space).

Someone have an idea to help me ? Thanks in advance !!! Bye
Last edited by Fuson51 on Sun Jan 06, 2013 4:41 pm, edited 2 times in total.
Fuson51
 
Posts: 12
Joined: Sat Jan 05, 2013 7:32 pm

Re: A way to change SD card (to smalled SD card)

Postby pepedog » Sat Jan 05, 2013 8:15 pm

Can't you bs=1M count=1900 (a guess)
Also to help compress, fill partition spare spac with zero, eg
dd if=/dev/zero of=/pathtopartition/fill bs=1M
sync
rm /pathtopartition/fill
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

[Solved] A way to change SD card (to smalled SD card)

Postby Fuson51 » Sun Jan 06, 2013 6:59 am

Thanks pepedog it works perfectly !!! The compression help tips too !!!
Fuson51
 
Posts: 12
Joined: Sat Jan 05, 2013 7:32 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 10 guests