View Single Post
Old 01-26-2021, 11:00 AM   #79
Elektron
Banned
Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.
 
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
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]#
Elektron is offline   Reply With Quote