The officially official Devuan Forum!

You are not logged in.

#1 Yesterday 14:11:13

MProG10
Member
Registered: Yesterday
Posts: 4  

init system is failing

Hello. I'm writing this post in requesting assistance booting Devuan GNU/Linux on an Android device. This is an ARM64 device. Upon running the init system, the system doesn't mount devtmpfs. The init system is failing. I do have CONFIG_DEVTMPFS set.

Do you happen to know which are the required kernel configurations for a successful boot? I believe I'm missing a kernel configuration, since I had success on another Android device. This other device is ARM-based.

Unfortunately, I don't have much logs to read. And I know for a fact the init system is failing, since running

adb ls /dev/

returns an empty directory. Do you happen to know of a method to show init debug messages?

From a chroot environment, I see the init system doesn't mount devtmpfs either.

Offline

#2 Today 10:19:48

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,670  

Re: init system is failing

Hmm, the sysvinit scripts for eudev (or udev) seems to mount the kernel's devtmpfs onto /dev (of the post-pivot root filesystem), so apparently your system boot-up doesn't include those.

Could you share your kernel boot command line arguments?

Offline

#3 Today 11:35:25

MProG10
Member
Registered: Yesterday
Posts: 4  

Re: init system is failing

I tried messing with the kernel boot arguments. No dice. This is my current kernel boot arguments.

console=tty0,115200 loglevel=7

I was hoping loglevel=7 to log init messages. No dice. Tried including root=/dev/mmcblk0p54 as argument. No dice.

This device is running kernel 3.18. Here are the sources and defconfig. And here's the script I use to boot Devuan GNU/Linux.

#!/bin/sh

mount -T /fstab -a
mdev -s
mount /dev/mmcblk0p54 /mnt
exec switch_root /mnt /sbin/init

Note this other Android device is running kernel 3.10. The failure is unlikely to be related to the kernel version.

Last edited by MProG10 (Today 11:44:44)

Offline

#4 Today 12:03:17

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,670  

Re: init system is failing

Hmm, that script; which filesystem has that script. Is that /init in an initrd?

Without initrd, you probably will need boot root= and rootfstype= arguments and then the kernel might be able to find that /init script on the given root. This will still require the kernel to have built-in modules to handle mmcblk device, the partition table and the filesystem involved.

Do you know that the kernel loads and starts?

Do you have serial connectors to attach to, to get bootloading logs?

Offline

#5 Today 12:33:29

MProG10
Member
Registered: Yesterday
Posts: 4  

Re: init system is failing

This is an init script in an initramfs. Android is booted from an initramfs. I'm using the proprietary bootloader. The kernel does load, and does boot with Busybox init, but is failing with System V init. I don't have a serial setup. All I have is adbd.

I tried running /etc/init.d/rc manually. Nothing regarding devtmpfs is logged.

Offline

#6 Today 13:15:42

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,670  

Re: init system is failing

Ok, understood. Sounds good.

The very first thing to do in that init script is to mount /proc. Without that nothing else can be mounted. Possibly that is sufficient, but I think it should also mount /dev before any auto-mounting and mdev. Thus I suggest it starts as:

#!/bin/sh
mount -t proc proc /proc
mount -t devtmpfs devtmpfs /dev
mount -T /fstab -a
....

Just to note that all that mounting happens within the initrd (unpacked filesystem) and switch_root will unmount all before switching root.

Therefore you might need to also add a bind-mount onto /mnt/proc just before switch_root

It is the right thing to exec the openRC init binary, though of course the root filesystem needs to be duly populated. If you want to rely on the early /dev population by mdev, then that switch_root init script might further need to bind-mount /mnt/dev as well before switching.

Offline

#7 Today 13:43:39

MProG10
Member
Registered: Yesterday
Posts: 4  

Re: init system is failing

Thank you for the help. As you pointed out, the init system loads udev. udev was missing. After installing the package, the system is booting successfully.

This is odd. How come udev was missing? I installed from Debootstrap. Maybe a bug in Debootstrap?

Offline

#8 Today 14:05:47

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,670  

Re: init system is failing

It may depend on which deboostrap variant you used. eudev (which provides the udev impementaiton for Devuan) is tagged as "important" so would be in the default variant, but e.g. not in the minbase variant.

Offline

Board footer