備份Ubuntu12.04 並製作成iso安裝檔案
這兩天因為要做Ubuntu的平臺移植,一直在給自己電腦上的Ubuntu系統裝各種軟體,其間幾次將核心破壞,導致不得不重灌系統,經過幾次痛苦的等待,痛定思痛,決定試一試能不能將自己的Ubuntu系統定製好,製作成安裝光碟。
經過在CSDN的一番尋找,終於找到了我要的方法,哈哈。在這裡非常感謝軟體的原作者,也是很佩服他,Remastersys是由他一個人寫成的。
本方法主要是依靠名為Remastersys的工具,當然,據我猜測,寫出這個軟體的大神也是根據Ubuntu官網上那一堆我看不懂的英文講解做的,趕腳自己水平可以的同學直接去看官網介紹(https://help.ubuntu.com/community/InstallCDCustomization?action=show&redirect=InstallCDCustomizationHowTo)。
sudo su
wget -O - http://www.remastersys.com/ubuntu/remastersys.gpg.key | apt-key add -
程式碼: #新增源
sudo echo 'deb http://www.remastersys.com/ubuntu precise main' >> /etc/apt/sources.list
程式碼: #安裝命令列、前端
sudo apt-get update --fix-missing
sudo apt-get install remastersys
sudo apt-get install remastersys-gtk
下面是步驟詳解:
0. http://www.remastersys.com/ubuntu 下載remastersys.gpg.key, 然後sudo apt-key add remastersys.gpg.key
1.執行終端,將deb http://www.remastersys.com/ubuntu precise main加入到軟體源中(/etc/apt/source.list)
2.apt-get update一下,然後install remastersys;
3.sudo remastersys;
4.sudo remasstersy dist cdfs,然後要耐心等待,這裡千萬不要亂操作;
5.sudo remastersys dist iso filename.iso,這裡filename自己輸入替代。
大功告成!在/home/remastersys中就可以找到你要製作的光碟映象了~
另附:remastersys命令詳解:
remastersys的語法: sudo remastersys backup|clean|dist [cdfs|iso] [filename.iso]
1)將你的系統備份製成一個live cd/dvd sudo remastersys backup
2) 將你的系統備份製成一個live cd/dvd其名叫 custom.iso 的ISO檔案.
sudo remastersys backup custom.iso
3)清除由remastersys產生的臨時檔案 sudo remastersys clean
4) 產生一個可釋出又包括你的個人資料的 livecd/dvd
sudo remastersys dist
5) 產生一個只有檔案系統的可釋出的 livecd/dvd
sudo remastersys dist cdfs
6) 為了產生一個可釋出又包括你的個人資料的 livecd/dvd 其名叫 custom.iso的ISO檔案:
sudo remastersys dist iso custom.iso
1;新增源;
The Remastersys repository needs to be added to your /etc/apt/sources.list
sudo vi /etc/apt/sources.list或
sudo gedit / etc / apt / sources.list (Ubuntu)
Paste the following into the sources.list:
# Remastersys
deb http://www.remastersys.klikit-linux.com/repository remastersys/
Save and exit the file.
2,升級
Update the source list using the following command
sudo apt-get update
Install remastersys using the following command
3;安裝 remastersys
sudo apt-get install remastersys
This will complete the installation
4;使用軟體
Using Remastersys
In order to learn how you can use remastersys, run
sudo remastersys
5;選擇生成ISO檔案的地址
remastersys Syntax
sudo remastersys backup|clean|dist [cdfs|iso] [filename.iso]
6;開始製作UBUNTU D的ISO檔案
remastersys Examples
1) to make a livecd/dvd backup of your system
sudo remastersys backup
2) to make a livecd/dvd backup and call the iso custom.iso
sudo remastersys backup custom.iso
3) to clean up temporary files of remastersys
sudo remastersys clean
4) to make a distributable livecd/dvd of your system
sudo remastersys dist
5) to make a distributable livecd/dvd filesystem only
sudo remastersys dist cdfs
6) to make a distributable iso named custom.iso but only if the cdfs is already present
sudo remastersys dist iso custom.iso
cdfs and iso options should only be used if you wish to modify something on the cd before the iso is created. An example of this would be to modify the isolinux portion of the livecd/dvd
Creating An ISO Image
To create an iso image of your installation, simply run
sudo remastersys dist
This will create an iso image called customdist.iso in the /home/remastersys directory. The dist option makes that your personal folder (e.g. /home/ruchi) will not be included in the iso image. You might have to insert your Ubuntu installation CD during the
process.
This is how the end of the process looks:
[...]
92.16% done, estimate finish Wed DEC 28 15:31:25 2007
93.39% done, estimate finish Wed DEC 28 15:31:25 2007
94.62% done, estimate finish Wed DEC 28 15:31:24 2007
95.85% done, estimate finish Wed DEC 28 15:31:24 2007
97.08% done, estimate finish Wed DEC 28 15:31:25 2007
98.31% done, estimate finish Wed DEC 28 15:31:25 2007
99.54% done, estimate finish Wed DEC 28 15:31:25 2007
Total translation table size: 2048
Total rockridge attributes bytes: 3950
Total directory bytes: 9094
Path table size(bytes): 54
Max brk space used 0
406890 extents written (794 MB)
/home/remastersys/customdist.iso is ready to be burned or tested in a virtual machine.
Check the size and if it is larger than 700MB you will need to burn it to a dvd
796M /home/remastersys/customdist.iso
Clean Up
After you’ve burnt the iso image onto a CD/DVD, you can run
sudo remastersys clean
to remove all temporary file created during the iso generation as well as the /home/remastersys directory.
然後在你儲存的目錄下找到ISO 檔案,驗證MD5後可以刻盤,以後就不用那麼辛苦升級,安裝軟體和設定系統了。