fat
This commit is contained in:
parent
5cf0d4021e
commit
dfe3be4f1c
3 changed files with 21 additions and 12 deletions
19
bash/fs.sh
Normal file
19
bash/fs.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
fs_make_fat() {
|
||||
local device="${1}"
|
||||
local name="${2}"
|
||||
local volid="${3}"
|
||||
if [ -b "${device}" ]; then
|
||||
set -- \
|
||||
-F 32 \
|
||||
-S 4096
|
||||
if [ -n "${name}" ]; then
|
||||
set -- "${@}" \
|
||||
-n "${name}"
|
||||
fi
|
||||
if [ -n "${volid}" ]; then
|
||||
set -- "${@}" \
|
||||
-i "${volid}"
|
||||
fi
|
||||
mkfs.fat "${@}" "${device}"
|
||||
fi
|
||||
}
|
|
@ -49,12 +49,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
|||
# format esp
|
||||
dd \
|
||||
if="/dev/zero" of="${device}3" bs="1M"
|
||||
mkfs.vfat \
|
||||
-F 32 \
|
||||
-S 4096 \
|
||||
-i "0000000${number}" \
|
||||
-n "esp-${number}" \
|
||||
"${device}3"
|
||||
fs_make_fat "${device}3" "esp-${number}" "0000000${number}"
|
||||
# mount esp
|
||||
mkdir --parents "/media/esp/${number}"
|
||||
mount "${device}3" "/media/esp/${number}"
|
||||
|
|
|
@ -22,12 +22,7 @@ rescue_wipe_0_init_ovh_vle2() {
|
|||
# esp / wipe
|
||||
dd if="/dev/zero" of="${device}3" bs="1M"
|
||||
# esp / format
|
||||
mkfs.vfat \
|
||||
-F 32 \
|
||||
-S 4096 \
|
||||
-i "00000001" \
|
||||
-n "esp" \
|
||||
"${device}3"
|
||||
fs_make_fat "${device}3" "esp" "00000001"
|
||||
# esp / mount
|
||||
mkdir --parents "/media/esp"
|
||||
mount "${device}3" "/media/esp"
|
||||
|
|
Loading…
Reference in a new issue