最近想做類似ghost選單式還原,利用syslinux.cfg改裡面的內容一鍵還原

125 views
Skip to first unread message

黑白共母湯

unread,
Apr 24, 2021, 10:01:04 AM4/24/21
to 再生龍clonezilla
我利用syslinux.cfg裡面的內容加指令來還原,跑出來的畫面都是失敗

參考這篇

將選單改了一下

我的版本
label test bbb
MENU DEFAULT
# MENU HIDE
MENU LABEL 002
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live union=overlay username=user config noswap nolocales edd=on nomodeset noprompt ocs_prerun="mount /dev/sdb2 /mnt/backup" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -k -p true restoreparts test-img sda" ocs_live_extra_param="" keyboard-layouts=NONE ocs_live_batch="no" locales=zh_TW.UTF-8 ip=frommedia nosplash
ENDTEXT

因為我用隨身硬碟,切了1GB來放Clonezilla
剩下空間切出來放img
利用指令lsblk
sdb1←放Clonezilla
sdb2←放img
sdb2裡的backup資料夾放test-img
欲還原sda硬碟
Clonezilla的版本為2.7.1-22
不知道版本是否會有差異
還是我上述的指令有誤

Ceasar Sun

unread,
Apr 24, 2021, 10:43:06 PM4/24/21
to ocs-clo...@googlegroups.com



-------- 轉寄郵件 --------
主旨: Re: 最近想做類似ghost選單式還原,利用syslinux.cfg改裡面的內容一鍵還原
日期: Sun, 25 Apr 2021 10:39:36 +0800
從: Ceasar Sun <cea...@narlabs.org.tw>
到: ocs-clo...@googlegroups.com



這部份有些區段要改:

append initrd=/live/initrd.img boot=live union=overlay username=user config noswap nolocales edd=on nomodeset noprompt ocs_prerun="mount /dev/sdb2 /mnt/backup" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -k -p true restoreparts test-img sda" ocs_live_extra_param="" keyboard-layouts=NONE ocs_live_batch="no"
有些區段要改:
cs_prerun="mount /dev/sdb2 /mnt/backup"  => 
ocs_prerun1="mount /dev/sdb2 /mnt/backup" ocs_prerun2="mount --bind /mnt/Backup /home/partimag/"

ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -k -p true restoreparts test-img sda" =>
ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -k -p true restoredisk test-img sda"

若還出現錯誤的話, 建議可以附上錯誤訊息,方便除錯。

BRs,

    Ceasar
--
這是 Google 網路論壇針對「再生龍clonezilla」群組發送的訂閱通知郵件。
如要取消訂閱這個群組並停止接收來自這個群組的郵件,請傳送電子郵件到 ocs-clonezill...@googlegroups.com
如要在網路上查看這項討論,請造訪 https://groups.google.com/d/msgid/ocs-clonezilla/83c5ce7b-a98c-46c2-8dad-3c7d0cb12360n%40googlegroups.com


-- 

===================================================================
Chen-Kai Sun (Ceasar)
National Center for High-Performance Computing, Taiwan
http://www.nchc.org.tw
PGP Key: 4096R/6768B31F (ceasa...@gmail.com;cea...@narlabs.org.tw )
Fingerprint: D20D 8A19 58BE 95B2 20DF  60F2 A658 0CE9 6768 B31F
===================================================================

黑白共母湯

unread,
Apr 27, 2021, 11:54:01 PM4/27/21
to 再生龍clonezilla

感謝修改,試了一下也是掛載失敗
我撈log出來了
不知道是不是我放Clonezilla的HDD size給太小,導致掛載失敗

Ceasar Sun 在 2021年4月25日 星期日上午10:43:06 [UTC+8] 的信中寫道:

黑白共母湯

unread,
May 4, 2021, 12:19:41 AM5/4/21
to 再生龍clonezilla

問題已經解決了,多做一個步驟
指令為
ocs_prerun1="mount /dev/sdb2 /mnt/backup" ocs_prerun2="mount --bind /mnt/Backup /home/partimag/"
應更改為
ocs_prerun1="mount /dev/sdb2 /mnt/" ocs_prerun2="mount --bind /mnt/Backup /home/partimag/"
這樣才掛載成功
黑白共母湯 在 2021年4月28日 星期三上午11:54:01 [UTC+8] 的信中寫道:

Steven Shiau

unread,
May 4, 2021, 12:22:00 AM5/4/21
to ocs-clo...@googlegroups.com
OK, sure. 謝謝分享.

Steven
>> <https://groups.google.com/d/msgid/ocs-clonezilla/83c5ce7b-a98c-46c2-8dad-3c7d0cb12360n%40googlegroups.com?utm_medium=email&utm_source=footer>。
>
>
> --
>
> ===================================================================
> Chen-Kai Sun (Ceasar)
> National Center for High-Performance Computing, Taiwan
> http://www.nchc.org.tw <http://www.nchc.org.tw>
> PGP Key: 4096R/6768B31F (ceasa...@gmail.com;cea...@narlabs.org.tw )
> Fingerprint: D20D 8A19 58BE 95B2 20DF 60F2 A658 0CE9 6768 B31F
> ===================================================================
>
> --
> 這是 Google 網路論壇針對「再生龍clonezilla」群組發送的訂閱通知郵件。
> 如要取消訂閱這個群組並停止接收來自這個群組的郵件,請傳送電子郵件到
> ocs-clonezill...@googlegroups.com
> <mailto:ocs-clonezill...@googlegroups.com>。
> 如要在網路上查看這項討論,請造訪
> https://groups.google.com/d/msgid/ocs-clonezilla/60db11e8-c6a0-4c1e-907a-13c7c08a2a81n%40googlegroups.com
> <https://groups.google.com/d/msgid/ocs-clonezilla/60db11e8-c6a0-4c1e-907a-13c7c08a2a81n%40googlegroups.com?utm_medium=email&utm_source=footer>。

--
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

Reply all
Reply to author
Forward
0 new messages