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
377e3fb7
Commit
377e3fb7
authored
Jan 22, 2025
by
longpanda
Browse files
Fix the boot issue of SystemRescue 11.02+ (#2958) (#3058)
parent
f62bd1be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
IMG/cpio/ventoy/init_chain
IMG/cpio/ventoy/init_chain
+19
-17
No files found.
IMG/cpio/ventoy/init_chain
View file @
377e3fb7
...
@@ -72,27 +72,29 @@ ventoy_unpack_initramfs() {
...
@@ -72,27 +72,29 @@ ventoy_unpack_initramfs() {
for
vtx
in
'1F8B zcat'
'1F9E zcat'
'425A bzcat'
'5D00 lzcat'
'FD37 xzcat'
'894C lzopcat'
'0221 lz4cat'
'28B5 zstdcat'
'3037 cat'
'4C5A lunzip -c'
;
do
for
vtx
in
'1F8B zcat'
'1F9E zcat'
'425A bzcat'
'5D00 lzcat'
'FD37 xzcat'
'894C lzopcat'
'0221 lz4cat'
'28B5 zstdcat'
'3037 cat'
'4C5A lunzip -c'
;
do
if
[
"
${
vtx
:0:4
}
"
=
"
${
vtmagic
:0:4
}
"
]
;
then
if
[
"
${
vtx
:0:4
}
"
=
"
${
vtmagic
:0:4
}
"
]
;
then
echo
"vtx=
$vtx
"
>>
$VTLOG
echo
"vtx=
$vtx
"
>>
$VTLOG
if
[
$vtskip
-eq
0
]
;
then
if
[
$vtskip
-ne
0
]
;
then
if
[
"
${
vtx
:5
}
"
=
"xzcat"
]
;
then
dd
if
=
$vtfile
skip
=
$vtskip
iflag
=
skip_bytes
status
=
none
>
${
vtfile
}
.skip
rm
-f
$vtfile
mv
${
vtfile
}
.skip
$vtfile
fi
if
[
"
${
vtx
:5
}
"
=
"xzcat"
]
;
then
rm
-f
$VTOY_PATH
/xzlog
${
vtx
:5
}
$vtfile
2>
$VTOY_PATH
/xzlog |
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
if
grep
-q
'corrupted data'
$VTOY_PATH
/xzlog
;
then
echo
'xzcat failed, now try xzminidec...'
>>
$VTLOG
rm
-f
$VTOY_PATH
/xzlog
rm
-f
$VTOY_PATH
/xzlog
${
vtx
:5
}
$vtfile
2>
$VTOY_PATH
/xzlog |
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
cat
$vtfile
| xzminidec 2>
$VTOY_PATH
/xzlog |
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
if
grep
-q
'corrupted data'
$VTOY_PATH
/xzlog
;
then
echo
'xzcat failed, now try xzminidec...'
>>
$VTLOG
if
grep
-q
'limit'
$VTOY_PATH
/xzlog
;
then
rm
-f
$VTOY_PATH
/xzlog
echo
'xzminidec failed, now try xzcat_musl ...'
>>
$VTLOG
cat
$vtfile
| xzminidec 2>
$VTOY_PATH
/xzlog |
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
xzcat_musl
$vtfile
|
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
if
grep
-q
'limit'
$VTOY_PATH
/xzlog
;
then
echo
'xzminidec failed, now try xzcat_musl ...'
>>
$VTLOG
xzcat_musl
$vtfile
|
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
fi
fi
fi
else
${
vtx
:5
}
$vtfile
|
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
fi
fi
else
else
dd
if
=
$vtfile
skip
=
$vtskip
iflag
=
skip_bytes
status
=
none |
${
vtx
:5
}
|
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
${
vtx
:5
}
$vtfile
|
(
cpio
-idmu
2>>
$VTLOG
;
cat
>
$vttmp
)
fi
fi
break
break
fi
fi
done
done
...
...
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