<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://blog.vodkamelone.de/feeds/atom10.xml" rel="self" title="ixs' Vodkamelone" type="application/atom+xml" />
    <link href="http://blog.vodkamelone.de/"                        rel="alternate"    title="ixs' Vodkamelone" type="text/html" />
    <link href="http://blog.vodkamelone.de/rss.php?version=2.0"     rel="alternate"    title="ixs' Vodkamelone" type="application/rss+xml" />
    <title type="html">ixs' Vodkamelone</title>
    <subtitle type="html">free pr0n</subtitle>
    <icon>http://blog.vodkamelone.de/templates/default/img/s9y_banner_small.png</icon>
    <id>http://blog.vodkamelone.de/</id>
    <updated>2026-10-19T09:50:31Z</updated>
    <generator uri="http://www.s9y.org/" version="1.3-beta1">Serendipity 1.3-beta1 - http://www.s9y.org/</generator>
    <dc:language>de</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:" />

    <entry>
        <link href="http://blog.vodkamelone.de/archives/179-Reinstall-Raspberry-Pi-OS-on-the-running-machine-itself.html" rel="alternate" title="Reinstall Raspberry Pi OS on the running machine itself" />
        <author>
            <name>andreas</name>
            <email>andreas@dicp.de</email>
        </author>
    
        <published>2026-10-19T09:38:52Z</published>
        <updated>2026-10-19T09:50:31Z</updated>
        <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=atom1.0&amp;type=comments&amp;cid=179</wfw:commentRss>
    
            <category scheme="http://blog.vodkamelone.de/categories/3-Unix" label="Unix" term="Unix" />
    
        <id>http://blog.vodkamelone.de/archives/179-guid.html</id>
        <title type="html">Reinstall Raspberry Pi OS on the running machine itself</title>
        <content type="xhtml" xml:base="http://blog.vodkamelone.de/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>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.</p>

<p>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 <a onclick="javascript: pageTracker._trackPageview('/extlink/www.raspberrypi.com/documentation/computers/getting-started.html#imager-install');"  href="https://www.raspberrypi.com/documentation/computers/getting-started.html#imager-install">Raspberry Pi Imager</a> and write the customized image to an SD card.<br />
That card can then be inserted into the Raspberry Pi and the machine will boot the freshly installed OS from the SD card.</p>

<p>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.</p>

<p>For those situations, just flashing the SD Card from the running Raspberry Pi OS is an option. It's not recommended because you're destroying the filesystem the machine is running on which is obviously a bad idea and can go wrong quick. But it works. &#128584;</p>

<p>Have netcat listen on port 9000 and write the data to the mmc block device, which is the sdcard:<br />
<pre>nc -l 9000 | dd of=/dev/mmcblk0 bs=4M status=progress conv=fsync iflag=fullblock</pre></p>

<p>Then on another machine, stream the image to the raspberrypi machine:<br />
<pre>pv 2026-10-06-raspios-trixie-arm64-lite.img | nc raspberrypi 9000</pre></p>

<p>Using pv gives some nice progress meter, but just using cat is fine too.</p>

<p>After the file has been transferred, reboot the raspberry pi:<br />
<pre>echo b > /proc/sysrq-trigger</pre></p>

<p>Don't run any other commands, do not use tab completion for filenames or something because your filesystem is pretty much shot at that point.</p>

<p>And presto, freshly installed OS.</p> 
            </div>
        </content>
        
    </entry>

</feed>