<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EFI &#8211; richliu&#039;s blog</title>
	<atom:link href="https://richliu.com/tag/efi/feed/" rel="self" type="application/rss+xml" />
	<link>https://richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Thu, 10 Feb 2022 14:27:42 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[Gentoo] UEFI 系統轉移</title>
		<link>https://richliu.com/2017/10/12/2181/gentoo-uefi-%e7%b3%bb%e7%b5%b1%e8%bd%89%e7%a7%bb/</link>
					<comments>https://richliu.com/2017/10/12/2181/gentoo-uefi-%e7%b3%bb%e7%b5%b1%e8%bd%89%e7%a7%bb/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 12 Oct 2017 08:59:06 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[EFI]]></category>
		<category><![CDATA[grub]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=2181</guid>

					<description><![CDATA[<p>最近 HGST 6T 硬碟大特價(12000/9999 =&#62; 6200), 之前的硬碟也差不多快四年了  [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2017/10/12/2181/gentoo-uefi-%e7%b3%bb%e7%b5%b1%e8%bd%89%e7%a7%bb/">[Gentoo] UEFI 系統轉移</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>最近 HGST 6T 硬碟大特價(12000/9999 =&gt; 6200), 之前的硬碟也差不多快四年了 (33319 小時)<br />
剛好提早換硬碟. 看到有人提到的時候去搶只有最後兩顆, 果然運氣不錯<br />
<span id="more-2181"></span></p>
<p>不過收到硬碟的時候發現製造日期是 DEC-2016, 生產快一年了, 應該是賣不出去吧 (註: 剛剛查了一下 amazon.com , 才 US$216 , 所以我們買到只是美國的一般價而己)</p>
<p><a href="https://richliu.com/wp-content/uploads/2017/10/擷取.jpg"><img fetchpriority="high" decoding="async" class="aligncenter size-medium wp-image-2182" src="https://richliu.com/wp-content/uploads/2017/10/擷取-300x191.jpg" alt="HGST 6TB HDD" width="300" height="191" srcset="https://richliu.com/wp-content/uploads/2017/10/擷取-300x191.jpg 300w, https://richliu.com/wp-content/uploads/2017/10/擷取-768x488.jpg 768w, https://richliu.com/wp-content/uploads/2017/10/擷取-1024x651.jpg 1024w, https://richliu.com/wp-content/uploads/2017/10/擷取.jpg 1684w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>轉移的文章可以參考這二篇<br />
<a href="https://richliu.com/2010/01/20/839/raid-5raid-6-mdadm-%e6%8c%87%e4%bb%a4" target="_blank" rel="noopener">Raid5/Raid6 指令</a><br />
<a href="https://richliu.com/2011/05/16/1078/linux-software-raid-%e7%b3%bb%e7%b5%b1%e8%bd%89%e7%a7%bb" target="_blank" rel="noopener">Linux Software Raid 系統轉移</a></p>
<p>這次因為下錯指令結果剛好不小心就從 BIOS Mode, 升級到 UEFI mode.</p>
<p>其實也沒有很難, 以前 GPT + BIOS 的 Partition 長這樣</p>
<pre lang="text">Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            4095   1024.0 KiB  EF02  BIOS boot partition
   2            4096       209719295   100.0 GiB   FD00  Linux RAID
   3       209719296      5830086655   2.6 TiB     FD00  Linux RAID
   4      5830086656      5860533134   14.5 GiB    FD00  Linux RAID
</pre>
<p>請注意第一個 partition Code 是 EF02, size 只有 1MB, 這個保留給 GRUB 放 boot loader</p>
<p>如果要用 UEFI 開機 Partition table 是這樣,</p>
<pre lang="text">Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          616447   300.0 MiB   EF00  EFI System
   2          616448       420046847   200.0 GiB   FD00  Linux RAID
   3       420046848     11700000000   5.3 TiB     FD00  Linux RAID
   4     11700000768     11721045134   10.0 GiB    FD00  Linux RAID
</pre>
<p>第一個 Partition Table code 是 EF00, 這會 format 成 FAT 格式, 放 EFI Binary<br />
我設 300MB 太大了, 一般 100MB 就可以. 硬碟大就是任性!!</p>
<p>mount partition 並且 install EFI binary</p>
<pre lang="bash">$ mkdir -p /boot/efi
$ mkfs.vfat /dev/sda1
$ mount /dev/sda1 /boot/efi
</pre>
<p>Grub install 的時候改用這個參數</p>
<pre lang="bash">$ grub-install --efi=directory=/boot/efi
</pre>
<p>在 /etc/fstab 加上</p>
<pre lang="text">/dev/sda1  /boot/efi   vfat noauto,noatime 1 2
</pre>
<p>其他我到是沒有改什麼,</p>
<p>至於 BIOS 我是用技嘉的主機板, 在選擇開機選項時就會有一項<br />
(gentoo) HGST HDN726060AL<br />
這個設為第一個就可以了.</p>
<p>感覺移到 EFI 意外的簡單.</p>
<p>接近 190MB/s 算傳統硬碟內非常快的.</p>
<pre lang="text">md11 : active raid1 sda2[0] sdb2[2]
      209715136 blocks [2/1] [U_]
      [=======&gt;.............]  recovery = 38.2% (80207808/209715136) finish=11.5min speed=186778K/sec
      bitmap: 2/2 pages [8KB], 65536KB chunk

</pre>
<p>2018/2/23<br />
不知道為什麼, 今天換主機版的時候開不起來, 理論上之前做的步驟內的 EFI 消失了.<br />
兩顆都消失了那我之前是做什麼的呢?</p>
<p>照上面步驟重新執行一次</p>
<p>另外將檔案 copy 成 default EFI 認得到的檔案, 這樣 EFI BIOS 就直接可以認到了</p>
<p>2022/02/10</p>
<p>兩顆 HGST 似乎在存取上都有點問題，第一顆約半年前下線，下線後大概二個月死亡<br />
第二顆今天也讓他下線了，總使用時數約為 4.3 年左右<br />
果然是特價品啊</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2017/10/12/2181/gentoo-uefi-%e7%b3%bb%e7%b5%b1%e8%bd%89%e7%a7%bb/">[Gentoo] UEFI 系統轉移</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2017/10/12/2181/gentoo-uefi-%e7%b3%bb%e7%b5%b1%e8%bd%89%e7%a7%bb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
