<!DOCTYPE html>
    <html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
    <head>
<title>Cách boot Raspberry Pi từ ổ SSD</title>
<meta name="description" content="Cách boot Raspberry Pi từ ổ SSD - Savefile - Tin Tức - https&#x3A;&#x002F;&#x002F;www.nguoicodonvn2008.info&#x002F;vi&#x002F;news&#x002F;savefile&#x002F;kien-thuc-may-tinh&#x002F;cach-boot-raspberry-pi-tu-o-ssd-7978.html">
<meta name="author" content=".: Nguoicodonvn2008.info - Cõi lòng người cô đơn :.">
<meta name="copyright" content=".: Nguoicodonvn2008.info - Cõi lòng người cô đơn :. [admin@nguoicodonvn2008.info]">
<meta name="robots" content="index, archive, follow, noodp">
<meta name="googlebot" content="index,archive,follow,noodp">
<meta name="msnbot" content="all,index,follow">
<meta name="generator" content="NukeViet v4.5">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Cách boot Raspberry Pi từ ổ SSD">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Tin Tức - https&#x3A;&#x002F;&#x002F;www.nguoicodonvn2008.info&#x002F;vi&#x002F;news&#x002F;savefile&#x002F;kien-thuc-may-tinh&#x002F;cach-boot-raspberry-pi-tu-o-ssd-7978.html">
<meta property="og:site_name" content=".&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.">
<meta property="og:url" content="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-boot-raspberry-pi-tu-o-ssd-7978.html">
<link rel="shortcut icon" href="https://nguoicodonvn2008.info/favicon.ico">
<link rel="canonical" href="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-boot-raspberry-pi-tu-o-ssd-7978.html">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/" title="Tin Tức" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/karaoke-dual/" title="Tin Tức - Karaoke Dual" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/nhac-tre/" title="Tin Tức - Nhạc trẻ" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tru-tinh/" title="Tin Tức - Trữ tình" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/nuoc-ngoai/" title="Tin Tức - Nước ngoài" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/remix/" title="Tin Tức - Remix" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tam-su-tinh-yeu/" title="Tin Tức - Tâm sự tình yêu" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tho-suu-tam/" title="Tin Tức - Thơ sưu tầm" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/cuoc-song/" title="Tin Tức - Cuộc sống" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/phan-mem/" title="Tin Tức - Phần mềm" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/kien-thuc-may-tinh/" title="Tin Tức - Kiến thức máy tính" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/hoc-tap/" title="Tin Tức - Học tập" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tai-lieu/" title="Tin Tức - Tài liệu" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/de-thi/" title="Tin Tức - Đề thi" type="application/rss+xml">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/assets/css/font-awesome.min.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/bootstrap.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/style.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/style.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/news.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/custom.css" type="text/css">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/jquery/jquery.min.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/language/vi.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/DOMPurify/purify3.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/global.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/site.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/news.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/main.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/custom.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/bootstrap.min.js" type="text/javascript">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/bootstrap.non-responsive.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/style.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/style.non-responsive.css">
<link rel="StyleSheet" href="https://nguoicodonvn2008.info/themes/default/css/news.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/custom.css">
<style type="text/css">
	body{background: #fff;}
</style>
    </head>
    <body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">.&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.</h2>
		<p class="pull-right"><a title=".&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;." href="https://nguoicodonvn2008.info/">https://nguoicodonvn2008.info</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>Cách boot Raspberry Pi từ ổ SSD</h1>
		<ul class="list-inline">
			<li>Thứ sáu - 19/01/2024 01:05</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
		</div>
				<div class="imghome">
			<img alt="Cách boot Raspberry Pi từ ổ SSD" src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-1.jpg" width="460" class="img-thumbnail" />
		</div>
		<div class="clear"></div>
		<div id="bodytext" class="clearfix">
			<div class="content-detail textview" itemprop="articleBody">
<p style="text-align: justify;">Cả ổ SSD và thẻ SD đều sử dụng công nghệ lưu trữ flash tương tự nhau để lưu trữ dữ liệu. Tuy nhiên, SSD cung cấp các trình điều khiển nhanh và khả năng chịu lỗi cao hơn, khiến chúng đáng tin cậy hơn nhiều so với thẻ SD. Mặc dù hầu hết Raspberry Pi vẫn đang chạy trên thẻ nhớ microSD, bạn cũng có thể sử dụng ổ SSD ngoài để boot Raspberry Pi của mình.</p>

<p style="text-align: justify;">Dưới đây, bạn sẽ tìm hiểu các bước để kích hoạt khả năng boot USB trên Raspberry Pi, sau đó sử dụng ổ SSD ngoài làm phương tiện để boot Raspberry Pi OS và sử dụng dung lượng còn lại làm bộ lưu trữ vĩnh viễn cho dữ liệu của bạn.</p>

<h2 style="text-align: justify;">Những thứ bạn sẽ cần</h2>

<p style="text-align: justify;">Bạn sẽ cần những thứ sau để kích hoạt khả năng boot SSD trên Raspberry Pi:</p>

<ul>
	<li style="text-align: justify;">Raspberry Pi (4, 400, 3B+, Zero W hoặc Zero 2 W)</li>
	<li style="text-align: justify;">Thẻ nhớ microSD (tối thiểu 1GB, tối đa 64GB)</li>
	<li style="text-align: justify;">Đầu đọc thẻ nhớ microSD</li>
	<li style="text-align: justify;">Bàn phím và chuột (cả không dây hoặc có dây đều hoạt động) - không bắt buộc nếu bạn muốn kích hoạt khả năng boot SSD trên Raspberry Pi 4 hoặc Pi 400</li>
	<li style="text-align: justify;">Bất kỳ loại SSD ngoài nào (chẳng hạn như M.2, SATA hoặc NVMe/PCIe)</li>
	<li style="text-align: justify;">Hộp đựng USB cho SSD (nếu sử dụng SSD trong)</li>
</ul>

<h2 style="text-align: justify;">Boot Raspberry Pi 4 hoặc 400 từ SSD</h2>

<p style="text-align: justify;">Boot Raspberry Pi từ ổ SSD và sử dụng nó để lưu trữ vĩnh viễn có thể mang lại những cải tiến đáng kể về hiệu suất và độ tin cậy so với việc sử dụng thẻ nhớ microSD. Để boot Raspberry Pi 4 hoặc Raspberry Pi 400 từ SSD, bạn phải kích hoạt tính năng boot USB bằng cách làm theo các bước sau:</p>

<p style="text-align: justify;">1. Kết nối thẻ nhớ microSD với máy tính khác bằng đầu đọc thẻ.</p>

<p style="text-align: justify;">2. Tải xuống, cài đặt và khởi chạy công cụ Raspberry Pi Imager trên hệ thống Windows, Linux hoặc Mac của bạn.</p>

<div class="adbox adsense in-article" id="articleads">
<div aria-label="Advertisement" id="aswift_1_host" style="border: medium none; height: 0px; width: 694px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: hidden; opacity: 0; text-align: justify;" tabindex="0" title="Advertisement"><iframe allowtransparency="true" data-google-container-id="a!2" data-google-query-id="CMSHgpTk6IMDFdiN6QUdUF0INw" data-load-complete="true" frameborder="0" height="0" hspace="0" id="aswift_1" marginheight="0" marginwidth="0" name="aswift_1" sandbox="" scrolling="no" style="left: 0px; position: absolute; top: 0px; border: 0px none; width: 694px; height: 0px;" vspace="0" width="694"></iframe></div>
</div>

<p style="text-align: justify;">3. Nhấp vào nút <strong>Choose OS</strong> rồi chọn <strong>Misc Utility Images</strong> &gt; <strong>Bootloader</strong> &gt; <strong>USB</strong> <strong>Boot</strong>.</p>

<figure>
<div style="text-align: justify;"><img alt="Chọn USB Boot" class="lazy lightbox loaded" data-i="0" data-src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-1.jpg" data-was-processed="true" height="532" src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-1.jpg" style="height: 409px; width: 696px;" width="904" /></div>

<figcaption>
<div style="text-align: justify;">Chọn USB Boot</div>
</figcaption>
</figure>

<p style="text-align: justify;">4. Nhấp vào nút <strong>Choose Storage</strong> và chọn thẻ nhớ microSD được kết nối với hệ thống của bạn.</p>

<p style="text-align: justify;">5. Bấm vào <strong>Write</strong> và đợi quá trình flash hoàn tất. Nó sẽ chỉ mất một vài giây.</p>

<p style="text-align: justify;">6. Sau quá trình flash, thẻ nhớ microSD sẽ tự động được đẩy ra. Ngắt kết nối thẻ nhớ microSD khỏi hệ thống và lắp thẻ vào khe cắm thẻ nhớ microSD của Raspberry Pi 4 hoặc 400.</p>

<p style="text-align: justify;">7. Kết nối nguồn điện với Raspberry Pi để bật nó. Pi sẽ tự động đọc và flash USB bootloader từ thẻ nhớ microSD được kết nối. Việc này mất vài giây.</p>

<p style="text-align: justify;">8. Khi flash thành công, đèn LED màu xanh lục trên Raspberry Pi bắt đầu nhấp nháy đều đặn. Để xác nhận thêm, hãy kết nối <a data-type="internal" href="https://quantrimang.com/dien-may/cong-hdmi-arc-tren-tivi-dung-de-lam-gi-125958" title="Cổng HDMI (ARC) trên tivi dùng để làm gì?">cổng HDMI</a> với màn hình. Nếu màn hình hiển thị màn hình màu xanh lục, điều đó cho biết quá trình flash đã hoàn tất.</p>

<p style="text-align: justify;">9. Tắt Raspberry Pi và ngắt kết nối hoặc tháo thẻ nhớ microSD.</p>

<h2 style="text-align: justify;">Boot Raspberry Pi 3 hoặc Zero từ SSD</h2>

<p style="text-align: justify;">Để kích hoạt khả năng boot SSD trên Raspberry Pi 3, Zero W hoặc Zero 2 W, bạn cần flash Raspberry Pi OS tiêu chuẩn trên thẻ nhớ microSD, boot Raspberry Pi và thực hiện một số thay đổi đối với các file cấu hình để kích hoạt USB (SSD) boot. Các bước thực hiện như sau:</p>

<div class="adbox in-article adsense" id="articleads2">
<div aria-label="Advertisement" id="aswift_2_host" style="border: medium none; height: 0px; width: 694px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: hidden; opacity: 0; text-align: justify;" tabindex="0" title="Advertisement"><iframe allowtransparency="true" data-google-container-id="a!3" data-google-query-id="COvHmJXk6IMDFR6V6QUdufIKvQ" data-load-complete="true" frameborder="0" height="0" hspace="0" id="aswift_2" marginheight="0" marginwidth="0" name="aswift_2" sandbox="" scrolling="no" style="left: 0px; position: absolute; top: 0px; border: 0px none; width: 694px; height: 0px;" vspace="0" width="694"></iframe></div>
</div>

<p style="text-align: justify;">1. Lắp thẻ nhớ microSD vào hệ thống và khởi chạy công cụ Raspberry Pi Imager.</p>

<p style="text-align: justify;">2. Bấm vào <strong>Choose</strong> <strong>OS</strong> rồi chọn <strong>Raspberry</strong> <strong>Pi</strong> <strong>OS (32-bit)</strong>.</p>

<figure>
<div style="text-align: justify;"><img alt="Ghi Raspberry Pi OS lên thẻ SD" class="lazy lightbox loaded" data-adbro-processed="true" data-i="1" data-src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-2.jpg" data-was-processed="true" height="557" src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-2.jpg" style="height: 415px; width: 696px;" width="934" /></div>

<figcaption>
<div style="text-align: justify;">Ghi Raspberry Pi OS lên thẻ SD</div>
</figcaption>
</figure>

<p style="text-align: justify;">3. Nhấp vào <strong>Choose</strong> <strong>Storage</strong> và chọn thẻ nhớ microSD từ các thiết bị lưu trữ có sẵn.</p>

<p style="text-align: justify;">4. Theo tùy chọn, bạn có thể nhấp vào biểu tượng bánh răng để hiển thị các tùy chọn nâng cao, sau đó nhập chi tiết WiFi của mạng và bật <strong>SSH</strong>.</p>

<p style="text-align: justify;">5. Nhấp vào nút <strong>Write</strong>.</p>

<p style="text-align: justify;">6. Sau khi quá trình flash hoàn tất, hãy rút thẻ nhớ ra khỏi hệ thống, lắp thẻ vào Raspberry Pi 3, Zero hoặc Zero 2 W và bật nó lên.</p>

<p style="text-align: justify;">7. Kết nối bàn phím và chuột với Raspberry Pi.</p>

<p style="text-align: justify;">8. Sau khi boot, hãy đăng nhập bằng tên người dùng mặc định <strong>pi</strong> và mật khẩu <strong>Raspberry</strong> (trừ khi bạn đã thay đổi những thông tin này trong tùy chọn nâng cao Raspberry Pi Imager).</p>

<p style="text-align: justify;">9. Mở cửa sổ Terminal và chạy các lệnh sau.</p>

<div class="codebar" style="text-align: justify;"></div>

<pre class="language- language-none prettyprint" id="pre0">
<code>sudo apt update -y
sudo apt full-upgrade -y</code></pre>

<p style="text-align: justify;">10. Sau khi cập nhật và nâng cấp các gói, hãy chạy lệnh sau trong cửa sổ Terminal.</p>

<div class="codebar" style="text-align: justify;"></div>

<pre class="language- language-none prettyprint" id="pre1">
<code>vcgencmd otp_dump | grep 17</code></pre>

<p style="text-align: justify;">11. Đầu ra sẽ hiển thị mã <strong>17:1020000a</strong>, cho biết khả năng boot USB đã bị vô hiệu hóa. Để kích hoạt USB boot, chúng ta cần chỉnh sửa file config.txt bằng cách chạy lệnh sau.</p>

<div class="codebar" style="text-align: justify;"></div>

<pre class="language- language-none prettyprint" id="pre2">
<code>sudo nano config.txt</code></pre>

<p style="text-align: justify;">12. Cuộn xuống cuối file. Đối với dòng cuối cùng, thêm đoạn code sau.</p>

<div class="codebar" style="text-align: justify;"></div>

<pre class="language- language-none prettyprint" id="pre3">
<code>program_usb_boot_mode=1</code></pre>

<p style="text-align: justify;">Nhấn <strong>Ctrl + X</strong>, gõ <strong>Y</strong> và nhấn phím <strong>Enter</strong> để lưu các thay đổi. Ngoài ra, bạn có thể chạy lệnh sau để thêm code cần thiết vào file <strong>config.txt</strong> và bật tính năng boot USB trên Raspberry Pi 3, Zero hoặc Zero 2 W.</p>

<div class="codebar" style="text-align: justify;"></div>

<pre class="language- language-none prettyprint" id="pre4">
<code>echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt</code></pre>

<figure>
<div style="text-align: justify;"><img alt="Kích hoạt USB boot trên Raspberry Pi 3 Zero W" class="lazy lightbox loaded" data-i="2" data-src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-3.jpg" data-was-processed="true" height="729" src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-3.jpg" style="height: 468px; width: 696px;" width="1083" /></div>

<figcaption>
<div style="text-align: justify;">Kích hoạt USB boot trên Raspberry Pi 3 Zero W</div>
</figcaption>
</figure>

<div class="adbox in-article" id="articleads3">
<div aria-label="Advertisement" id="aswift_3_host" style="border: medium none; height: 0px; width: 694px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: hidden; opacity: 0; text-align: justify;" tabindex="0" title="Advertisement"><iframe allowtransparency="true" data-google-container-id="a!4" data-google-query-id="CPe7ppzk6IMDFTmG6QUdQH0NFQ" data-load-complete="true" frameborder="0" height="0" hspace="0" id="aswift_3" marginheight="0" marginwidth="0" name="aswift_3" sandbox="" scrolling="no" style="left: 0px; position: absolute; top: 0px; border: 0px none; width: 694px; height: 0px;" vspace="0" width="694"></iframe></div>
</div>

<p style="text-align: justify;">13. Khởi động lại Raspberry Pi rồi chạy lệnh sau để xác nhận xem USB boot có được bật hay không.</p>

<div class="codebar" style="text-align: justify;"></div>

<pre class="language- language-none prettyprint" id="pre5">
<code>vcgencmd otp_dump | grep 17</code></pre>

<p style="text-align: justify;">14. Nếu đầu ra hiển thị là <strong>17:3020000a</strong>, USB boot đã được bật. Bây giờ, bạn có thể tháo thẻ nhớ microSD khỏi Raspberry Pi 3, Zero hoặc Zero 2 W.</p>

<figure>
<div style="text-align: justify;"><img alt="Đã bật USB boot trên Raspberry Pi 3" class="lazy lightbox loaded" data-i="3" data-src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-4.jpg" data-was-processed="true" height="758" src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-4.jpg" style="height: 486px; width: 696px;" width="1085" /></div>

<figcaption>
<div style="text-align: justify;">Đã bật USB boot trên Raspberry Pi 3</div>
</figcaption>
</figure>

<p style="text-align: justify;">15. Sau khi bật boot USB, bạn có thể xóa code khỏi file config.txt bằng trình chỉnh sửa nano hoặc lệnh sau.</p>

<div class="codebar" style="text-align: justify;"></div>

<pre class="language- language-none prettyprint" id="pre6">
<code>sudo sed -i &#039;s/program_usb_boot_mode=1//g&#039; /boot/config.txt</code></pre>

<h2 style="text-align: justify;">Chuẩn bị SSD Raspberry Pi có khả năng boot</h2>

<p style="text-align: justify;">Để boot Raspberry Pi Zero, Raspberry Pi 3, Raspberry Pi 4 hoặc Raspberry Pi 400 qua SSD, bạn phải cài đặt hệ điều hành như Raspberry Pi OS trên SSD bằng cách sử dụng Raspberry Pi Imager (hoặc công cụ Balena Etcher).</p>

<p style="text-align: justify;">Trong trường hợp bạn đang chạy hệ điều hành và service qua thẻ nhớ microSD, bạn có thể sao chép thẻ SD vào ổ cứng USB bằng Balena Etcher.</p>

<p style="text-align: justify;">Sau khi ghi hoặc clone hệ điều hành, bạn có thể kết nối SSD với Raspberry Pi thông qua cổng USB và chạy trên Raspberry Pi. Pi sẽ tự động phát hiện USB và boot hệ điều hành từ SSD. Nếu không phát hiện được thiết bị lưu trữ USB, Raspberry Pi sẽ tiếp tục boot từ thẻ nhớ microSD (nếu được kết nối).</p>

<p style="text-align: justify;">Để chuẩn bị boot SSD, hãy làm theo các bước sau:</p>

<p style="text-align: justify;">1. Khởi chạy công cụ Raspberry Pi Imager và kết nối ổ SSD ngoài với hệ thống Windows, macOS hoặc Linux thông qua cổng USB.</p>

<p style="text-align: justify;">2. Bấm <strong>Choose OS</strong> để chọn hệ điều hành mong muốn từ danh sách. Nếu bạn muốn flash image hệ điều hành đã tải xuống, bạn có thể sử dụng file hệ điều hành bằng cách nhấp vào tùy chọn <strong>Use Custom</strong> và sau đó chọn file hệ điều hành từ hệ thống của bạn.</p>

<p style="text-align: justify;">3. Nhấp vào <strong>Choose Storage</strong> để chọn phương tiện lưu trữ SSD được kết nối.</p>

<p style="text-align: justify;">4. Bấm vào nút <strong>Write</strong>.</p>

<figure>
<div style="text-align: justify;"><img alt="Flash Raspberry Pi OS trên SSD ngoài để boot USB trong Raspberry Pi" class="lazy lightbox loaded" data-i="4" data-src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-5.jpg" data-was-processed="true" height="452" src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-5.jpg" style="height: 452px; width: 682px;" width="682" /></div>

<figcaption>
<div style="text-align: justify;">Flash Raspberry Pi OS trên SSD ngoài để boot USB trong Raspberry Pi</div>
</figcaption>
</figure>

<div class="adbox adsense in-article">
<div aria-label="Advertisement" id="aswift_4_host" style="border: medium none; height: 0px; width: 694px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: hidden; opacity: 0; text-align: justify;" tabindex="0" title="Advertisement"><iframe allowtransparency="true" data-google-container-id="a!5" data-google-query-id="CLnkl53k6IMDFYPRvQoduSAIQA" data-load-complete="true" frameborder="0" height="0" hspace="0" id="aswift_4" marginheight="0" marginwidth="0" name="aswift_4" sandbox="" scrolling="no" style="left: 0px; position: absolute; top: 0px; border: 0px none; width: 694px; height: 0px;" vspace="0" width="694"></iframe></div>
</div>

<p style="text-align: justify;">5. Sau khi hệ điều hành được flash trên SSD, hãy tháo ổ SSD khỏi hệ thống một cách an toàn, sau đó kết nối ổ SSD USB với một trong các cổng USB 3.0 hoặc 2.0 trên Raspberry Pi 4/400, Raspberry Pi 3 (hoặc với Zero W hoặc 2 W qua cổng micro-USB qua adapter USBOTG).</p>

<p style="text-align: justify;">6. Kết nối nguồn điện để bật Raspberry Pi.</p>

<p style="text-align: justify;">7. Raspberry Pi sẽ kiểm tra ổ SSD có khả năng boot được kết nối với cổng USB và boot hệ điều hành.</p>

<h2 style="text-align: justify;">Sử dụng ổ SSD làm bộ lưu trữ vĩnh viễn cho Raspberry Pi</h2>

<p style="text-align: justify;">Sau khi boot hệ điều hành từ ổ SSD ngoài, bạn có thể sử dụng dung lượng còn sót lại trong SSD làm bộ nhớ vĩnh viễn để lưu trữ các dữ liệu khác.</p>

<p style="text-align: justify;">Để kiểm tra dung lượng lưu trữ còn trống, hãy chạy lệnh sau trong ứng dụng Terminal.</p>

<div class="codebar" style="text-align: justify;"></div>

<pre class="language- language-none prettyprint" id="pre7">
<code>df -h</code></pre>

<p style="text-align: justify;">Nếu bạn đang sử dụng phiên bản Desktop của Raspberry Pi OS, hãy mở <strong>File Manager</strong> và nhấp vào <strong>Filesystem Root</strong> ở đầu màn hình. Bạn có thể thấy dung lượng lưu trữ có sẵn ở góc dưới bên phải.</p>

<figure>
<div style="text-align: justify;"><img alt="Kiểm tra dung lượng trống trong Raspberry Pi" class="lazy lightbox loaded" data-i="5" data-src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-6.jpg" data-was-processed="true" height="844" src="https://st.quantrimang.com/photos/image/2024/01/19/boot-raspberry-pi-tu-ssd-6.jpg" style="height: 391px; width: 696px;" width="1500" /></div>

<figcaption>
<div style="text-align: justify;">Kiểm tra dung lượng trống trong Raspberry Pi</div>
</figcaption>
</figure>

<h2 style="text-align: justify;">Mở rộng hệ thống file</h2>

<p style="text-align: justify;">Nếu không thấy hết dung lượng ổ SSD, bạn có thể làm theo các bước sau để mở rộng hệ thống file trên Raspberry Pi.</p>

<ol>
	<li style="text-align: justify;">Mở Terminal và chạy lệnh sau để cập nhật và nâng cấp các gói và kho lưu trữ.
	<div class="codebar"></div>

	<pre class="language- language-none prettyprint" id="pre8">
<code>sudo apt update -y
sudo apt upgrade -y</code></pre>
	</li>
	<li style="text-align: justify;">Sau đó gõ <strong>sudo raspi-config</strong> và nhấn phím <strong>Enter</strong>.</li>
	<li style="text-align: justify;">Sử dụng các phím mũi tên xuống để di chuyển vùng chọn sang <strong>Advanced Options</strong> và nhấn phím <strong>Enter</strong>.</li>
	<li style="text-align: justify;">Di chuyển vùng chọn sang <strong>Expand Filesystem</strong> và nhấn phím <strong>Enter.</strong></li>
	<li style="text-align: justify;">Trên màn hình tiếp theo, chọn <strong>OK</strong> và nhấn phím <strong>Enter.</strong></li>
	<li style="text-align: justify;">Sau đó chọn <strong>Finish</strong> và nhấn phím <strong>Enter.</strong></li>
	<li style="text-align: justify;">Bạn sẽ được yêu cầu khởi động lại Raspberry Pi; chọn <strong>Yes</strong> và nhấn phím <strong>Enter</strong> để khởi động lại.</li>
	<li style="text-align: justify;">Sau khi khởi động lại, nhập lệnh <strong>df -h</strong> để kiểm tra lại dung lượng lưu trữ còn trống. Bạn sẽ thấy bộ lưu trữ SSD hoàn chỉnh có sẵn để sử dụng trên Raspberry Pi 3, 4, Zero W hoặc Zero 2 W.</li>
</ol>

<p style="text-align: justify;">Cuối cùng, sử dụng lệnh <strong>rsync</strong> hoặc <strong>cp</strong> để di chuyển dữ liệu từ thẻ nhớ microSD sang ổ SSD. Đảm bảo kết nối thẻ nhớ microSD với Raspberry Pi.</p>

<p style="text-align: justify;">Giờ đây, bạn đã có bộ lưu trữ SSD nhanh hơn và có thể sử dụng nó để xây dựng bộ lưu trữ đám mây cá nhân có thể truy cập từ mọi nơi hoặc để host một trang web an toàn trên Raspberry Pi.</p>

<p style="text-align: justify;">Bạn cũng có thể xây dựng Raspberry Pi NAS bằng cách cài đặt Samba và sử dụng SSD làm bộ lưu trữ mạng trong mạng gia đình hoặc văn phòng của bạn.</p>
</div>
		</div>
				<div id="author">
						<p>
				<strong>Nguồn tin:</strong>
				Quantrimang.com
			</p>
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-boot-raspberry-pi-tu-o-ssd-7978.html" title="Cách boot Raspberry Pi từ ổ SSD">https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-boot-raspberry-pi-tu-o-ssd-7978.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; .&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.
		</div>
		<div id="contact">
			<a href="mailto:admin@nguoicodonvn2008.info">admin@nguoicodonvn2008.info</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="https://nguoicodonvn2008.info/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
		</script>
		<div class="car-top">
  <span><img src="https://nguoicodonvn2008.info/themes/default/images/car.png" alt=""></span>
</div>
<script src="https://nguoicodonvn2008.info/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="news",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=-4,nv_my_abbr="EDT",nv_cookie_prefix="nv4c_e856T",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=0,nv_recaptcha_ver=2,nv_recaptcha_sitekey="",nv_recaptcha_type="image",XSSsanitize=1;</script>
<script src="https://nguoicodonvn2008.info/assets/js/language/vi.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/DOMPurify/purify3.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/global.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/site.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/news.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/main.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/custom.js"></script>
<script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "Organization",
            "url": "https://nguoicodonvn2008.info",
            "logo": "https://nguoicodonvn2008.info/uploads/angel.gif"
        }
        </script>
<script src="https://nguoicodonvn2008.info/themes/default/js/bootstrap.min.js"></script>
<script type="text/javascript">
var $scrolltop = $('.car-top');
$scrolltop.on('click', function () {
    $('html,body').animate({
        scrollTop: 0
    }, 800);
    $(this).addClass("car-run");
    setTimeout(function(){ $scrolltop.removeClass('car-run');}, 1000);
    return false;
});
$(window).on('scroll', function ()
{ 
    if($(window).scrollTop() >= 200)
    {
        $scrolltop.addClass("show");
        $scrolltop.addClass("car-down");
    }
    else
    {
       $scrolltop.removeClass("show");
       setTimeout(function(){ $scrolltop.removeClass('car-down');}, 300);
    }
});
</script>
</body>
</html>