Social Icons

twitterfacebookgoogle plusrss feedemail

5/21/2013

ISOLinux 如何製作開機光碟

前面已經講過如何製作USBlinux

相關連結
[USB linux] 1.打造2MB 的 linux USB 隨身碟
[USB linux] 2.核心編譯
[USB linux] 3.建立ramdisk的root filesystem (initrd)
[USB linux] 4.建置busybox
[USB linux] 5.最後步驟建置boot loader

至於要如何把自己做的kernel做成開機光碟或者iso檔給別人下載呢?
ISOLinux中告訴我們要這麼做
  • Make sure you have a recent enough version of mkisofs. I recommend mkisofs 1.13 (distributed with cdrecord 1.9), but 1.12 might work as well (not tested). Binary versions for Windows can be found on the web.
  • Download Syslinux
  • Create a directory called "CD_root". This is the ISO image master file tree
    • Copy all files you want to have on the CD into this directory
  • Create a directory called "isolinux" underneath the directory "CD_root"
  • Create directories "images" and "kernel" underneath the directory "CD_root"
    • Copy any floppy images you want to boot into "images"
    • Copy "memdisk/memdisk" from the Syslinux archive into "kernel"
  • Use the following command to create your ISO image:
mkisofs -o output.iso \
   -b isolinux/isolinux.bin -c isolinux/boot.cat \
   -no-emul-boot -boot-load-size 4 -boot-info-table \
   CD_root
The file boot.cat will be automatically created.


其實跟USBLinux相同~在這邊我們假設已經做好kernel、root filesystem(initrd),如果沒有這些檔案請先參考前面的USBlinux文章

在這邊因為上面官方講解很清楚了所以我暫時就不在多敘述~
其中 isolinux.cfg 其實跟我們在usb linux製作的syslinux.cfg這個檔案是相同的(名稱不同而已)
另外官方給的範例是muti-boot 不過這邊我們因為只有一個kernel所以必須要做點修改
(或者你可以使用syslinux.cfg裡面的內容)

最後生成的ISO檔就可以燒錄成光碟 或者利用VM來做啟動~

沒有留言:

張貼留言

俗話說
凡走過必留下痕跡,凡住過必留下鄰居
凡爬過必留下樓梯,凡來過必留下IP
看過文章之後歡迎留下您寶貴的意見喔!

 
 
无觅相关文章插件,迅速提升网站流量