zstd_extra_opt 加上 long=31 的問題

47 views
Skip to first unread message

otto...@gmail.com

unread,
Sep 16, 2024, 3:24:55 AM9/16/24
to 再生龍clonezilla
這邊測試 zstd_extra_opt 加上 --long=31 參數,製作映像檔可以正常完成,但是還原的時候會出錯,看起來是硬碟分區表有錯誤,這邊附上紀錄檔參考

儲存的紀錄:

還原的紀錄:

Steven Shiau

unread,
Sep 17, 2024, 12:07:26 AM9/17/24
to ocs-clo...@googlegroups.com

謝謝回報,這部份應該跟zstd的參數無關。從錯誤訊息可以看出,問題在於sfdisk在目的碟產生分割區失敗了:

>>> Script header accepted.
>>> Script header accepted.
>>> line 4: unsupported command

你用哪個版本的Clonezilla live?
這個sfdisk不認得sda-pt.sf中的第4行。
若可以,請將產生的檔案"/tmp/new_sf.CuIyOc" (每次執行都會不同名字,但是類似名稱)分享一下。
Thanks.

Steven

--
這是 Google 網路論壇針對「再生龍clonezilla」群組發送的訂閱通知郵件。
如要取消訂閱這個群組並停止接收來自這個群組的郵件,請傳送電子郵件到 ocs-clonezill...@googlegroups.com
如要在網路上查看這項討論,請造訪 https://groups.google.com/d/msgid/ocs-clonezilla/e2bd4bde-72d7-401b-b352-43118174e973n%40googlegroups.com
-- 
Steven Shiau <steven _at_ stevenshiau org>
Public Key Server PGP Key ID: 4096R/163E3FB0
Fingerprint: EB1D D5BF 6F88 820B BCF5  356C 8E94 C9CD 163E 3FB0

otto...@gmail.com

unread,
Sep 18, 2024, 2:36:36 AM9/18/24
to 再生龍clonezilla
裡面只有 2 個 parttable-ocs. 的檔案,列出如下,我這邊測試電腦製作映像檔用原始 zstd 參數是可以正常儲存/還原的,有加上 long 才會出錯

PXL_20240918_132844731.jpg

Steven Shiau 在 2024年9月17日 星期二中午12:07:26 [UTC+8] 的信中寫道:

Steven Shiau

unread,
Sep 18, 2024, 5:48:00 AM9/18/24
to ocs-clo...@googlegroups.com

從你上次提供的output,找出問題在那了:
Running: EXTRA_SFDISK_OPT="--force --wipe always" ocs-expand-mbr-pt -icds --batch /home/partimag/zstd-long/sda-pt.sf /dev/sda 2>&1
No initial MBR table on disk /dev/sda. Create one now by:
LC_ALL=C parted -s /dev/sda mklabel msdos
*****************************************************.
The ratio for target disk size to original disk size is 1.0000000000.
/usr/sbin/ocs-expand-mbr-pt: line 332: [: -nan: integer expression expected
/usr/sbin/ocs-expand-mbr-pt: line 315: [: -nan: integer expression expected
/usr/sbin/ocs-expand-mbr-pt: line 332: [: -nan: integer expression expected
/usr/sbin/ocs-expand-mbr-pt: line 333: [: -nan: integer expression expected
The partition table to write in /dev/sda:
*****************************************
label: dos
unit: sectors

/dev/sda1 : start= -nan, size= 209716968, Id=7, bootable
/dev/sda2 : start= -nan, size= -nan, Id=7
*****************************************

是bash的printf的bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1081424
看來8/20之後更新的bash版本才會遇到的。
你只要在clonezilla live 3.1.3-24進入命令列,然後執行:
root@debian:~# printf "%.0f" "2048"
正常結果應該是出現2048,
不過,這個版本的printf卻會出現:
5098399650649138048616782150117308972795987005...

所以要等上游GNU或者Debian修改bash,或者Clonezilla改用別的方式。

Steven

Steven Shiau

unread,
Sep 18, 2024, 8:00:36 AM9/18/24
to 再生龍clonezilla

從你上次提供的output,找出問題在那了:
Running: EXTRA_SFDISK_OPT="--force --wipe always" ocs-expand-mbr-pt -icds --batch /home/partimag/zstd-long/sda-pt.sf /dev/sda 2>&1
No initial MBR table on disk /dev/sda. Create one now by:
LC_ALL=C parted -s /dev/sda mklabel msdos
*****************************************************.
The ratio for target disk size to original disk size is 1.0000000000.
/usr/sbin/ocs-expand-mbr-pt: line 332: [: -nan: integer expression expected
/usr/sbin/ocs-expand-mbr-pt: line 315: [: -nan: integer expression expected
/usr/sbin/ocs-expand-mbr-pt: line 332: [: -nan: integer expression expected
/usr/sbin/ocs-expand-mbr-pt: line 333: [: -nan: integer expression expected
The partition table to write in /dev/sda:
*****************************************
label: dos
unit: sectors

/dev/sda1 : start= -nan, size= 209716968, Id=7, bootable
/dev/sda2 : start= -nan, size= -nan, Id=7
*****************************************

是bash的printf的bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1081424
看來8/20之後更新的bash版本才會遇到的。
你只要在clonezilla live 3.1.3-24進入命令列,然後執行:
root@debian:~# printf "%.0f" "2048"

正常應該是出現2048,但是現在卻出現一堆亂碼,如
5098399650649138048616782150117308972795987005...

這個可能就要等上游修正,或者強迫用別的方式來處理。

Steven 

On 9/18/2024 2:33 PM, otto...@gmail.com wrote:
-- 
Steven Shiau <steven _at_ stevenshiau org>
Public Key Server PGP Key ID: 4096R/163E3FB0
Fingerprint: EB1D D5BF 6F88 820B BCF5  356C 8E94 C9CD 163E 3FB0

otto...@gmail.com

unread,
Sep 18, 2024, 8:33:32 PM9/18/24
to 再生龍clonezilla
剛剛測試了,的確是 Debian sid printf 的問題,目前連一般的還原都會失敗,應該可以等一下上游修正

Steven Shiau 在 2024年9月18日 星期三晚上8:00:36 [UTC+8] 的信中寫道:

Steven Shiau

unread,
Sep 28, 2024, 8:17:41 AM9/28/24
to ocs-clo...@googlegroups.com

請使用測試版本Clonezilla live >= 3.2.0-2 或20240928-*。這個問題暫時先用修改過的bash來避免。

Steven

otto...@gmail.com

unread,
Sep 29, 2024, 9:06:52 PM9/29/24
to 再生龍clonezilla
這邊測試正常了,已經可以正常還原,感謝~

測試使用 zstd --long=31 的參數,保存 Windows 11 + Office,映像檔有變小約 10%,要花 3 倍時間,不過透過網路還原速度沒有變快。

Steven Shiau 在 2024年9月28日 星期六晚上8:17:41 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages