View Single Post
Old 01-22-2021, 04:38 PM   #45
NiMa
Fanatic
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 507
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by NiMa View Post
@Georgelemental
Replace /mnt/onboard/.adds/kobox/kobox-boot.sh with this:
Code:
#!/bin/sh

# KoBox launcher
# Nicolas Mailloux, 2021.
#
# This mounts the main Alpine Linux image to /mnt/user and then bind-mounts /sys, /proc, etc. to the chroot's ones.

echo 1 > /sys/class/graphics/fb0/rotate

mkdir -p /mnt/user
mount /mnt/onboard/.adds/kobox/kobox.img /mnt/user
mount -v --bind /dev /mnt/user/dev
mount -v --bind /dev/pts /mnt/user/dev/pts
mount -vt proc proc /mnt/user/proc
mount -vt sysfs sysfs /mnt/user/sys
mount -vt tmpfs tmpfs /mnt/user/run
mount -vt tmpfs tmpfs /mnt/user/tmp
mkdir /mnt/user/dev/shm
mount -vt tmpfs tmpfs /mnt/user/dev/shm


# <---- DANGEROUS ---->
# This could be harmful to the /mnt/onboard partition! Don't do this unless you are sure of what you're doing!
# mount --bind /mnt/onboard /mnt/user/mnt
# <---- DANGEROUS ---->


# Copying network info so that we can access the Internet
cp /etc/resolv.conf /mnt/user/etc

# Killing Nickel/Fickel/etc.
export DBUS_SESSION_BUS_ADDRESS NICKEL_HOME WIFI_MODULE LANG WIFI_MODULE_PATH INTERFACE
sync
killall -TERM nickel hindenburg sickel fickel fmon 2>/dev/null

# Let's go!
chroot /mnt/user /bin/sh /kobox.sh
and make it executable (chmod +x)
Start it in normal rotation (don't force landscape or anything)
You'll also have to replace the py file back to the original, it can be found here: https://www.mobileread.com/forums/sh...d.php?t=336210
NiMa is offline   Reply With Quote