<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Storage/Partition on Haifei's Home</title><link>https://haifei-home.pages.dev/en/tags/storage/partition/</link><description>Recent content in Storage/Partition on Haifei's Home</description><generator>Hugo</generator><language>en</language><managingEditor>hfwang132@gmail.com (hfwang132)</managingEditor><webMaster>hfwang132@gmail.com (hfwang132)</webMaster><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Mon, 12 Jun 2023 22:59:26 +0800</lastBuildDate><atom:link href="https://haifei-home.pages.dev/en/tags/storage/partition/index.xml" rel="self" type="application/rss+xml"/><item><title>Increasing the swapfile for Linux</title><link>https://haifei-home.pages.dev/en/post_20230612_%E7%BB%99-linux-%E5%A2%9E%E5%8A%A0-swapfile/</link><pubDate>Mon, 12 Jun 2023 22:59:26 +0800</pubDate><author>hfwang132@gmail.com (hfwang132)</author><guid>https://haifei-home.pages.dev/en/post_20230612_%E7%BB%99-linux-%E5%A2%9E%E5%8A%A0-swapfile/</guid><description>&lt;p&gt;Xilinx&amp;rsquo;s toolchain consumes soooo much memory! Sometimes it causes the system to freeze&amp;hellip; After all, my laptop only has 8GB of RAM. So there&amp;rsquo;s no other choice but to add virtual memories.&lt;/p&gt;
&lt;p&gt;After increase the swapfile, the system performance has improved a lot:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo swapoff /swapfile
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo dd &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/zero &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/swapfile &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1M &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;16384&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo mkswap /swapfile
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo swapon /swapfile
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Partitioning and formatting SD cards on Linux</title><link>https://haifei-home.pages.dev/en/post_20230612_%E5%9C%A8-linux-%E4%B8%AD%E7%BB%99-sd-%E5%8D%A1%E5%88%86%E5%8C%BA%E5%B9%B6%E5%88%9B%E5%BB%BA%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F/</link><pubDate>Mon, 12 Jun 2023 22:43:36 +0800</pubDate><author>hfwang132@gmail.com (hfwang132)</author><guid>https://haifei-home.pages.dev/en/post_20230612_%E5%9C%A8-linux-%E4%B8%AD%E7%BB%99-sd-%E5%8D%A1%E5%88%86%E5%8C%BA%E5%B9%B6%E5%88%9B%E5%BB%BA%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F/</guid><description>&lt;p&gt;To partition and format an SD card in Linux, follow these steps: First, connect the SD card to your PC. Then, use the fdisk command in the bash command line to partition the SD card. Finally, use the mkfs command to create a file system (format) on the SD card.&lt;/p&gt;
&lt;p&gt;The main commands are as follows:&lt;/p&gt;
&lt;p&gt;First, use &lt;code&gt;sudo fdisk -l&lt;/code&gt; to confirm which device in &lt;code&gt;/dev&lt;/code&gt; corresponds to the SD card.&lt;/p&gt;</description></item><item><title>Mounting the EFI partition in Windows OS</title><link>https://haifei-home.pages.dev/en/post_20230612_%E5%9C%A8-windows-%E4%B8%AD%E6%8C%82%E8%BD%BD-efi-%E5%88%86%E5%8C%BA%E7%9A%84%E6%96%B9%E6%B3%95/</link><pubDate>Mon, 12 Jun 2023 22:26:16 +0800</pubDate><author>hfwang132@gmail.com (hfwang132)</author><guid>https://haifei-home.pages.dev/en/post_20230612_%E5%9C%A8-windows-%E4%B8%AD%E6%8C%82%E8%BD%BD-efi-%E5%88%86%E5%8C%BA%E7%9A%84%E6%96%B9%E6%B3%95/</guid><description>&lt;p&gt;To mount the EFI partitions, run the following commands in PowerShell:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;diskpart&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;list&lt;/span&gt; &lt;span class="n"&gt;disk&lt;/span&gt; &lt;span class="c"&gt;# make sure which is the disk that contains the EFI partition. usually 0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;select &lt;/span&gt;&lt;span class="n"&gt;disk&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;list&lt;/span&gt; &lt;span class="n"&gt;partition&lt;/span&gt; &lt;span class="c"&gt;# make sure which is the EFI partition. normally 0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;select &lt;/span&gt;&lt;span class="n"&gt;disk&lt;/span&gt; &lt;span class="mf"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;assign&lt;/span&gt; &lt;span class="n"&gt;letter&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then we will mount the EFI partition as drive Z.&lt;/p&gt;
&lt;p&gt;This operation may be useful when using a dual-boot system with Windows and Ubuntu: Sometimes, after removing the Ubuntu system, only the Windows system remains, but the GRUB interface still appears every time the computer boots. In this case, you need to delete the old Ubuntu EFI partition.&lt;/p&gt;</description></item></channel></rss>