在 Linux 下備份或BIOS 更新

來源:互聯網
上載者:User
Flashrom 這款工具來自於http://www.coreboot.org/Flashrom項目(即著名的 LinuxBIOS)。藉助該工具,我們可以在 Linux 下輕鬆、方便的備份或BIOS 更新。

安裝 Flashrom

在使用 Flashrom 之前,首先你需要安裝它。目前,一些流行的 Linux 發行版都可以通過自身的包管理器來安裝 Flashrom。例如,Debian/Ubuntu 使用者可執行如下命令:

$ sudo apt-get install flashrom

Fedora 使用者需執行:

$ sudo yum install flashrom

如果你不能通過所使用 Linux 發行版的包管理器安裝 Flashrom,那麼可選擇手動編譯安裝。只需執行以下命令:

$ svn co svn://coreboot.org/repos/trunk/util/flashrom
$ cd flashrom
$ make
$ sudo make install

注意,你將需要編譯工具、Subversion、依賴包 pciutils 和 zlib 等東東。

Flashrom 用法

除了通過 http://www.coreboot.org/Flashrom 查詢 Flashrom 是否支援你目前的主板、晶片之外,你也可以直接使用 Flashrom 工具來檢測。使用 root 使用者權限執行 flashrom 指令後,Flashrom 將輸出類似下面的資訊:

Calibrating delay loop... OK.
No coreboot table found.
Found chipset "Intel ICH7/ICH7R", enabling flash write... OK.
Found chip "Winbond W39V040B" (512 KB) at physical address 0xfff80000.
No operations were specified.

如果你想把當前的 BIOS 映像備份下來,那麼可執行:

# flashrom -r bios_image.bin

同樣的,Flashrom 也將提供輸出資訊供參考:

Calibrating delay loop... OK.
No coreboot table found.
Found chipset "Intel ICH7/ICH7R", enabling flash write... OK.
Found chip "Winbond W39V040B" (512 KB) at physical address 0xfff80000.

Reading flash... done.

刷寫新的 BIOS 則可以執行:

# flashrom -wv new_bios.bin

某些晶片驅動需要先擦除後方能正常寫入:

# flashrom -E

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.