NoName Team 電腦資訊討論區

 找回密碼
 我要註冊
搜索
樓主: 阿達金田一

[分享] 整合 卡巴 和 ESET 救援ISO 到 HDD

[複製鏈接]
發表於 2019-8-22 19:24:54 | 顯示全部樓層
也有人改成這樣,反正跑太快,看不到什麼ls ,echo的 ,也不預刪 (hd0,3)了 ,測試過很OK

title ESET救援光碟
set ISO=/eset.iso
find --set-root %ISO%
parttype (hd0,3) | set check=
set check=%check:~-5,4%
if %check%==0x00 partnew (hd0,3) 0x00 %ISO%
if NOT %check%==0x00 echo 錯誤: 第4分割表已存在!! && pause --wait=3 && configfile /menu.lst
map %ISO% (0xff)
map --hook
root (0xff)
chainloader (0xff)   
發表於 2019-8-22 20:18:48 | 顯示全部樓層
阿達金田一 發表於 2019-8-22 09:33
我前面貼的參考文章連結中不就有了

kernel (0xff)/casper/vmlinuz boot=casper live-media=/dev/disk/by- ...

試過  XD  =  無效

title ESET SysRescue 1.0.16 (20180521)
find --set-root /ESET-SysRescue-1.0.16.iso
map --heads=0 --sectors-per-track=0 /ESET-SysRescue-1.0.16.iso (0xff) || map --heads=0 --sectors-per-track=0 --mem /ESET-SysRescue-1.0.16.iso (0xff)
map --hook
kernel (0xff)/casper/vmlinuz boot=casper live-media=/dev/disk/by-label/32GB locale=de_DE.UTF-8
initrd=(0xff)/casper/initrd.lz

試過  XD  =  無效

title ESET SysRescue 1.0.16 (20180521)
find --set-root /ESET-SysRescue-1.0.16.iso
map --heads=0 --sectors-per-track=0 /ESET-SysRescue-1.0.16.iso (0xff)
map --hook
kernel (0xff)/casper/vmlinuz boot=casper live-media=/dev/disk/by-label/32GB locale=de_DE.UTF-8
initrd=(0xff)/casper/initrd.lz

試過  XD  =  無效

title ESET SysRescue 1.0.16 (20180521)
find --set-root /ESET-SysRescue-1.0.16.iso
map --heads=0 --sectors-per-track=0 /ESET-SysRescue-1.0.16.iso (0xff)
map --hook
kernel (0xff)/casper/vmlinuz boot=casper
initrd=(0xff)/casper/initrd.lz

以上~  執行後   最後 都是 停留在 <xxxxx> 指令輸入  的 黑底白字畫面~
xd  暈@@

但很謝謝你 金田一   大家 集思廣益~~    我也在思考
發表於 2019-8-22 20:49:41 | 顯示全部樓層
pinko 發表於 2019-8-22 19:24
也有人改成這樣,反正跑太快,看不到什麼ls ,echo的 ,也不預刪 (hd0,3)了 ,測試過很OK

title ESET救援光碟

您好 pinko

測試您的menu語法

在我的g4d也無法run~~~~~~~ 也試著修改一些語法  也無效~

以下我的
title ESET救援光碟
set ISO=/ISO/eset.iso
find --set-root %ISO%
parttype (hd0,3) | set check=
set check=%check:~-5,4%
if %check%==0x00 partnew (hd0,3) 0x00 %ISO%
if NOT %check%==0x00 echo 錯誤: 第4分割表已存在!! && pause --wait=3 && configfile /menu.lst
map %ISO% (0xff)
map --hook
root (0xff)
chainloader (0xff)   

都會跑出


搞不懂為何

我的g4d 還是 用 底層casper資料夾 直接run      xd 暈阿

title --1--ESET掃毒 V5.0.16.0(英文版)
kernel /casper/vmlinuz boot=casper quiet splash --
initrd /casper/initrd.lz

發表於 2019-8-22 21:05:46 | 顯示全部樓層
本帖最後由 pinko 於 2019-8-22 21:10 編輯
keney 發表於 2019-8-22 20:49
您好 pinko

測試您的menu語法

32GB 應該不會用到4個分割區吧
那為什麼會跳 check 值非0x00 ? 很奇怪
再查看看你的分割區 ,如果第4分割沒重要資料的話 就刪掉 if %check%==0x00 直接映射過去
下一行 if...  全行也就刪了吧!!!!!!
注意備份.....有備無患喔

 樓主| 發表於 2019-8-23 04:12:32 | 顯示全部樓層
本帖最後由 阿達金田一 於 2019-8-23 04:19 編輯
keney 發表於 2019-8-22 20:18
試過  XD  =  無效

title ESET SysRescue 1.0.16 (20180521)

雖然我一開始沒實測...所以忽略了
不過你們只是少了個 root (0xff)

我前面在說明原理時...說了...
g4d map iso 對 eset 來說是 cd 啟動

拿一個標準的 g4d 模擬CD 啟動來說

map /xxx.iso (0xff) || map --mem /xxx.iso (0xff)
map --hook
root (0xff)
chainloader
boot

map 這個就不說了
root (0xff) 指定 CD (0xff) 為啟動裝置
chainloader 載入 CD 本身的 開機引導

但是這種標準方式...只是 模擬CD 啟動
不一能正常啟動...原因我前面也有說一些了
簡單說就是 OS 不支援 g4d 的 虛擬CD
對一些... DOS 或 非OS 的 iso ... 通常是沒問題通

G4D 標準模擬CD 的方式...對 eset iso 來說
其實就是用 eset 本身的引導來開機...( g4d 只做 載入原本引導 的動作)
而 ESET Linux 本身的開機引導程式...換成 G4D 的 Linux 啟動指令來表示的話...也就是
kernel /casper/vmlinuz boot=casper live-media=/dev/disk/by-label/eSysRescueLiveCD quiet splash --
initrd /casper/initrd.lz

也就是如果我們不用 eset 本身的 開機引導程式...用 g4d 來開機...那同等於

原本標準 模擬CD啟動 ...用 ESET 本身的 開機引導程式
map /xxx.iso (0xff) || map --mem /xxx.iso (0xff)
map --hook
root (0xff)
chainloader
boot

用 G4D 來做 ESET Linux OS 開機 ... (就是把 chainloader 改成用 g4d 來下 ESET Linux OS 開機指令)
map /xxx.iso (0xff) || map --mem /xxx.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz boot=casper live-media=/dev/disk/by-label/eSysRescueLiveCD quiet splash --
initrd /casper/initrd.lz
boot

然後...由於 ESET Linux 不支援 G4D CD ... 所以找不到 live-media
所以這裡...要指定 USB 的 Label
(當然如果你把 USB Label 取名叫 eSysRescueLiveCD... 也是可以)
map /xxx.iso (0xff) || map --mem /xxx.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz boot=casper live-media=/dev/disk/by-label/<USB-Label> quiet splash --
initrd /casper/initrd.lz
boot

注意...
有沒有 root (0xff) 的差別在

沒 root (0xff)
G4D 一開始是用 usb 開機...所以 root 應該是 (hd0,0) 之類的
沒 root (0xff)...所以 root 就一直都是 (hd0,0)
然後 kernel /casper/vmlinuz 基本上就是失敗...
當然...是可以用 kernel (0xff)/casper/vmlinuz
但這只是加載 Linux 核心... root 並沒有變...
因為對於 啟動指令 的 參數 來說 boot=casper ...指定了 啟動 時要用的 路徑
然後 root 是 (hd0,0)...
所以核心去是讀 (hd0,0)/capser 而不是 (0xff)/capser
所以啟動失敗...因為 capser 是在 (0xff)

下面是我用 vbox 測試功成的 g4d menu.lst 和 圖
(2 個啟動都可以...只是差在 map 的參數不同而以...喜歡哪個就用哪個)
set iso=/eset.iso
set USBLabel=32GB

title eset 1
map %iso% (0xff) || map --mem %iso% (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz boot=casper live-media=/dev/disk/by-label/%USBLabel% quiet splash ---
initrd /casper/initrd.lz

title eset 2
map --heads=0 --sectors-per-track=0 %iso% (0xff)|| map --heads=0 --sectors-per-track=0 --mem %iso% (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz boot=casper live-media=/dev/disk/by-label/%USBLabel% quiet splash ---
initrd /casper/initrd.lz



本帖子中包含更多資源

您需要 登錄 才可以下載或查看,沒有帳號?我要註冊

x
發表於 2019-8-23 11:58:09 | 顯示全部樓層
阿達金田一 發表於 2019-8-23 04:12
雖然我一開始沒實測...所以忽略了
不過你們只是少了個 root (0xff)

這不合理啊看我的usb 實開,先刪(hd0,3)

報錯

ls by-label


ubuntu manuals :
  {live-media|bootfrom}=DEVICE           
If you specify one of this two equivalent forms, live-boot will first try to find this           
device for the "/live" directory where the read-only root filesystem should reside. If           
it did not find something usable, the normal scan for block devices is performed.           
Instead of specifying an actual device name, the keyword 'removable' can  be  used  to           
limit  the  search  of  acceptable live media to removable type only. Note that if you           
want to further restrict the  media  to  usb  mass  storage  only,  you  can  use  the           
'removable-usb' keyword.


我的理解是live-media 是指向一個碟設備(有/casper目錄的) , 找不到的話就找其它碟/casper
可是pny128並沒有/casper ,其它也沒有,就報找不到medium了

但你的vbox開的起來 ? 可是你的32GB碟並沒有指向iso的設置啊 , 真的不理解 ...

 樓主| 發表於 2019-8-23 14:50:40 | 顯示全部樓層
本帖最後由 阿達金田一 於 2019-8-23 16:21 編輯
pinko 發表於 2019-8-23 11:58
這不合理啊看我的usb 實開,先刪(hd0,3)

報錯

我又重測一邊
問題大概知道了...
我之前測一下你用 partnew ...
大概是 partnew 的 MBR 殘留 資料有影響

簡單說...
partnew 在加上...我那個就可以啟動
partnew 只要做一次就可以

其實我前面貼的參考文中...有答案...只是我沒注意到
https://forum.eset.com/topic/199 ... -directly-from-iso/
最後一個回文
title ESET SysRescue 1.0.16 (20180521)
# https://www.eset.com/de/support/sysrescue/
find --set-root /ESET-SysRescue-1.0.16.iso
map --heads=0 --sectors-per-track=0 /ESET-SysRescue-1.0.16.iso (0xff) || map --heads=0 --sectors-per-track=0 --mem /ESET-SysRescue-1.0.16.iso (0xff)
map --hook
partnew (hd0,1) 0x0 /ESET-SysRescue-1.0.16.iso
root (0xff)
kernel /casper/vmlinuz boot=casper locale=de_DE.UTF-8 keyboard-configuration/layoutcode=de
initrd /casper/initrd.lz

也就是我的改成
set iso=/eset.iso
set USBLabel=32GB

title ESET
map --heads=0 --sectors-per-track=0 %iso% (0xff)|| map --heads=0 --sectors-per-track=0 --mem %iso% (0xff)
map --hook
partnew (hd0,3) 0x0 %iso%
root (0xff)
kernel /casper/vmlinuz boot=casper live-media=/dev/disk/by-label/%USBLabel% quiet splash ---
initrd /casper/initrd.lz

不過其實 partnew 只要下一次指令就夠了...(除非 iso 有變動)
不然每次 partnew 都會寫入一次 MBR

也是之前我手動測試時...有下過 partnew 所以我測試時才都 ok
發表於 2019-8-23 16:18:15 | 顯示全部樓層
阿達金田一 發表於 2019-8-23 14:50
我又重測一邊
問題大概知道了...
我之前測一下你用 partnew ...

我猜也是因為我記得 disk block 好像沒登記虛擬碟
所以disk by-anything 都看不到掛上的iso

我之前也都是把image 及 tools 解到usb上執行
但...knoppix , Ubuntu  , deepin , Phoenix ..., win8pe , win10pe , nonamexpe 還不算上各個版本
全都放在usb主目錄上,每次看到就煩
用partnew 映射的方式是我覺得最簡約的辦法
只是連續檔的要求很高,空間不足時不好處理
然後我也試過pe iso partnew 0x07 但可惜識別不能
發表於 2019-8-23 22:45:23 | 顯示全部樓層
阿達金田一 發表於 2019-8-23 04:12
雖然我一開始沒實測...所以忽略了
不過你們只是少了個 root (0xff)

真奇怪,都用了這麼多語法 與 自行加減修改  也是無法進入圖形介面XD
都是卡在


真是搞不懂為什麼!~XD

目前運用的語法是

title --1--ESET掃毒 V1.0.18.0(英文版)
set iso=/iso/eset.iso
set USB=32GB
map %iso% (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz boot=casper live-media=/dev/disk/by-label/%USB% quiet splash ---
initrd /casper/initrd.lz

求解阿~~XD
 樓主| 發表於 2019-8-23 23:46:20 | 顯示全部樓層
本帖最後由 阿達金田一 於 2019-8-23 23:47 編輯
keney 發表於 2019-8-23 22:45
真奇怪,都用了這麼多語法 與 自行加減修改  也是無法進入圖形介面XD
都是卡在
title --1--ESET掃毒 V1.0.18.0(英文版)
set iso=/iso/eset.iso
set USB=32GB
map %iso% (0xff)
map --hook
partnew (hd0,3) 0x0 %iso%
root (0xff)
kernel /casper/vmlinuz boot=casper live-media=/dev/disk/by-label/%USB% quiet splash ---
initrd /casper/initrd.lz

or
title --1--ESET掃毒 V1.0.18.0(英文版)
set iso=/iso/eset.iso
set USB=32GB
map %iso% (0xff)
map --hook
partnew (hd0,3) 0x0 %iso%
root (0xff)
chainloader

前面說過了
第1個是自己用G4D下 Linux 開機指令
第2個 用 chainloader 是用 eset iso 本身的 開機引導來 做 ESET Linux 開機

另外 用 partnew (hd0,3) 0x0 %iso%
iso 要為連續磁區儲存比較好
partnew 其實是寫入 MBR 分割表 的一個動作
這個其實就是 建立 MBR分割表 的 分區
一個 MBR 最多主能建4個主分區
通常 USB 是只有一個分區...所以 (hd0,1) - (hd0,3) 是都沒在用
簡單的說 分割表 就是記錄 分區 的 類型(type) 起始LBA(start) 多大(Len)
partnew (hd0,3) 0 0 0
就是 type 0 起始LBA 0 大小 0 ...等於是把 分割表 的 分區4資料 填0 相當於移除資料
而  partnew (hd0,3) 0x0 %iso% 是一種映射用法
以 raw 的角度來看 例如
(hd0,0) 是 LBA1024 - LBA 1023999
(hd0,1) 是 LBA1024000 - LBA 20473999
假設有一個 iso 或 img 檔是儲存在 (hd0,0) ... 例如 /eset.iso
該檔 /eset.iso 為連續磁區儲存在 LBA 256000 - 512000
那 partnew (hd0,3) 0x0 /eset.iso
就等同在 MBR 加上
(hd0,3) LBA 256000 - 512000

簡單說你用過 partnew (hd0,3) 0x0 %iso% 後
用 bootice 去查看分區....你會發現多一個 id 0 的 分區...

您需要登錄後才可以回帖 登錄 | 我要註冊

本版積分規則

小黑屋|手機版|NoName Team 電腦資訊討論區 |網站地圖

GMT+8, 2025-9-18 16:27 , Processed in 0.315718 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回復 返回頂部 返回列表