Ubuntu initrd

Loading

gz

但如果是 Ubuntu 9.10 以前的版本,壓縮方式採用 .gz 的壓縮方式.

	
[root@benjr ~]# mkdir initrd
[root@benjr ~]# cd initrd
[root@benjr initrd]# gzip -dc /mnt/casper/initrd.gz | cpio -id

gz 壓縮方式

	
[root@benjr ~]# find . | cpio –quiet –dereference -o -H newc | gzip -9 > ~/new-initrd.gz

lz

Ubuntu 9.10 以後的版本其 initrd 檔案壓縮方式不同於以往他採用了 lz 的壓縮方式.需要使用 lzma 來解壓縮. 參考文件 https://wiki.ubuntu.com/CustomizeLiveInitrd 

	
[root@benjr ~]# mkdir initrd
[root@benjr ~]# cd initrd
[root@benjr initrd]# lzma -dc -S .lz /mnt/casper/initrd.lz | cpio -id

Linux 2.6 核心採用新版的 initial RAM disks "initramfs" 新版的 initrd 使用了 cpio 來存放資料,所以前面解壓縮完成再修改需要的內容,之後還需要再次使用 cpio 來打包,壓縮可以使用 lz 的方式,詳細步驟如下:

	
[root@benjr ~]# find . | cpio –quiet –dereference -o -H newc | lzma -7 > ~/new-initrd.lz
沒有解決問題,試試搜尋本站其他內容

3 thoughts on “Ubuntu initrd

  1. 自動引用通知: Legacy – PXE Boot – Benjr.tw
  2. 您好:想請教一下,我測試使用Ubuntu 12.04.02(Desktop DVD),並抽出casper內的vmlinuz.efi以及initrd.lz,使用PXE開機後都會停在Busybox的指令畫面,但使用Ubuntu 12.04.02(alternate)版本的vmlinuz以及initrd.gz,卻沒有上述的問題,也可以全程使用ks安裝完畢,請問這個問題有什麼方向可以查,網路上的文件幾乎都是版本10以前用vmlinuz以及initrd.gz,謝謝

    1. 如果要安裝 Ubuntu Desktop ( ubuntu11.04 以後的版本),可能需要設定成 LiveCD 的安裝方式,請參考 http://benjr.tw/1138

      Alternate install CD 是比較特別的版本

      The alternate install cd allows you to perform certain specialist installations of Ubuntu. It provides for the following situations:

      • setting up automated deployments
      • upgrading from older installations without network access
      • LVM and/or RAID partitioning
      • installs on systems with less than about 384MiB of RAM

      請參考 http://releases.ubuntu.com/12.04.5/

發佈回覆給「admin」的留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料