User Tools

Site Tools


recovering_from_a_bad_sdcard

Table of Contents

If you want to send us your comments, please do so. Thanks
More on comments


Recovering from a bad SDcard

When you have made an image of your Rapberry Pi SDcard you can put is back on a new SDcard using the method decribed in the image link. However that does not go right strait away. In the default Raspberry Pi case two partitions should be written back. In our case only /boot was filled with data. We mounted the image and copied the data of the / partition to the / partition on the new SDcard

When all seems well put the SDcard in the Raspberry Pi and power it up. See if it boots and you can login. If so continue with the next step if applicable. If not, it might be an option to start from scratch following: Installing Raspbian lite on a Debian computer

fdisk

The new card is bigger than the old card. We used fdisk to create a new partition in the remaining unpartitioned space after the / partition. Start fdisk with

fdisk /dev/device (device is something like sdx or mmcblkx)

Do m and read through the commands. With F you can see on what sectors the unpartitioned space is. And so on

format

Format the new partion
See our Formatting on how to format the new partition. We format the partition with the ext4 filesystem with journal, so omitting the ^

fstab

Update /etc/fstab accordingly with something that looks like

PARTUUID=[UUIDhash]-03 /mnt/thridpartition ext4 defaults 0 2

Wrapping up

Create the mount directory, mount it and check

mkdir /mnt/thridpartition
mount -a
df -h | grep thridpartition

Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2023 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
recovering_from_a_bad_sdcard.txt · Last modified: 28-02-2018 19:33 by wim