最近試著要將一台 Toshiba 手提電腦的硬碟複製到另一顆硬碟中。這台手提電腦只有 USB 連線,且只有 CD,而 Norton Ghost Boot CD 在開機後找不到外接的 USB 硬碟,且 Norton Ghost Enterprise 的網路無法處理 Toshiba 的網路功能。頭痛!
突然腦中閃過 Linux 使用者也應該要用 Ghost 吧!於是上 Google 查一下。果然有好東西‧‧‧ g4u ("ghost for unix") 是也。
g4u ("ghost for unix") is a NetBSD-based bootfloppy/CD-ROM that allows easy cloning of PC harddisks to deploy a common setup on a number of PCs using FTP. The floppy/CD offers two functions:
- To upload the compressed image of a local harddisk to a FTP server.
- To restore that image via FTP, uncompress it and write it back to disk.
Network configuration can be fetched via DHCP or be set up manually.
Any filesystem and operating system can be deployed using g4u. Supported are cloning of local disks as well as partitions.
- Where to get it: http://www.feyrer.de/g4u/#reqs
- How to use it: (g4u website in a new window)
- Download either the floppy images or a CD iso image. Make bootable floppies or CD.
- Boot the CD or floppy on the machine you want to clone.
- If need to set up the network manually, type "ifconfig -a" to find out the network device ("ex0", "tlp0", "fxp0", etc), then issue
ifconfig xx0 1.2.3.4 netmask 255.255.255.0 - The command "disks" let you get a list of recognized disks, and the command "parts" the available partitions on each disk.
- To read out an entire harddisk, wd0 say, and put it into the "username" account of your FTP server as the file named "filename.gz", issue
uploaddiskThis email address is being protected from spambots. You need JavaScript enabled to view it. filename.gz wd0
(Note. One can omit "username@" if the username is "install".) - To read out a partition of a harddisk, wd0e say, and put it into the "username" account of your FTP server as the file named "filename.gz", issue
uploadpartThis email address is being protected from spambots. You need JavaScript enabled to view it. filename.gz wd0e - To restore an entire harddisk, wd0 say, from the file named "filename.gz" on your FTP server with the "username" account, issue
slurpdiskThis email address is being protected from spambots. You need JavaScript enabled to view it. filename.gz wd0 - To restore a partition of a harddisk, wd0e say, from the file named "filename.gz" on your FTP server with the "username" account, issue
slurppartThis email address is being protected from spambots. You need JavaScript enabled to view it. filename.gz wd0e - Replace "wd0", "wd0e", etc above to appropriate device like "sd0", "sd0e" to read out or restore the images.
- To copy a disk locally, issue (for example)
copypart wd0e sd0f - To copy a partition locally, issue (for example)
copypart wd0e sd0f
Note: Copy to a USB harddisk can be very slow. Use ftp server is much better in this case.