View Single Post
Old 01-26-2021, 11:29 AM   #80
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 Elektron View Post
Code:
Microsoft Windows [Version 10.0.18363.1316]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\redacted>ssh root@192.168.1.77
root@192.168.1.77's password:

[admin@pixie root]# cat /mnt/onboard/.adds/kobox/kobox-boot.sh
#!/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.

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
[admin@pixie root]# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               247.9M    180.0M     68.0M  73% /
none                     16.0M         0     16.0M   0% /tmp
none                    124.5M      4.0K    124.5M   0% /dev
none                     16.0K      4.0K     12.0K  25% /var/lib
none                     16.0K         0     16.0K   0% /var/log
none                    128.0K     28.0K    100.0K  22% /var/run
/dev/mmcblk0p3            1.3G    259.9M      1.1G  19% /mnt/onboard
[admin@pixie root]# /mnt/onboard/.adds/kobox/kobox-init.sh
mount: mounting /dev/loop0 on /mnt/user failed: Device or resource busy
mount: mounting /dev on /mnt/user/dev failed: No such file or directory
mount: mounting /dev/pts on /mnt/user/dev/pts failed: No such file or directory
mount: mounting proc on /mnt/user/proc failed: No such file or directory
mount: mounting sysfs on /mnt/user/sys failed: No such file or directory
mount: mounting tmpfs on /mnt/user/run failed: No such file or directory
mount: mounting tmpfs on /mnt/user/tmp failed: No such file or directory
mkdir: can't create directory '/mnt/user/dev/shm': No such file or directory
mount: mounting tmpfs on /mnt/user/dev/shm failed: No such file or directory
chroot: can't execute '/bin/sh': No such file or directory
[admin@pixie root]# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               247.9M    180.0M     68.0M  73% /
none                     16.0M         0     16.0M   0% /tmp
none                    124.5M      4.0K    124.5M   0% /dev
none                     16.0K      4.0K     12.0K  25% /var/lib
none                     16.0K         0     16.0K   0% /var/log
none                    128.0K     28.0K    100.0K  22% /var/run
/dev/mmcblk0p3            1.3G    259.9M      1.1G  19% /mnt/onboard
[admin@pixie root]# ls /mnt
onboard  sd       user
[admin@pixie root]#
Huh. That's very strange. Are you on your Kobo Mini?

Download strace.zip from there: https://www.mobileread.com/forums/sh...05&postcount=2
Unzip it
Use SCP/FTP to put the binary in the root storage of the Kobo (/)
Restart the Kobo
Code:
cd /
and try and post the output of this:
Code:
./strace losetup -P -f /mnt/onboard/.adds/kobox/kobox.img
(should not produce any output)
and this:
Code:
./strace mount /dev/loop1 /mnt/user
thanks.
I bought a Kobo Mini a few days ago and it should arrive soon, maybe I will more be able to help you

Last edited by NiMa; 01-26-2021 at 11:33 AM.
NiMa is offline   Reply With Quote