DaveSemm
Posts: 160
Joined: Thu Jun 21, 2012 1:16 pm

Can't write image to new SD card

Sun Jun 09, 2013 11:59 am

I've been backing up my 8GB SDHC card regularly, using win32diskimager. I now want to get more Pi's, and want to start them from the current image. So I gathered up a few 8GB SDHC cards, and tried to write to them. Every one returns an error similar to this: "Not enough space on disk: Size 15720448 sectors Available 15660032 sectors Sector size:512". I tried reformatting them, using NTFS and 512byte sectors, but I get the same error. I also bought a new one, same problem. Did I happen to start with a larger than normal card? (I pulled it out of a camera when the Pi arrived. It worked, and it's all I've used ever since.) Can I fix this by writing to a 16GB card? Or will that create other problems?

User avatar
rpdom
Posts: 17029
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Can't write image to new SD card

Sun Jun 09, 2013 12:47 pm

Almost all SD cards will have capacities that are slightly different. It does sound like you did start with one of the larger ones.

Copying to a 16GB card will work, but afterwards you should run raspi-config and expand the root filesystem again to take advantage of the extra 8GB.

DaveSemm
Posts: 160
Joined: Thu Jun 21, 2012 1:16 pm

Re: Can't write image to new SD card

Sun Jun 09, 2013 1:18 pm

rpdom wrote:Almost all SD cards will have capacities that are slightly different. It does sound like you did start with one of the larger ones.

Copying to a 16GB card will work, but afterwards you should run raspi-config and expand the root filesystem again to take advantage of the extra 8GB.
Thanks. That gives me another idea: Is there a way to shrink the file system a little bit so that it will fit other 8GB cards? I'm planning to set up a lot of Pi's, and would like to keep the cost of the SD card down. There is plenty of free space on the current 8GB card, so I just want to remove some of the unused space.

Heater
Posts: 15838
Joined: Tue Jul 17, 2012 3:02 pm

Re: Can't write image to new SD card

Sun Jun 09, 2013 1:41 pm

One way to do this is to get your self the live CD version of GParted.
http://gparted.sourceforge.net/livecd.php
which you may find comes in very useful for other jobs as well in the future.

So what you do is:
1) Get a 16GB card and write your 8GB image to it.
2) Make sure it boots on a Pi but do not resize the filesystem to use 16GB
3) Back on the PC boot it with the GParted live CD and put the 16GB SD into your card reader.
4) Use Gparted to shrink the root file system down to something a bit smaller, that will fit on your 8GB cards.
5) Now you can get back to your normal OS and copy the SD image to a file as you have done before.
6) Use that image file to create all your new 8GB SD cards.
Memory in C++ is a leaky abstraction .

DaveSemm
Posts: 160
Joined: Thu Jun 21, 2012 1:16 pm

Re: Can't write image to new SD card

Sun Jun 09, 2013 1:50 pm

Heater wrote:One way to do this is to get your self the live CD version of GParted.
http://gparted.sourceforge.net/livecd.php
which you may find comes in very useful for other jobs as well in the future.

So what you do is:
1) Get a 16GB card and write your 8GB image to it.
2) Make sure it boots on a Pi but do not resize the filesystem to use 16GB
3) Back on the PC boot it with the GParted live CD and put the 16GB SD into your card reader.
4) Use Gparted to shrink the root file system down to something a bit smaller, that will fit on your 8GB cards.
5) Now you can get back to your normal OS and copy the SD image to a file as you have done before.
6) Use that image file to create all your new 8GB SD cards.
Thanks - that will be perfect!

windy54
Posts: 86
Joined: Sat Dec 29, 2012 3:37 pm

Re: Can't write image to new SD card

Fri Dec 13, 2013 10:30 am

Hi,
I have been having the same problem so I brought a 16g card to copy my 8g image to it.

The 16g card states 14g available but when I try and copy my 8g image I get an error message stating not enough room!

What was your 16g image formatted as, FAT32, NTFS?

User avatar
RaTTuS
Posts: 10558
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Can't write image to new SD card

Fri Dec 13, 2013 10:44 am

How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “General discussion”