Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
f7c78879
Commit
f7c78879
authored
Oct 20, 2021
by
longpanda
Browse files
Support Eset SysRescue image file. (#1162)
parent
f3e267a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
0 deletions
+92
-0
IMG/cpio/ventoy/loop/esysrescue/ventoy-disk.sh
IMG/cpio/ventoy/loop/esysrescue/ventoy-disk.sh
+47
-0
IMG/cpio/ventoy/loop/esysrescue/ventoy-hook.sh
IMG/cpio/ventoy/loop/esysrescue/ventoy-hook.sh
+26
-0
INSTALL/grub/grub.cfg
INSTALL/grub/grub.cfg
+19
-0
No files found.
IMG/cpio/ventoy/loop/esysrescue/ventoy-disk.sh
0 → 100644
View file @
f7c78879
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
.
/ventoy/hook/ventoy-hook-lib.sh
if
is_ventoy_hook_finished
;
then
exit
0
fi
vtlog
"#######
$0
$*
########"
VTPATH_OLD
=
$PATH
;
PATH
=
$BUSYBOX_PATH
:
$VTOY_PATH
/tool:
$PATH
wait_for_usb_disk_ready
vtdiskname
=
$(
get_ventoy_disk_name
)
if
[
"
$vtdiskname
"
=
"unknown"
]
;
then
vtlog
"ventoy disk not found"
PATH
=
$VTPATH_OLD
exit
0
fi
ventoy_udev_disk_common_hook
"
${
vtdiskname
#/dev/
}
2"
"noreplace"
ventoy_create_dev_ventoy_part
ln
-s
"../../ventoy1"
/dev/disk/by-label/ESYSRESCUE
PATH
=
$VTPATH_OLD
set_ventoy_hook_finish
IMG/cpio/ventoy/loop/esysrescue/ventoy-hook.sh
0 → 100644
View file @
f7c78879
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
.
$VTOY_PATH
/hook/ventoy-os-lib.sh
$SED
"/maybe_break premount/i
\
$BUSYBOX_PATH
/sh
$VTOY_PATH
/loop/esysrescue/ventoy-disk.sh"
-i
/init
if
[
-f
/scripts/casper-bottom/09format_esr_data_partition
]
;
then
$SED
'/mkfs.vfat.*edev.3/icp -a /dev/dm-3 /dev/ventoy3'
-i
/scripts/casper-bottom/09format_esr_data_partition
fi
INSTALL/grub/grub.cfg
View file @
f7c78879
...
@@ -1691,6 +1691,23 @@ function ventoy_img_recalbox {
...
@@ -1691,6 +1691,23 @@ function ventoy_img_recalbox {
vt_unset_boot_opt
vt_unset_boot_opt
}
}
function ventoy_img_esysrescue {
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
ventoy_debug_pause
#boot image file
vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=esysrescue
vt_img_hook_root
set root=(vtimghd,1)
configfile (vtimghd,1)/boot/grub/grub.cfg
vt_img_unhook_root
vt_unset_boot_opt
}
function ventoy_img_batocera {
function ventoy_img_batocera {
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
...
@@ -1943,6 +1960,8 @@ function img_common_menuentry {
...
@@ -1943,6 +1960,8 @@ function img_common_menuentry {
ventoy_img_tails
ventoy_img_tails
elif [ "$vtImgHd2Label" = "RECALBOX" ]; then
elif [ "$vtImgHd2Label" = "RECALBOX" ]; then
ventoy_img_recalbox
ventoy_img_recalbox
elif [ "$vtImgHd1Label" = "ESYSRESCUE" ]; then
ventoy_img_esysrescue
elif [ -e (vtimghd,1)/easy.sfs ]; then
elif [ -e (vtimghd,1)/easy.sfs ]; then
ventoy_img_easyos
ventoy_img_easyos
elif [ -e (vtimghd,1)/volumio.initrd ]; then
elif [ -e (vtimghd,1)/volumio.initrd ]; then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment