diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-06-26 10:11:43 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2018-06-26 10:11:43 +0800 |
commit | 83df9af6f3fdf72d6dc7605b0a74a4c25cd96bfd (patch) | |
tree | 4f2a47e4a5ffa8a0017793c93b47e8da2e665994 /install_syslinux | |
parent | 6945e44775e740dfe0a59ed959782f7a3f121f4f (diff) | |
download | liveusb-builder-83df9af6f3fdf72d6dc7605b0a74a4c25cd96bfd.tar.xz |
Use syslinux as legacy BIOS bootloader
- Install syslinux by default, fallback to GRUB
- Generate syslinux.cfg
Diffstat (limited to 'install_syslinux')
-rwxr-xr-x | install_syslinux | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/install_syslinux b/install_syslinux new file mode 100755 index 0000000..d4fdbf9 --- /dev/null +++ b/install_syslinux @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright (C) 2018 Iru Cai <mytbk920423@gmail.com> +# SPDX-License-Identifier: GPL-3.0-or-later + +# Example: ./install_syslinux /dev/sdb /dev/sdb1 /media/boot +set -e + +SYSLINUX_BIOS=/usr/lib/syslinux/bios +DEVNAME="$1" +BOOTPART="$2" +BOOTPATH="$3" + +test -d "$SYSLINUX_BIOS" +syslinux -i "$BOOTPART" +dd bs=440 count=1 conv=notrunc if="$SYSLINUX_BIOS/mbr.bin" of="$DEVNAME" +install -d "$BOOTPATH/syslinux" +cp "$SYSLINUX_BIOS"/*.c32 "$BOOTPATH/syslinux" |