]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/easystartup/disk_hook.sh
Fix the boot issue for Fedora/CentOS when file name contains special character (e...
[Ventoy.git] / IMG / cpio / ventoy / hook / easystartup / disk_hook.sh
index d9b3d48ba5c395df268c756b2c3396e195c5c157..b688688238aec20c994b27508e6e9f218167d203 100644 (file)
@@ -78,6 +78,9 @@ fi
 
 ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
 
-ln -s /dev/dm-0 /dev/root
+blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
+vtDM=$(ventoy_find_dm_id ${blkdev_num})
+cp -a /dev/$vtDM /dev/ventoy
+ln -s /dev/$vtDM /dev/root
 
 PATH=$VTPATH_OLD