CloneZilla 對硬碟 Resize 的功能討論

1,723 views
Skip to first unread message

Jacky, Jack

unread,
Apr 2, 2008, 4:17:58 AM4/2/08
to 再生龍clonezilla
各位...

我的工作環境中實際應用了 clonezilla 已超過大半年了~~~
而日常工作中, 以還原用戶的電腦都從ghost改用了clonezilla...
非常感謝開發隊的辛勞...
在大量的實作過程中...當遇到一僅還原 window c 盤...
而用戶的硬碟size又與種的size不同的時候...clonezilla就好像有點力不從心~~
這時不禁想起 ghost 可以自由配置還原磁碟的大小....

我增作過以下的測試

The image originally harddisk size is: 40GB (C - 20GB, D - 20GB)
And the testing T42 harddisk total size is: 60 GB (C - 40GB, D -
20GB)

Case I: Restore the whole disk without -k and -r
Result: C - 30GB and D - 30GB

Case II: Restore the whole disk with -k but without -r
Result: C - 30GB and D - "Un-Formatted" occurs
Remark: The partition table doesn't be modified, both Partition magic
and Window disk manager show that
C - 40GB and D - 20GB and it is obviously not the
case.

Case III: Restore the whole disk without -k but with -r
Result: C - 30GB and D - 30GB

Case IV: Restore the C partition with -k and -r
Result: C - 40GB and D - 20GB
Remark: Since only C parition is restored so it is true that all the
data in D remains.

Case V: Restore the C partition with -k but without -r
Result: C - 30GB and D unchanged
Remark: The partition table doesn't be modified, C has 40GB but
actually only 30GB. Same as Case II.

Case VI: Restore the C partition without -k but with -r
Result: C - 30GB and D - 30GB
Remark: Terrible that it is only restored C partition but D also be
restored ....

In conclusions, Case IV is the most suitable one for the situation. In
Case IV, it retains the parition table from the client.No matter how
large the C or D drive is, it keeps the same size as before and
actually applies the same size also.

如果將來 clonezilla 可以自由配置還原的partition大小...那就更完美了~~

Steven Shiau

unread,
Apr 2, 2008, 4:25:14 AM4/2/08
to ocs-clo...@googlegroups.com
自由配置的話,可能要很久以後吧。
倒是由小到大,或者照比例放大分割區的話,比較容易。也已經著手中。
如果寫好的話,就麻煩您好好用力測試。

Steven.

--
Steven Shiau <steven _at_ nchc org tw> <steven _at_ stevenshiau org>
National Center for High-performance Computing, Taiwan.
http://www.nchc.org.tw
Public Key Server PGP Key ID: 9762755A
Fingerprint -- A2A1 08B7 C22C 3D06 34DB F4BC 08B3 E3D7 9762 755A

tmk

unread,
Apr 2, 2008, 4:32:29 AM4/2/08
to 再生龍clonezilla

helo jacky

看來您用clonezilla live的程度應該是高手級的了
推薦您有空也試一下這個整合版,
http://clonezilla.sourceforge.net/gparted-clonezilla/download/
應該蠻合您用的
步驟雖多一點但對您來說應輕而易舉
ghost就...再見了...

Steven Shiau

unread,
Apr 2, 2008, 4:42:00 AM4/2/08
to ocs-clo...@googlegroups.com
剛好最近我們也開始加入GParted團隊,維護GParted Live,可以考慮用新版的
GParted live 0.3.6-5:
http://gparted.sourceforge.net/livecd.php
http://gparted.sourceforge.net/liveusb.php
這下正體中文支援真的有了,不像以前的是不能用的。

Steven.

Jacky, Jack

unread,
Apr 2, 2008, 4:49:55 AM4/2/08
to 再生龍clonezilla
Steven 兄...

非常高興和感謝你的前瞻行動...有新版本的話...一定會測試~~~
由小到大現在的版本是ok的...因為我都已經測試過
可否再討論下...按比例放大或縮小如何實現呢?
而自由配置的難點在哪裏呢?
因為小弟既然已用了這麼久...想深入些入解...希望嘗試可以加入開發...出少少微力~~
都不想被ghost在這個功能面上獨享其優勝之處~~~
> National Center for High-performance Computing, Taiwan.http://www.nchc.org.tw

Steven Shiau

unread,
Apr 2, 2008, 5:00:22 AM4/2/08
to ocs-clo...@googlegroups.com
其實不管由小到大,或者按照比例放大,最重要的是印象擋目錄中的分割表[hs]d
[a-z].sf那個檔案,只要你先準備好,然後還原的時候,選擇-r,原則上就可以了。
現在的話,其實你可以自己寫幾個分割表,然後要用的時候,放到印象檔目錄中,
蓋掉原來的*.sf那個檔案,然後就正常還原(當然要記得勾選-r),應該就可以了。
比較麻煩的是,要程式自動按照比例來算分割表,有點複雜,因為牽扯到extended
partition, LVM等等,這個就要一些時間來整理與測試。

Steven.

Jacky, Jack

unread,
Apr 2, 2008, 5:03:19 AM4/2/08
to 再生龍clonezilla
tmk 你好...

你過獎了...正在下載中...
有什麼好功能介紹呢?

Jacky, Jack

unread,
Apr 2, 2008, 5:09:30 AM4/2/08
to 再生龍clonezilla
如果不想去弄source code...
看來...可以結合 scripting...
讓opertor日常還原的時候輸入 c 或 d 的 size....
然後再生成 [hs]d[a-z].s 這個檔案...
成功生成後再就正常還原(勾選-r)
應該可以實現類似 簡單的 直接輸入大小的自由配置 的功能....

Steven Shiau

unread,
Apr 2, 2008, 5:24:36 AM4/2/08
to ocs-clo...@googlegroups.com
這是當然的,不過,不包括由大到小的還原就是了。

Steven.

tmk

unread,
Apr 2, 2008, 7:11:40 AM4/2/08
to 再生龍clonezilla
clonezilla 官網上有篇文章,請您參考一下
http://www.linux.com/feature/115208
應該可以解決您目前遇到的一些問題
簡單舉例來說
原來80g hd,40gb for c partition 40gb for d partition
假如clonezilla live to 250gb 可能會變成 40gb for c partition 40gb for d
partition + 170gb 未分割空間
用了gparted 之後,就可以調整partition 大小,例如 40gb for c partition 210gb for d
partition
讓您的d 槽 up up up ...

有空可以試一下,不過...您應該知道先備份一下重要資料吧...

gparted有正體中文了,還真是好消息。
> > > 如果將來 clonezilla 可以自由配置還原的partition大小...那就更完美了~~- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

Steven Shiau

unread,
Apr 25, 2008, 6:05:45 AM4/25/08
to ocs-clo...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jacky,
可否幫忙測試一下這個版本?
http://free.nchc.org.tw/clonezilla-live/testing/
1.0.11-8(含)之後的版本
or
http://free.nchc.org.tw/clonezilla-live/experimental/ubuntu-based/
20080425(含)之後的版本。

目前已經可以在還原過程中選用-k1,這樣會依照比例(目的碟/來源碟),在目的碟
依照比例放大。
有任何結果請告知。

Thanks.

Steven.


- --


Steven Shiau <steven _at_ nchc org tw> <steven _at_ stevenshiau org>
National Center for High-performance Computing, Taiwan.
http://www.nchc.org.tw

Public Key Server PGP Key ID: 1024D/9762755A
Fingerprint: A2A1 08B7 C22C 3D06 34DB F4BC 08B3 E3D7 9762 755A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIEaz5CLPj15didVoRAhc2AJ9rPtiTy2dhIsNZcX5yNLHYQypxqACfbJM0
WR4aBeL5W6UEAU4W5MVdO58=
=k/z9
-----END PGP SIGNATURE-----

tmk

unread,
Apr 28, 2008, 12:50:03 AM4/28/08
to 再生龍clonezilla
利用假日試了一下
clonezilla-live-20080426-hardy.iso
這個版本,和大家分享一下成果
硬體環境:
acer M6,amd athlon 64 3800+ with 512 mb ddr ram
作法:
將一顆 ide 20gb的硬碟裝上winxp sp2+office 2003
完成後,使用clonezilla-live-20080426-hardy.iso光碟開機
backup all hd to 外接式2.5吋硬碟

註:此版本會將ide 硬碟視為sdx,請各位網友要注意一下。

接下來移除 20gb硬碟 換上 250gb sata2 硬碟
再使用clonezilla-live-20080426-hardy.iso從外接式2.5吋硬碟中的備份檔案
restore回來
****當然有加上-k1參數***

結果:之前大家希望的功能出現了,經過一段快速的check過程
250GB硬碟的分割就依之前的比例放大呈現成功
相當好用,拍手拍手拍手...

接下來測試一下我的notebook
asus a8
之前舊版的clonezilla live用起來有時會卡卡的
用了clonezilla-live-20080426-hardy
現在就順多了...

ok,歡迎各位一同分享使用心得




On 4月25日, 下午6時05分, Steven Shiau <ste...@nchc.org.tw> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jacky,
> 可否幫忙測試一下這個版本?http://free.nchc.org.tw/clonezilla-live/testing/
> 1.0.11-8(含)之後的版本
> orhttp://free.nchc.org.tw/clonezilla-live/experimental/ubuntu-based/
> Public Key Server PGP Key ID: 1024D/9762755A
> Fingerprint: A2A1 08B7 C22C 3D06 34DB F4BC 08B3 E3D7 9762 755A
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFIEaz5CLPj15didVoRAhc2AJ9rPtiTy2dhIsNZcX5yNLHYQypxqACfbJM0
> WR4aBeL5W6UEAU4W5MVdO58=
> =k/z9
> -----END PGP SIGNATURE------ 隱藏被引用文字 -
>
> - 顯示被引用文字 -

Steven Shiau

unread,
Apr 28, 2008, 1:09:41 AM4/28/08
to ocs-clo...@googlegroups.com
蔡老師,
謝謝您的分享,很高興知道在你那邊-k1這個功能可以正確的使用。:D

另外,也請對這個功能有需求的朋友,多多測試,以便這個版本早日進入穩定版。

Steven.

tmk

unread,
Apr 28, 2008, 1:31:48 AM4/28/08
to 再生龍clonezilla
對了,今天早上試了硬碟對拷
disk_to_local_disk
目前硬碟對拷依比例放大的功能還是無法完成
無論是使用 -e or -e+-g皆不行
要使用硬碟對拷的網友們建議還是用我剛才post的方法為佳
找一個外接硬碟 or store media來當中介媒介
才能有「依比例放大」的效果

謝謝國網中心團隊對clonezilla live功能不斷地提昇改進
期待新功能發展中...
> Fingerprint -- A2A1 08B7 C22C 3D06 34DB F4BC 08B3 E3D7 9762 755A- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

Steven Shiau

unread,
Apr 28, 2008, 1:42:10 AM4/28/08
to ocs-clo...@googlegroups.com
是的,這個功能是下一步囉.
寫好之後會請大家幫忙測試。

Steven.

阿剛

unread,
Apr 30, 2008, 4:55:57 AM4/30/08
to 再生龍clonezilla
當我要備份時
設定完資料夾名稱後
出現以下的錯誤訊息
"Box" is unknown HD device! Know and supported HD device is like hda,
hdb, hdc, hdd... Program terminated!
我是用eeepc的
我是8G版準備要做備份來幫我朋友處理他的4G版eeepc
所以需要變小
我用兩個版本都一樣
clonezilla-live-1.0.11-15.iso

clonezilla-live-20080429-hardy.iso
我的設定是當問我要把/home/partimage存哪時我是存在USB硬碟
這個時候都可以看得到
也確定來源跟目的硬碟是sda及sdb
所以硬碟有抓到,只是為何到最後只能用hdx呢
謝謝
> >>>>> 而自由配置的難點在哪裡呢?

Steven Shiau

unread,
Apr 30, 2008, 9:51:06 AM4/30/08
to ocs-clo...@googlegroups.com
你的意思是要把大硬碟中的資料,還原到小硬碟上?
正確的問法應該是你要把大分割區中的資料,還原到小分割區上?
如果是這樣的話,目前clonezilla是無法的,因為這個是image的做法,只認有用
到的block,而不是認file.

Steven.

阿剛

unread,
May 1, 2008, 12:42:10 AM5/1/08
to 再生龍clonezilla
剛才我有回覆了
主要我是希望把8G的eeepc資料用clonezilla做成image資料夾
再把image資料夾copy給我朋友
只不過他是4G版,如果直接用clonezilla會還原不回去,太大了
所以才希望用新版的resize功能把大的image資料夾還原到小的硬碟
不是硬碟到硬碟
我知道這個不行的
最後出現以下的錯誤
"Box" is unknown HD device! Know and supported HD device is like hda,
hdb, hdc, hdd... Program terminated!
謝謝
我目前要做的是
8GB eeepc 用clonezilla 把系統 image 做到外接式硬碟
clonezilla在設定要存放位置時有抓到兩個硬碟
我就選擇外接式硬碟
但是他所抓到的都是sdx的
我才想會不會是這個問題

Steven Shiau

unread,
May 1, 2008, 2:43:05 AM5/1/08
to ocs-clo...@googlegroups.com

阿剛 wrote:
> 剛才我有回覆了
> 主要我是希望把8G的eeepc資料用clonezilla做成image資料夾
> 再把image資料夾copy給我朋友
> 只不過他是4G版,如果直接用clonezilla會還原不回去,太大了
> 所以才希望用新版的resize功能把大的image資料夾還原到小的硬碟

"用新版的resize功能把大的image資料夾還原到小的硬碟"還是不行。理由如前述
所說的,這個不管是disk -> image或者disk -> disk 再生龍目前都無法處理。


> 不是硬碟到硬碟
> 我知道這個不行的
> 最後出現以下的錯誤
> "Box" is unknown HD device! Know and supported HD device is like hda,
> hdb, hdc, hdd... Program terminated!

這個有可能是程式判斷錯誤? 還是其他原因,不太能確認。


> 謝謝
> 我目前要做的是
> 8GB eeepc 用clonezilla 把系統 image 做到外接式硬碟
> clonezilla在設定要存放位置時有抓到兩個硬碟
> 我就選擇外接式硬碟
> 但是他所抓到的都是sdx的

抓到都是sdx ? 你的是外接硬碟不應該是sdx ? 還是?

阿剛

unread,
May 1, 2008, 3:29:52 AM5/1/08
to 再生龍clonezilla
所以說
如果我想把我的ubuntu完完整整的copy給我的朋友
是不行的哦
才在想說可以的話就可以一次搞定他所有的問題了

在clonezilla測試版中,它的確把我的外按硬碟當成sdb了
我的eeeoc原來硬碟是sda
真怪,我的硬碟明明是20GB的IDE
> ...
>
> 閱讀更多 >>

Steven Shiau

unread,
May 1, 2008, 4:18:57 AM5/1/08
to ocs-clo...@googlegroups.com
阿剛 wrote:
> 所以說
> 如果我想把我的ubuntu完完整整的copy給我的朋友
> 是不行的哦
> 才在想說可以的話就可以一次搞定他所有的問題了
原則上是,當然,還是有機會做的,只不過非常手動...而且會影響到你原來的系
統。目前clonezilla的確沒有一個很完整的機制來把大的image還到小的硬碟。
>
> 在clonezilla測試版中,它的確把我的外按硬碟當成sdb了
> 我的eeeoc原來硬碟是sda
> 真怪,我的硬碟明明是20GB的IDE
IDE也可以是sdx的,要看你用的是哪個kernel...

Steven.

Steven Shiau

unread,
May 7, 2008, 6:03:24 AM5/7/08
to ocs-clo...@googlegroups.com
蔡老師,
這個由小硬碟到大硬碟對拷,可以依照比例放大的功能已經加在Clonezilla live
1.0.11-17 (測試版中)
http://free.nchc.org.tw/clonezilla-live/testing/
參數有點不太一樣,是使用-n1。
請老師有空的時候,幫忙測試,然後回報一下。
謝謝。

Steven.

tmk

unread,
May 7, 2008, 7:00:21 AM5/7/08
to 再生龍clonezilla
好的,這個功能真是令人期待。
我也計畫和同事借一顆250gb的硬碟來試一下
之前我寫書時用的就是250gb sata2 hd
為什麼200gb以上的hd會出現狀況?
心中也一直有點小小疑問

還有和上面的使用者分享一下
hd 成為 hda sda確定和clonezilla live使用的linux kernel版本有關
而且同樣的kernel有時也會依據晶片組有些差異
我的實際經驗為例
同樣的一片clonezilla live
在via and intel 的機器ide hd變成 hdx
但是sis 的機器就變成sdx
這無損clonezilla live的功能
實際去操作一次就明瞭了





On 5月7日, 下午6時03分, Steven Shiau <ste...@nchc.org.tw> wrote:
> 蔡老師,
> 這個由小硬碟到大硬碟對拷,可以依照比例放大的功能已經加在Clonezilla live
> 1.0.11-17 (測試版中)http://free.nchc.org.tw/clonezilla-live/testing/

tmk

unread,
May 8, 2008, 6:53:34 AM5/8/08
to 再生龍clonezilla
和蕭先生及各位網友回報測試結果
小硬碟到大硬碟對拷,可以依照比例放大的功能是可以的
版本是clonezilla-live-1.0.11-17版本
硬體環境:acer m6
小硬碟 seagate 20gb ide
大硬碟 seagate 250gb sata2
原來20gb 分割為 cpar 12.66gb dpar 5.98gb
使用 -n1 按比例放大對拷後
成為
cpar 158.06gb dpar 74.73gb 還有 一個97mb的未使用空間
真是太棒了

接下來我把這個sata2 hd 250gb 分割區全部刪除
新增一個250gb 的 ntfs partition
再使用clonezilla-live-1.0.11-17版本來開機
將這個20gb 硬碟備份到這個ntfs partition
,可以mount也可以備份成功



On 5月7日, 下午6時03分, Steven Shiau <ste...@nchc.org.tw> wrote:
> 蔡老師,
> 這個由小硬碟到大硬碟對拷,可以依照比例放大的功能已經加在Clonezilla live
> 1.0.11-17 (測試版中)http://free.nchc.org.tw/clonezilla-live/testing/

Steven Shiau

unread,
May 8, 2008, 7:23:34 AM5/8/08
to ocs-clo...@googlegroups.com
蔡老師,
謝謝您的測試與回報。看來這個功能初步可以了,不過,最近我會再修改一下,讓
它用的參數和dev <-> image的參數比較一致。另外最近也發現一些clone linux
(dev <-> dev)下的一些問題,會一併修正。
Thanks again.

Steven.

Reply all
Reply to author
Forward
0 new messages