<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>ixs' Vodkamelone - Unix</title>
    <link>http://blog.vodkamelone.de/</link>
    <description>lart 'em all, let god sort them out...</description>
    <dc:language>de</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:" />
    <generator>Serendipity 1.3-beta1 - http://www.s9y.org/</generator>
    
    <image>
        <url>http://blog.vodkamelone.de/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: ixs' Vodkamelone - Unix - lart 'em all, let god sort them out...</title>
        <link>http://blog.vodkamelone.de/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Reinstall Raspberry Pi OS on the running machine itself</title>
    <link>http://blog.vodkamelone.de/archives/179-Reinstall-Raspberry-Pi-OS-on-the-running-machine-itself.html</link>
            <category>Unix</category>
    
    <comments>http://blog.vodkamelone.de/archives/179-Reinstall-Raspberry-Pi-OS-on-the-running-machine-itself.html#comments</comments>
    <wfw:comment>http://blog.vodkamelone.de/wfwcomment.php?cid=179</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.vodkamelone.de/rss.php?version=2.0&amp;type=comments&amp;cid=179</wfw:commentRss>
    

    <author>andreas@dicp.de (andreas)</author>
    <content:encoded>
    &lt;p&gt;The Raspberry Pi machines are great when one needs a low-power home server or similar. Current machines are not as cheap and simple as the first generations but they are still very convenient little computers.&lt;/p&gt;

&lt;p&gt;Sometimes however one wants to blow everything away and start from scratch with a clean OS. The traditional way how this is done is by downloading the &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/www.raspberrypi.com/documentation/computers/getting-started.html#imager-install&#039;);&quot;  href=&quot;https://www.raspberrypi.com/documentation/computers/getting-started.html#imager-install&quot;&gt;Raspberry Pi Imager&lt;/a&gt; and write the customized image to an SD card.&lt;br /&gt;
That card can then be inserted into the Raspberry Pi and the machine will boot the freshly installed OS from the SD card.&lt;/p&gt;

&lt;p&gt;Great. But for myriad reasons one might not want to do it. Hey, maybe walking to the other room and fetching the SD card is just too much effort.&lt;/p&gt;

&lt;p&gt;For those situations, just flashing the SD Card from the running Raspberry Pi OS is an option. It&#039;s not recommended because you&#039;re destroying the filesystem the machine is running on which is obviously a bad idea and can go wrong quick. But it works. &amp;#128584;&lt;/p&gt;

&lt;p&gt;Have netcat listen on port 9000 and write the data to the mmc block device, which is the sdcard:&lt;br /&gt;
&lt;pre&gt;nc -l 9000 | dd of=/dev/mmcblk0 bs=4M status=progress conv=fsync iflag=fullblock&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Then on another machine, stream the image to the raspberrypi machine:&lt;br /&gt;
&lt;pre&gt;pv 2026-10-06-raspios-trixie-arm64-lite.img | nc raspberrypi 9000&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Using pv gives some nice progress meter, but just using cat is fine too.&lt;/p&gt;

&lt;p&gt;After the file has been transferred, reboot the raspberry pi:&lt;br /&gt;
&lt;pre&gt;echo b &gt; /proc/sysrq-trigger&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Don&#039;t run any other commands, do not use tab completion for filenames or something because your filesystem is pretty much shot at that point.&lt;/p&gt;

&lt;p&gt;And presto, freshly installed OS.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 19 Oct 2026 11:38:52 +0200</pubDate>
    <guid isPermaLink="false">http://blog.vodkamelone.de/archives/179-guid.html</guid>
    
</item>

</channel>
</rss>