mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-24 14:56:49 +03:00
20 lines
394 B
Bash
Executable File
20 lines
394 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# We take 1 argument, the device to use.
|
|
if [ -z "$1" ]; then
|
|
echo "Usage: $0 <device>"
|
|
exit 1
|
|
fi
|
|
|
|
# Variables.
|
|
DEVICE="$1"
|
|
MBR="$(mktemp)"
|
|
QLOADER2="src/qloader2.bin"
|
|
|
|
# Copy the loader to the device.
|
|
dd if="$DEVICE" of="$MBR" bs=1 count=64 skip=446
|
|
dd if="$QLOADER2" of="$DEVICE" conv=notrunc
|
|
dd if="$MBR" of="$DEVICE" conv=notrunc bs=1 count=64 seek=446
|