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
86b13727
Commit
86b13727
authored
Feb 14, 2022
by
longpanda
Browse files
Fix the issue when booting latest systemrescue
parent
006f26d0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
6 deletions
+17
-6
IMG/cpio/sbin/init
IMG/cpio/sbin/init
+4
-0
IMG/cpio/ventoy/hook/arch/ventoy-disk.sh
IMG/cpio/ventoy/hook/arch/ventoy-disk.sh
+11
-2
IMG/cpio/ventoy/init_chain
IMG/cpio/ventoy/init_chain
+2
-4
IMG/cpio_x86/ventoy/busybox/xzcat32_musl.xz
IMG/cpio_x86/ventoy/busybox/xzcat32_musl.xz
+0
-0
IMG/cpio_x86/ventoy/busybox/xzcat64_musl.xz
IMG/cpio_x86/ventoy/busybox/xzcat64_musl.xz
+0
-0
No files found.
IMG/cpio/sbin/init
View file @
86b13727
...
@@ -115,6 +115,8 @@ fi
...
@@ -115,6 +115,8 @@ fi
if [ "$VTOY_ARCH" = "x86_64" ]; then
if [ "$VTOY_ARCH" = "x86_64" ]; then
echo "Use x86_64 busybox toolkit ..." >>$VTLOG
echo "Use x86_64 busybox toolkit ..." >>$VTLOG
$BUSYBOX_PATH/xzcat $BUSYBOX_PATH/xzcat64_musl.xz > $BUSYBOX_PATH/xzcat_musl
$BUSYBOX_PATH/chmod +x $BUSYBOX_PATH/xzcat_musl
ln -s $BUSYBOX_PATH/xzminidec64 $BUSYBOX_PATH/xzminidec
ln -s $BUSYBOX_PATH/xzminidec64 $BUSYBOX_PATH/xzminidec
ln -s $VTOY_PATH/tool/dmsetup64 $VTOY_PATH/tool/dmsetup
ln -s $VTOY_PATH/tool/dmsetup64 $VTOY_PATH/tool/dmsetup
ln -s $VTOY_PATH/tool/lunzip64 $VTOY_PATH/tool/lunzip
ln -s $VTOY_PATH/tool/lunzip64 $VTOY_PATH/tool/lunzip
...
@@ -124,6 +126,8 @@ if [ "$VTOY_ARCH" = "x86_64" ]; then
...
@@ -124,6 +126,8 @@ if [ "$VTOY_ARCH" = "x86_64" ]; then
ln -s $VTOY_PATH/tool/zstdcat64 $VTOY_PATH/tool/zstdcat
ln -s $VTOY_PATH/tool/zstdcat64 $VTOY_PATH/tool/zstdcat
elif [ "$VTOY_ARCH" = "i386" ]; then
elif [ "$VTOY_ARCH" = "i386" ]; then
echo "Use i386 busybox toolkit ..." >>$VTLOG
echo "Use i386 busybox toolkit ..." >>$VTLOG
$BUSYBOX_PATH/xzcat $BUSYBOX_PATH/xzcat32_musl.xz > $BUSYBOX_PATH/xzcat_musl
$BUSYBOX_PATH/chmod +x $BUSYBOX_PATH/xzcat_musl
ln -s $BUSYBOX_PATH/xzminidec32 $BUSYBOX_PATH/xzminidec
ln -s $BUSYBOX_PATH/xzminidec32 $BUSYBOX_PATH/xzminidec
ln -s $VTOY_PATH/tool/dmsetup32 $VTOY_PATH/tool/dmsetup
ln -s $VTOY_PATH/tool/dmsetup32 $VTOY_PATH/tool/dmsetup
ln -s $VTOY_PATH/tool/lunzip32 $VTOY_PATH/tool/lunzip
ln -s $VTOY_PATH/tool/lunzip32 $VTOY_PATH/tool/lunzip
...
...
IMG/cpio/ventoy/hook/arch/ventoy-disk.sh
View file @
86b13727
...
@@ -49,7 +49,12 @@ done
...
@@ -49,7 +49,12 @@ done
if
[
-n
"
$1
"
]
;
then
if
[
-n
"
$1
"
]
;
then
vtlog
"ln -s /dev/
$vtDM
$1
"
vtlog
"ln -s /dev/
$vtDM
$1
"
ln
-s
/dev/
$vtDM
"
$1
"
if
[
-e
"
$1
"
]
;
then
vtlog
"
$1
already exist"
else
ln
-s
/dev/
$vtDM
"
$1
"
fi
else
else
vtLABEL
=
$(
$BUSYBOX_PATH
/blkid /dev/
$vtDM
|
$SED
's/.*LABEL="\([^"]*\)".*/\1/'
)
vtLABEL
=
$(
$BUSYBOX_PATH
/blkid /dev/
$vtDM
|
$SED
's/.*LABEL="\([^"]*\)".*/\1/'
)
vtlog
"vtLABEL is
$vtLABEL
"
vtlog
"vtLABEL is
$vtLABEL
"
...
@@ -59,7 +64,11 @@ else
...
@@ -59,7 +64,11 @@ else
vtlog
"vtLABEL is
$vtLABEL
from cmdline"
vtlog
"vtLABEL is
$vtLABEL
from cmdline"
fi
fi
ln
-s
/dev/
$vtDM
"/dev/disk/by-label/
$vtLABEL
"
if
[
-e
"/dev/disk/by-label/
$vtLABEL
"
]
;
then
vtlog
"
$1
already exist"
else
ln
-s
/dev/
$vtDM
"/dev/disk/by-label/
$vtLABEL
"
fi
fi
fi
# OK finish
# OK finish
...
...
IMG/cpio/ventoy/init_chain
View file @
86b13727
...
@@ -77,12 +77,10 @@ ventoy_unpack_initramfs() {
...
@@ -77,12 +77,10 @@ ventoy_unpack_initramfs() {
if
[
"
${
vtx
:5
}
"
=
"xzcat"
]
;
then
if
[
"
${
vtx
:5
}
"
=
"xzcat"
]
;
then
rm
-f
$VTOY_PATH
/xzlog
rm
-f
$VTOY_PATH
/xzlog
${
vtx
:5
}
$vtfile
2>
$VTOY_PATH
/xzlog |
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
${
vtx
:5
}
$vtfile
2>
$VTOY_PATH
/xzlog |
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
if
grep
-q
'corrupted data'
$VTOY_PATH
/xzlog
;
then
if
grep
-q
'corrupted data'
$VTOY_PATH
/xzlog
;
then
echo
'xzcat failed, now try xz
minidec
...'
>>
$VTLOG
echo
'xzcat failed, now try xz
cat_musl
...'
>>
$VTLOG
cat
$vtfile
|
xzminidec |
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
xz
cat
_musl
$vtfile
|
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
fi
fi
else
else
${
vtx
:5
}
$vtfile
|
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
${
vtx
:5
}
$vtfile
|
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
fi
fi
...
...
IMG/cpio_x86/ventoy/busybox/xzcat32_musl.xz
0 → 100644
View file @
86b13727
File added
IMG/cpio_x86/ventoy/busybox/xzcat64_musl.xz
0 → 100644
View file @
86b13727
File added
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