跳到主要內容

[Linux] 用 dd 指令燒錄 usb 開機碟

環境:elementary os
目標:把預燒錄的 iso 檔案燒錄到 usb 隨身碟內,做成開機磁碟。


  1. 用 lsblk 指令看隨身碟掛載在哪個位置。(通常掛載在 /media/... 路徑內,或是用視窗的檔案瀏覽器觀看顯示的 usb 磁碟名稱,再看 /media/ 下哪一個磁碟名稱跟 usb 隨身碟同名)

    lsblk 顯示的畫面會類似:
    sdc          8:32   1   7.1G  0 disk
    └─sdc1   8:33   1   7.1G  0 part /media/<這裡會顯示 usb 路徑及名稱>

  2. 下指令卸載隨身碟:
    umount /media/<usb 路徑及名稱>
    然後再次用 lsblk 檢查是否卸載成功。

  3. 用 sudo 權限下 dd 指令燒錄:
    sudo dd if=<path_of_iso_file>.iso of=/dev/sdc bs=1M

    bs=1M 意思是一次要寫入幾個 byte,官方說明寫著:
    bs=BYTE: read and write up to BYTES bytes at a time (default: 512); overrides ibs and obs.
  4. 燒錄結束時,會顯示類似如下的 report:
    輸入 1419+1 個紀錄
    輸出 1419+1 個紀錄
    1488797696 bytes (1.5 GB, 1.4 GiB) copied, 831.393 s, 1.8 MB/s




留言

這個網誌中的熱門文章

[Linux] Elementary OS 字體調校

用 gesetting 取得 elementary os 的等寬字體(這也是終端機默認字體): gsettings get org.gnome.desktop.interface monospace-font-name 會顯示目前字型跟字體大小: Roboto Mono 10 設定字體大小: gsettings set org.gnome.desktop.interface monospace-font-name 'Roboto Mono 12' 可以微調 text-scaling-factor: gsettings set org.gnome.desktop.interface text-scaling-factor <value>

[Vim] 我的 .vimrc

我用過的文字編輯器有 sublime text/atom/notepad++/gedit 等等。 後來我在 window 和 Linux 寫程式還是比較慣用 vim。 以下整理我常用的 .vimrc:  set nu "show line number. set rnu "related line number. nmap ; : "replace ';' with ':' in normal mode. set ai "auto indent set mouse=a "activate mouse set expandtab "replace tab with space. set tabstop=4 "replace tab with 4 spaces. set bg=dark "background set to dark. color desert "color scheme. syntax on "enable syntax highlight. " auto complete: inoremap ( ()<Esc>i inoremap ' ''<Esc>i inoremap " ""<Esc>i inoremap [ []<Esc>i inoremap { {}<Esc>i set cursorline " active cursorline 到此 vim 搭配 Ctrl + N 當自動補全,已經很好用了,之後有好用設定會再補上來。

[心得] 復古、老派的程式設計之路

最近看到 John Carmack 2018 年的貼文中的幾段話: I’m not a Unix geek.  I get around ok, but I am most comfortable developing in Visual Studio on Windows.  I thought a week of full immersion work in the old school Unix style would be interesting, even if it meant working at a slower pace.  It was sort of an adventure in retro computing — this was fvwm and vi.  Not vim, actual BSD vi. In the end, I didn’t really explore the system all that much, with 95% of my time in just the basic vi / make / gdb operations.  I appreciated the good man pages, as I tried to do everything within the self contained system, without resorting to internet searches.  Seeing references to 30+ year old things like Tektronix terminals was amusing. In the spirit of my retro theme, I had printed out several of Yann LeCun’s old papers and was considering doing everything completely off line, as if I was actually in a mountain cabin somewhere, but I wound up watching a lot of the Stanford CS231N lectur...