mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
create_installstick: use 'value' instant 'export' option to be ubuntu 10.10 compatible, write MBR - thanks to rjbell4
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
a47b58903c
commit
b735f906b1
@ -110,7 +110,7 @@ fi
|
|||||||
|
|
||||||
# find UUID
|
# find UUID
|
||||||
echo -n "finding UUID from $PART ..."
|
echo -n "finding UUID from $PART ..."
|
||||||
UUID=`blkid $PART -s UUID -o export`
|
UUID=`blkid $PART -s UUID -o value`
|
||||||
echo "$UUID"
|
echo "$UUID"
|
||||||
|
|
||||||
# create bootloader
|
# create bootloader
|
||||||
@ -121,7 +121,7 @@ fi
|
|||||||
echo " " >> /tmp/usb_install/syslinux.cfg
|
echo " " >> /tmp/usb_install/syslinux.cfg
|
||||||
echo "LABEL linux" >> /tmp/usb_install/syslinux.cfg
|
echo "LABEL linux" >> /tmp/usb_install/syslinux.cfg
|
||||||
echo " KERNEL /KERNEL" >> /tmp/usb_install/syslinux.cfg
|
echo " KERNEL /KERNEL" >> /tmp/usb_install/syslinux.cfg
|
||||||
echo " APPEND boot=$UUID installer quiet" >> /tmp/usb_install/syslinux.cfg
|
echo " APPEND boot=UUID=$UUID installer quiet" >> /tmp/usb_install/syslinux.cfg
|
||||||
|
|
||||||
# copy files
|
# copy files
|
||||||
echo "copy files to $PART..."
|
echo "copy files to $PART..."
|
||||||
@ -136,14 +136,28 @@ fi
|
|||||||
cp README /tmp/usb_install
|
cp README /tmp/usb_install
|
||||||
cp RELEASE /tmp/usb_install
|
cp RELEASE /tmp/usb_install
|
||||||
|
|
||||||
# syncing disk
|
|
||||||
echo "syncing disk..."
|
|
||||||
sync
|
|
||||||
|
|
||||||
# unmount partition
|
# unmount partition
|
||||||
echo "unmounting partition $PART..."
|
echo "unmounting partition $PART..."
|
||||||
umount "$PART"
|
umount "$PART"
|
||||||
|
|
||||||
|
# write mbr
|
||||||
|
echo "writing mbr..."
|
||||||
|
if [ -f /usr/lib/syslinux/mbr.bin ]; then
|
||||||
|
MBR="/usr/lib/syslinux/mbr.bin" # example: ubuntu
|
||||||
|
elif [ -f /usr/share/syslinux/mbr.bin ]; then
|
||||||
|
MBR="/usr/share/syslinux/mbr.bin" # example: fedora
|
||||||
|
else
|
||||||
|
echo "Dont find mbr.bin on Host OS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$MBR" ]; then
|
||||||
|
cat "MBR" > "$DISK"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# syncing disk
|
||||||
|
echo "syncing disk..."
|
||||||
|
sync
|
||||||
|
|
||||||
# cleaning
|
# cleaning
|
||||||
echo "cleaning tempdir..."
|
echo "cleaning tempdir..."
|
||||||
rmdir /tmp/usb_install
|
rmdir /tmp/usb_install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user