mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
fix the bootloader disk read-only
This commit is contained in:
parent
f65eb21930
commit
a536eecee3
@ -7,6 +7,11 @@
|
||||
###############################################################################
|
||||
# Check loader disk
|
||||
function checkBootLoader() {
|
||||
while read KNAME RO; do
|
||||
[ -z "${KNAME}" ] && continue
|
||||
[ "${RO}" = "0" ] && continue
|
||||
hdparm -r0 "${KNAME}" >/dev/null 2>&1 || true
|
||||
done <<<$(lsblk -pno KNAME,RO 2>/dev/null)
|
||||
[ ! -w "${PART1_PATH}" ] && return 1
|
||||
[ ! -w "${PART2_PATH}" ] && return 1
|
||||
[ ! -w "${PART3_PATH}" ] && return 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user