Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: neslekkim on September 29, 2013, 05:44:19 PM

Title: SD Card size
Post by: neslekkim on September 29, 2013, 05:44:19 PM
Is it possible to trim the os images a bit?, for some reason, all my sandisk cards have 7744512 sectors, just to small for the image, which requires 7774208 sectors.
(I have both normal sdcard and microsd cards, all report same size)

I found an 8gb card so I'm ok now, but I guess trimming should be possible?
Title: Re: SD Card size
Post by: rzr on January 04, 2014, 05:58:37 PM
I had to repart my sdcard copy the the files using rsync and dump the boot thing on 1sts blocks
Title: Re: SD Card size
Post by: hansvi on January 05, 2014, 02:17:07 AM
I had the same problem. I fixed it by dumping the cards' content back to disk and re-creating a partition on it, then copying all the data to the new partition and write it back to the card.

I've written it down here:http://hansvi.be/mediawiki/index.php?title=OLinuXino (http://hansvi.be/mediawiki/index.php?title=OLinuXino)

It's a bit overly complicated, you could just delete the partition on the SD card itself, but I already had dumped the content to see the correct size. And it was a good exercise to test some advanced loopback options.
Title: Re: SD Card size
Post by: sanzoghenzo on January 06, 2014, 05:48:12 PM
Hi,
I have the same problem. I manually partitioned the SD and I've managed to mount and copy the two partitions of the image (from here (http://tinyapps.org/docs/mount_partitions_from_disk_images.html), at 1.3.2), now I need to copy u-boot. how many sectors should I copy? is it good to copy the first 446bytes (so the partition table stays intact)?
Title: Re: SD Card size
Post by: rzr on January 06, 2014, 08:50:11 PM
NO dont erase partition table (mbr) just use offset

This worked for me :

* http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi/u-boot-sunxi-latest/u-boot-sunxi-a20-olinuxino_micro.tar.xz
# sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
https://github.com/linux-sunxi/u-boot-sunxi/wiki


BTW, any more doc on the boot process is welcome !

Title: Re: SD Card size
Post by: JohnS on January 06, 2014, 11:36:03 PM
There is LOTS and LOTS of doc on the linux-sunxi site.

John