hardillb / rpi-gadget-image-creator

Takes a standard Raspbian Lite image and adds USB Ethernet gadget config
https://www.hardill.me.uk/wordpress/2020/02/21/building-custom-raspberry-pi-sd-card-images/
Apache License 2.0
176 stars 31 forks source link

adapting this script to other ditros? #1

Closed AnatoleLucet closed 4 years ago

AnatoleLucet commented 4 years ago

So, I innocently thought that changing the username and the password in the binary would allow me to make this script work on another distro, but it didn't.

How could I make this script work with Kali linux?

https://www.offensive-security.com/kali-linux-arm-images/#1493408272250-e17e9049-9ce8 (I'm using the last one Kali Linux RaspberryPi 2 (v1.2), 3 and 4 64-Bit)

Run /sbin/init as init process
request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module binfmt-464c, throttling...
request_module: modprobe binfmt-464c cannot be processed, kmod busy with 50 threads for more than 5 seconds now
Starting init: /sbin/init exists but couldn't execute it (error -8)
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module binfmt-464c, throttling...
request_module: modprobe binfmt-464c cannot be processed, kmod busy with 50 threads for more than 5 seconds now
Starting init: /bin/sh exists but couldn't execute it (error -8)
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.50+ #1
Hardware name: ARM-Versatile (Device Tree Support)
[<c001d230>] (unwind_backtrace) from [<c00190ac>] (show_stack+0x10/0x14)
[<c00190ac>] (show_stack) from [<c0025f14>] (panic+0xc8/0x240)
[<c0025f14>] (panic) from [<c054b434>] (kernel_init+0xb8/0xe8)
[<c054b434>] (kernel_init) from [<c00090e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xcf823fb0 to 0xcf823ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Rebooting in 1 seconds..
send: spawn id exp4 not open
    while executing
"send "root\n""
    (file "./create-image" line 24)

# then it exit 1
hardillb commented 4 years ago

No idea, but I expect that the DockerPi base image is expecting a 32bit OS.

Also the script is specifically for modifying Raspbian, it will NOT work for Kali

AnatoleLucet commented 4 years ago

I've also tried with a 32bit and it does the same. Anyway, I've opened an issue on the dockerpi repo since it looks like the issue is coming from them.