install.sh
来自「PC BIOS Boot Manager _within_ the Master」· Shell 代码 · 共 29 行
SH
29 行
#!/bin/sh
if [ -f /etc/hda.mbr ]; then
echo mbrbm installation failed
exit 1
fi
if [ ! -f mbrbm.bin ]; then
echo mbrbm installation failed
exit 1
fi
cp mbrbm.bin /etc
set -ex
cd /etc
rm -f hda.mbr
dd if=/dev/hda of=hda.mbr bs=1b count=1
if [ ! -f /etc/hda.mbr ]; then
echo mbrbm installation failed
exit 1
fi
dd if=mbrbm.bin of=hdambrbm.mbr bs=1 count=438
dd if=hda.mbr bs=1 skip=438 count=74 >>hdambrbm.mbr
MBRSIZE=`ls -l hdambrbm.mbr | awk '{print $5}'`
if [ ! "$MBRSIZE" -eq 512 ]; then
echo mbrbm installation failed
exit 1
fi
dd if=hdambrbm.mbr of=/dev/hda bs=1b count=1
# KEEP THE FILE /etc/hda.mbr AS BACKUP OF ORIGINAL MBR
exit
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?