I have been using linux for a little while but only as a desktop user to do away with Windows. Hope to use the raspberry pi to learn more about linux and get my 10 year old into thinking more of PC's then just games.
Anyway. I bought a new Ultra SD Scandisk card 8 GB etc. Picked Debian Squeeze, went through the install and resize procedure as listed on the wiki, booted up the device then enabled ssh and installed xrdp, provided a root password. I ran apt-get update and also tried to use apt-get to install fswebcam and aptitude-gtk. I started to notice errors such as missing paths and other messages I should have saved or written down.
So once again to ensure I have a good working system I have just re-installed the SD card and got back to the stage before using 'apt-get update'.
What I would like to know is how can I save the image from the card on to my desktop PC as pi8gb.img. That way I could save time to get back to a good install when ever I screw it up?
Cheers
Adrian
Help on saving sdcard image?
6 posts
- Posts: 23
- Joined: Wed Jun 27, 2012 7:43 pm
You effectively reverse the dd commands.
Assuming your SD card is recognised as SDD, here is one I did earlier after I expanded my Debian image and made a few changes.
sudo dd if=/home/bob/pi/debian_exp.img of=/dev/sdd bs=1M
To reverse the command and give it a new name
sudo dd if=/dev/sdd of=/home/bob/pi/newimage.img bs=1M
Obviously it is important to get the location of that SD card correctly identified.
Assuming your SD card is recognised as SDD, here is one I did earlier after I expanded my Debian image and made a few changes.
sudo dd if=/home/bob/pi/debian_exp.img of=/dev/sdd bs=1M
To reverse the command and give it a new name
sudo dd if=/dev/sdd of=/home/bob/pi/newimage.img bs=1M
Obviously it is important to get the location of that SD card correctly identified.
Thanks Bob if that is your name, better then grumpyoldgit!
I should have thought of that myself, duh.
Just going through the process and will check with sha1sum of both the sd card which on my pc is /dev/sdb and my generated .img file that they both match and will then compress to save some space.
Cheers
Adrian
I should have thought of that myself, duh.
Just going through the process and will check with sha1sum of both the sd card which on my pc is /dev/sdb and my generated .img file that they both match and will then compress to save some space.
Cheers
Adrian
- Posts: 23
- Joined: Wed Jun 27, 2012 7:43 pm
One the size of the partiation has been increased on the SD card, a DD of the raw image will give rather a large file. If you want to save some space, instead just take a copy of the files, so something like:
cd /path/to/root
tar cf ../debian.tar .
then probably compress the result
bzip2 debian.tar
To extract do reverse:
cd /path/to/root
bunzip2 -c ../debian.tar.bz2 | tar xf -
That should save some space. also look at xz compression if you want very small images.
cd /path/to/root
tar cf ../debian.tar .
then probably compress the result
bzip2 debian.tar
To extract do reverse:
cd /path/to/root
bunzip2 -c ../debian.tar.bz2 | tar xf -
That should save some space. also look at xz compression if you want very small images.
- Posts: 57
- Joined: Mon Jan 30, 2012 4:27 pm
Did you use Win32 Disk Imager per the Wiki?
Instead of doing a "Write" to write data in a 'Image File' to 'Device'
just do a "Read" to write data on 'Device' to 'Image File'
Instead of doing a "Write" to write data in a 'Image File' to 'Device'
just do a "Read" to write data on 'Device' to 'Image File'
- Posts: 662
- Joined: Thu Mar 29, 2012 3:37 pm
the OP is on a Linux Desktop not Windoze