Fix syslinux failure on new USB drive
This commit is contained in:
parent
65d5c6a01b
commit
d642f86144
1 changed files with 10 additions and 7 deletions
|
@ -21,22 +21,25 @@ if [ -b $DEST_DIR ]; then
|
||||||
# We have a block device, install syslinux and mount it
|
# We have a block device, install syslinux and mount it
|
||||||
DEST_DEV=$DEST_DIR
|
DEST_DEV=$DEST_DIR
|
||||||
DEST_DIR=`mktemp -d mntXXXXXX`
|
DEST_DIR=`mktemp -d mntXXXXXX`
|
||||||
|
mount $DEST_DEV $DEST_DIR
|
||||||
|
|
||||||
|
if [ ! -d $DEST_DIR/syslinux ]; then
|
||||||
|
mkdir -p $DEST_DIR/syslinux
|
||||||
|
fi
|
||||||
|
|
||||||
# Install syslinux on the device
|
# Install syslinux on the device
|
||||||
syslinux --install --directory syslinux $DEST_DEV
|
syslinux --install --directory syslinux $DEST_DEV
|
||||||
|
|
||||||
mount $DEST_DEV $DEST_DIR
|
|
||||||
else
|
else
|
||||||
# We have a directory (for sanity checking output)
|
# We have a directory (for sanity checking output)
|
||||||
DEST_DEV=""
|
DEST_DEV=""
|
||||||
if [ ! -d $DEST_DIR/syslinux ]; then
|
if [ ! -d $DEST_DIR/syslinux ]; then
|
||||||
mkdir -p $DEST_DIR/syslinux
|
mkdir -p $DEST_DIR/syslinux
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get some more stuff from syslinux
|
# Get some more stuff from syslinux
|
||||||
for i in memdisk menu.c32; do
|
for i in memdisk menu.c32; do
|
||||||
cp -p /usr/lib/syslinux/$i $DEST_DIR/syslinux
|
cp -p /usr/lib/syslinux/$i $DEST_DIR/syslinux
|
||||||
done
|
done
|
||||||
|
|
||||||
CFG=$DEST_DIR/syslinux/syslinux.cfg
|
CFG=$DEST_DIR/syslinux/syslinux.cfg
|
||||||
|
|
Loading…
Reference in a new issue