Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

So I got my new pi and the only free SD I had was 2GB. I couldn't hold off playing with it so it had to do for the time being. I loaded raspbmc and then spent time loading repositories, add-ons and customizing to my liking.

I now I have a 16GB class 10 in the mail and am wondering how to go about copying my current setup to that SD. My first thought is use Win32 Disk Imager to read from the 2GB and then write to the 16GB. However this would then leave only 2GB available to the pi on the 16GB correct? Essentially I am wondering how one would go about re-sizing the partition to use all of the available space on the 16GB SD.

Looking here I see that the ext4 partition at /dev/mmcblk0p3 is the one that would need re-sizing. Is this possible without deleting the contents of that partition?

The problem is, I only have windows PC's available to me. I suppose I could load raspbian on the 2GB after I copy the image to the 16GB to get a more functional linux box but hopefully that's more work then necessary... Im open to any suggestions, just would rather not have to start from scratch with a fresh raspbmc install.

share|improve this question
add comment

1 Answer 1

I think you should look into doing this so you can take and restore backups of your card from time to time. Once you get a second card and as long as you don't destroy the original one, it should be easy to experiment. And yes, it should work.

Some instructions on how to set up a card image can be found on the RPI wiki "easy SD card setup". There's also a page on resizing partitions on rpi. Raspi-config can apparently also do this automatically.

Essentially you should be able to use parted, fdisk, cfdisk or other tool to resize the root partition and use resize2fs to make the filesystem use the extra space.

This should all work from the running Linux system on the PI, so as long as you can get the image on the card correctly in windows, it shouldn't be a problem anymore.

Note that depending on your distribution of choice and version, the card may be set up in different ways and the instructions might not be correct to the letter. But the idea is the same. Find the root, stretch it, resize the filesystem and enjoy your new space (and a 16GB image you need to back up).

Related:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.