Commit 4f840ed6 authored by longpanda's avatar longpanda
Browse files

Merge branch 'master' of https://github.com/ventoy/Ventoy

parents d02f184a 774e3892
...@@ -240,7 +240,10 @@ if [ "$MODE" = "install" ]; then ...@@ -240,7 +240,10 @@ if [ "$MODE" = "install" ]; then
cluster_sectors=64 cluster_sectors=64
fi fi
$cmd -n ventoy -s $cluster_sectors ${DISK}1 PART1=$(get_disk_part_name $DISK 1)
PART2=$(get_disk_part_name $DISK 2)
$cmd -n ventoy -s $cluster_sectors ${PART1}
vtinfo "writing data to disk ..." vtinfo "writing data to disk ..."
...@@ -268,7 +271,7 @@ if [ "$MODE" = "install" ]; then ...@@ -268,7 +271,7 @@ if [ "$MODE" = "install" ]; then
vtinfo "esp partition processing ..." vtinfo "esp partition processing ..."
sleep 1 sleep 1
mtpnt=$(grep "^${DISK}2" /proc/mounts | awk '{print $2}') mtpnt=$(grep "^${PART2}" /proc/mounts | awk '{print $2}')
if [ -n "$mtpnt" ]; then if [ -n "$mtpnt" ]; then
umount $mtpnt >/dev/null 2>&1 umount $mtpnt >/dev/null 2>&1
fi fi
...@@ -278,12 +281,12 @@ if [ "$MODE" = "install" ]; then ...@@ -278,12 +281,12 @@ if [ "$MODE" = "install" ]; then
vtdebug "mounting part2 ...." vtdebug "mounting part2 ...."
for tt in 1 2 3; do for tt in 1 2 3; do
if mount ${DISK}2 ./tmp_mnt; then if mount ${PART2} ./tmp_mnt; then
vtdebug "mounting part2 success" vtdebug "mounting part2 success"
break break
fi fi
mtpnt=$(grep "^${DISK}2" /proc/mounts | awk '{print $2}') mtpnt=$(grep "^${PART2}" /proc/mounts | awk '{print $2}')
if [ -n "$mtpnt" ]; then if [ -n "$mtpnt" ]; then
umount $mtpnt >/dev/null 2>&1 umount $mtpnt >/dev/null 2>&1
fi fi
...@@ -363,7 +366,7 @@ else ...@@ -363,7 +366,7 @@ else
vtdebug "mounting part2 ...." vtdebug "mounting part2 ...."
for tt in 1 2 3; do for tt in 1 2 3; do
if mount ${DISK}2 ./tmp_mnt; then if mount ${PART2} ./tmp_mnt; then
vtdebug "mounting part2 success" vtdebug "mounting part2 success"
break break
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment