{"id":92,"date":"2022-01-24T21:11:10","date_gmt":"2022-01-24T20:11:10","guid":{"rendered":"https:\/\/kerms.hobby-site.org\/?p=92"},"modified":"2022-01-24T21:11:10","modified_gmt":"2022-01-24T20:11:10","slug":"raspberry-pi-replace-kernel-offline","status":"publish","type":"post","link":"https:\/\/kerms.hobby-site.org\/?p=92","title":{"rendered":"Raspberry Pi replace kernel offline"},"content":{"rendered":"\n<p>It&#8217;s not that simple. But you can repair things on your RPi if you have (or can make) a second bootable SDCard.<\/p>\n\n\n\n<p>Get your second SDCard with Debian and boot your RPi from that. Get your &#8222;broken&#8220; SDCard in a USB reader, insert that in your RPi.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">With chroot:<\/h2>\n\n\n\n<pre class=\"wp-block-verse\">for i in \/dev\/sda*;do sudo umount $i; done<br>sudo mount \/dev\/sda2 \/mnt<br>sudo mount \/dev\/sda1 \/mnt\/boot<br>sudo mount -o bind \/dev \/mnt\/dev<br>sudo mount -o bind \/sys \/mnt\/sys<br>sudo mount -t proc proc \/mnt\/proc<br>sudo mount -o bind \/dev\/pts \/mnt\/dev\/pts<br><br>cd \/mnt<br>sudo chroot .<br>sudo rpi-update<br>exit<br>cd \/<br>for i in t\/boot t\/dev\/pts t\/dev t\/sys t\/proc t; do umount \/mn$i; done<br>poweroff<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">With rpi-update only, when chroot does not work:<\/h2>\n\n\n\n<p>To check which device is used for the SD card that needs to be rescued:\u00a0<strong>fdisk -l<\/strong><br>In my case:\u00a0<strong>\/dev\/sda<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse\">sudo mkdir -p \/mnt\/rescue\/{boot,root}<br>sudo mount \/dev\/sda1 \/mnt\/rescue\/boot<br>sudo mount \/dev\/sda2 \/mnt\/rescue\/root<br>sudo ROOT_PATH=\/mnt\/rescue\/root BOOT_PATH=\/mnt\/rescue\/boot SKIP_BACKUP=1 rpi-update<br>umount \/mnt\/rescue\/{boot,root}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s not that simple. But you can repair things on your RPi if you have (or can make) a second bootable SDCard. Get your second SDCard with Debian and boot your RPi from that. Get your &#8222;broken&#8220; SDCard in a &hellip; <a href=\"https:\/\/kerms.hobby-site.org\/?p=92\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=\/wp\/v2\/posts\/92"}],"collection":[{"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=92"}],"version-history":[{"count":3,"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":95,"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=\/wp\/v2\/posts\/92\/revisions\/95"}],"wp:attachment":[{"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kerms.hobby-site.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}