0747.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Fixing a Corrupted Raspberry Pi SD Card Partition Table</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="SBC,Single Board Computer,Micro SD Card,Linux,Armbian,Debian,Home Lab,Raspberry Pi Image,SD Card,Corrupted SD Card,Corrupt Raspberry Pi,Fix Corrupt SD Card,Fix Corrupt Raspberry Pi OS,Raspberry Pi OS,GParted,File System,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Fixing a Corrupted Raspberry Pi SD Card Partition Table">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="10/09/2022 06:50:55 AM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Fixing a Corrupted Raspberry Pi SD Card Partition Table</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <ol>
  26. <li>Download the GParted live disc <a href="https://gparted.org/download.php" target="_blank">Download</a></li>
  27. <li>Insert the SD card into a PC and boot into the GParted live disc</li>
  28. <li>Minimize the GParted UI and launch Terminal from the desktop</li>
  29. <li>Run the following command in the open terminal
  30. <div class="codeBlock CMD">sudo testdisk</div>
  31. </li>
  32. <li>Select Create</li>
  33. <li>Use the arrows to select the SD card device &gt; Proceed</li>
  34. <li>Use the arrows to select Intel</li>
  35. <li>Select Analyse &gt; Quick Search</li>
  36. <li>Press Enter to continue</li>
  37. <li>Arrow over and select Write to apply the partition table to the SD card &gt; Type Y and press Enter to confirm</li>
  38. <li>Quit out of TestDisk back to the terminal</li>
  39. <li>Continue with the following commands to check and repair the filesystems on the SD card
  40. <div class="codeBlock CMD"># take note of the device identifiers for the SD card (/dev/sda1 and /dev/sda2 in the example)<br />
  41. sudo fdisk -l<br />
  42. # run the following command for each partition on the SD card, replacing x with the correct disk identifier<br />
  43. sudo fsck /dev/sdx1 -fy<br />
  44. sudo fsck /dev/sdx2 -fy</div>
  45. </li>
  46. <li>Shutdown the GParted live disc</li>
  47. <li>Insert the SD card back into the Raspberry Pi</li>
  48. <li>Power it on to see if the SD card is now able to boot</li>
  49. </ol> </div>
  50. </div>
  51. </body>
  52. </html>