Add 2sec. sleep after parted in efi_create_key_structure() and bios_create_key structure()
Because a bug my Debian Setup : kernel doesn't have time to refresh partitions scheme then mkfs doesn't format partitions
This commit is contained in:
parent
ad4ff0de3f
commit
aa5705cde4
1 changed files with 3 additions and 2 deletions
5
init.sh
5
init.sh
|
@ -168,8 +168,8 @@ umount_device (){
|
||||||
}
|
}
|
||||||
|
|
||||||
efi_create_key_structure () {
|
efi_create_key_structure () {
|
||||||
parted -s $1 mklabel gpt mkpart EFS fat32 1MiB 128MiB set 1 boot on
|
parted -s $1 mklabel gpt mkpart EFS fat32 1MiB 128MiB set 1 boot on mkpart debian fat32 128MiB 100%
|
||||||
parted -s $1 mkpart primary fat32 128MiB 100%
|
sleep 2
|
||||||
mkfs.vfat ${1}1 -n efi &> /dev/null
|
mkfs.vfat ${1}1 -n efi &> /dev/null
|
||||||
mkfs.vfat ${1}2 -n debian &> /dev/null
|
mkfs.vfat ${1}2 -n debian &> /dev/null
|
||||||
mount ${1}2 $2
|
mount ${1}2 $2
|
||||||
|
@ -179,6 +179,7 @@ efi_create_key_structure () {
|
||||||
|
|
||||||
bios_create_key_structure() {
|
bios_create_key_structure() {
|
||||||
parted -s $1 mklabel msdos mkpart primary fat32 1MiB 100% set 1 boot on
|
parted -s $1 mklabel msdos mkpart primary fat32 1MiB 100% set 1 boot on
|
||||||
|
sleep 2
|
||||||
mkfs.vfat ${1}1 -n debian &> /dev/null
|
mkfs.vfat ${1}1 -n debian &> /dev/null
|
||||||
mount ${1}1 $2
|
mount ${1}1 $2
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue