26 lines
460 B
Bash
26 lines
460 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
function setup_bootloader()
|
||
|
{
|
||
|
local dev="$1"
|
||
|
check_if_can_overwrite
|
||
|
check_if_mounted_or_used_in_lvm_md_crypt
|
||
|
wipe_or_nvme_format
|
||
|
parted mklabel gpt
|
||
|
parted mkpart 1GB EFI
|
||
|
parted mkpart 1GB squashfs-1
|
||
|
parted mkpart 1GB squashfs-2
|
||
|
parted mkpart 1GB squashfs-3
|
||
|
|
||
|
dd gptmbr.bin
|
||
|
mkfs.vfat "$dev"1
|
||
|
syslinux "$dev"1
|
||
|
mount
|
||
|
copy_efi_files
|
||
|
create_syslinux_cfg
|
||
|
umount
|
||
|
}
|
||
|
|
||
|
detect_disks
|
||
|
select_disk
|