Debian4.0r2 的liveCD移植到USB 隨身碟內開機安裝(2008.05.02 by alex)
其作法優點為機動性高/主控性強/省錢又環保, 步驟如下:
1.首先在WindowsXP下載syslinux-3.61.zip, 再將它解壓縮到 D: 去, 取出 Debian40r2.iso 光碟 liveCD 罝入光碟機中.
2.將隨身碟插入 USB (假設為 E: ), 將 USB 隨身碟格式化完成.
3.完成格式化後,由左下方 開始→執行→輸入cmd, 再來是輸入以下指令:
d:
cd\syslinux-3.61\win32
syslinux e:
在USB 隨身碟 e: 下產生一個 ldlinux.sys 唯讀隱藏檔.
copy syslinux.exe e:
copy syslinux.c e:
copy makefile e:
拷貝三個檔案到USB 隨身碟 e:
4. 到LiveCD裡面的isolinux這個目錄, 把目錄裡面的檔案全部拷貝到 e: 的根目錄裡, 再到 e: 的根目錄中把isolinux.cfg及isolinux.bin改名為syslinux.cfg及syslinux.bin.
5. 最後將LiveCD裡的所有檔案及目錄都拷貝到USB 隨身碟 e: 的根目錄裡.
6. 在USB 隨身碟 e: 的根目錄裡新建一個名為 makeboot.bat 的批次檔案, 內容如下:
@echo off
rem This batch file was modified by Steven Shiau.
rem The original one is from PDLA http://pendrivelinux.com
rem This batch file was created by ©2007 PDLA http://pendrivelinux.com
cls
echo -----------------------------------------------------------
echo This batch file will prepare drive %~d0 for boot using syslinux!
echo -----------------------------------------------------------
echo.
echo.
echo --------------------- WARNING!: ---------------------------------
echo.
echo Run this file from your portable USB device ONLY.
echo Running this file from your hard drive may overwrite your current
echo Master Boot Record (MBR) and render your Windows Operating System
echo un-bootable. YOU HAVE BEEN WARNED!
echo.
echo This batch file is offered in hopes that it will be useful and
echo comes with absolutely no warranty. USE AT YOUR OWN RISK!
echo.
echo -----------------------------------------------------------
echo.
echo.
echo Press any key to make drive %~d0 bootable
echo or close this window to abort...
pause > nul
cls
syslinux.exe -ma %~d0
echo.
echo ~~~~~~~~ Congratulations ~~~~~~~
echo.
echo The hidden file ldlinux.sys has been installed
echo Your %~d0 drive should now be bootable.
echo.
echo.
echo Press any key to exit this window!
pause > nul
7. 完成後儲存檔案, 由左下方 開始→執行→輸入cmd, 再來是輸入以下指令:
e:
makeboot
[Enter]
[Enter]
8. USB 隨身碟開機重新引導OK! 移除USB 隨身碟, 大功告成! 請多指教!