Skip to main content
Became Hot Network Question
information in question, not in comments please
Source Link
Chris Davies
  • 128.3k
  • 16
  • 179
  • 324

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this:

dd if=/dev/mmcblk0 of=small.img bs=1M count=10240 

and to the target like this

dd if=small.img of=/dev/mmcblk0 bs=1M count=10240 

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

------Edit I I should have addedsay that I did all of this copying on my ubuntu machine after removing the SD card from the PI. So the filesystem was not in use on the card when copying it.

I was finally able to get it to boot though by putting the bad SD card into my ubuntu machine and running fsck -l /dev/mmcblk0p2. I ctrl-c'd when it started talking to me about garbage.

enter image description here

And now gparted sees it as ext4 and it boots... But what the heck :) I don't get why this happened.

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this:

dd if=/dev/mmcblk0 of=small.img bs=1M count=10240 

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

------Edit I should have added that I did all of this copying on my ubuntu machine after removing the SD card from the PI. So the filesystem was not in use on the card when copying it.

I was finally able to get it to boot though by putting the bad SD card into my ubuntu machine and running fsck -l /dev/mmcblk0p2. I ctrl-c'd when it started talking to me about garbage.

enter image description here

And now gparted sees it as ext4 and it boots... But what the heck :) I don't get why this happened.

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this:

dd if=/dev/mmcblk0 of=small.img bs=1M count=10240 

and to the target like this

dd if=small.img of=/dev/mmcblk0 bs=1M count=10240 

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

I should say that I did all of this copying on my ubuntu machine after removing the SD card from the PI. So the filesystem was not in use on the card when copying it.

I was finally able to get it to boot though by putting the bad SD card into my ubuntu machine and running fsck -l /dev/mmcblk0p2. I ctrl-c'd when it started talking to me about garbage.

enter image description here

And now gparted sees it as ext4 and it boots... But what the heck :) I don't get why this happened.

format code
Source Link
Chris Davies
  • 128.3k
  • 16
  • 179
  • 324

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this: dd if=/dev/mmcblk0 of=small.img bs=1M count=10240.

dd if=/dev/mmcblk0 of=small.img bs=1M count=10240 

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

------Edit I should have added that I did all of this copying on my ubuntu machine after removing the SD card from the PI. So the filesystem was not in use on the card when copying it.

I was finally able to get it to boot though by putting the bad SD card into my ubuntu machine and running fsck -l /dev/mmcblk0p2fsck -l /dev/mmcblk0p2. I ctrl-c'd when it started talking to me about garbage.

enter image description here

And now gparted sees it as ext4 and it boots... But what the heck :) I don't get why this happened.

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this: dd if=/dev/mmcblk0 of=small.img bs=1M count=10240.

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

------Edit I should have added that I did all of this copying on my ubuntu machine after removing the SD card from the PI. So the filesystem was not in use on the card when copying it.

I was finally able to get it to boot though by putting the bad SD card into my ubuntu machine and running fsck -l /dev/mmcblk0p2. I ctrl-c'd when it started talking to me about garbage.

enter image description here

And now gparted sees it as ext4 and it boots... But what the heck :) I don't get why this happened.

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this:

dd if=/dev/mmcblk0 of=small.img bs=1M count=10240 

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

------Edit I should have added that I did all of this copying on my ubuntu machine after removing the SD card from the PI. So the filesystem was not in use on the card when copying it.

I was finally able to get it to boot though by putting the bad SD card into my ubuntu machine and running fsck -l /dev/mmcblk0p2. I ctrl-c'd when it started talking to me about garbage.

enter image description here

And now gparted sees it as ext4 and it boots... But what the heck :) I don't get why this happened.

found a work around, still confused about what is happening. Also added clarity based on an answer.
Source Link

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this: dd if=/dev/mmcblk0 of=small.img bs=1M count=10240.

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

------Edit I should have added that I did all of this copying on my ubuntu machine after removing the SD card from the PI. So the filesystem was not in use on the card when copying it.

I was finally able to get it to boot though by putting the bad SD card into my ubuntu machine and running fsck -l /dev/mmcblk0p2. I ctrl-c'd when it started talking to me about garbage.

enter image description here

And now gparted sees it as ext4 and it boots... But what the heck :) I don't get why this happened.

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this: dd if=/dev/mmcblk0 of=small.img bs=1M count=10240.

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

I've been trying to make a backup of this raspberry pi SD card and I keep failing. I just needed it a little bit smaller so it would fit on another 32GB SD card that I have. After a lot of failures following tutorials (like pishrink) I shrank my root fs down to around 8GiB which should fit just fine. Then I copied it over with DD like this: dd if=/dev/mmcblk0 of=small.img bs=1M count=10240.

Whenever I do this the root partition ends up with an unknown filetype. It is originally ext4, here is the working SD Card in gparted. You can see the root partition is happy as ext4.

enter image description here

And here is gparted on the second card after I try to write it. The boot partition is fine but something happened to the ext4 root partition. The PI actually boots up until it tries to load the root partition. This happens no matter how many times I try to copy the image, or even if I try to leave off the size in the dd command. What could I be missing here?

enter image description here

------Edit I should have added that I did all of this copying on my ubuntu machine after removing the SD card from the PI. So the filesystem was not in use on the card when copying it.

I was finally able to get it to boot though by putting the bad SD card into my ubuntu machine and running fsck -l /dev/mmcblk0p2. I ctrl-c'd when it started talking to me about garbage.

enter image description here

And now gparted sees it as ext4 and it boots... But what the heck :) I don't get why this happened.

Source Link
Loading