Kernel modules not loading if /system is placed on other partition

98 views
Skip to first unread message

Toetje583(NL)

unread,
Jun 23, 2018, 12:48:40 PM6/23/18
to Android-x86
Hi All,

I'm trying to run android with it's own /system and also /data partition instead of loading de initramfs I use the ramdisk and added this to the fstab.android_x86_64 file:

/dev/block/sdb2               /system             ext4    errors=remount-ro                                       
/dev/block/sdb3               /data                 ext4    nosuid,nodev,noatime   defaults

none       /cache   tmpfs   nosuid,nodev,noatime defaults

In the ramdisk i created symlinks:

lib > /system/lib 
vendor > /system/vendor
etc > /system/etc

The system boots however none of the kernel modules are getting loaded, I suspect that the system partition gets mounted maybe just a bit to late or i'm missing something else.
I also noticed that in my kernel description there is a #2 at the end. If i place the system next to the kernel all is working fine this seems to be a #1 :)

Anyone is having some useful feedback to help me figuring this out or are there perhaps logs somewhere?

Best Regards,


Chih-Wei Huang

unread,
Jun 24, 2018, 11:06:00 AM6/24/18
to Android-x86
2018-06-24 0:48 GMT+08:00 Toetje583(NL) <osvan...@gmail.com>:
> Hi All,
>
> I'm trying to run android with it's own /system and also /data partition
> instead of loading de initramfs I use the ramdisk and added this to the
> fstab.android_x86_64 file:
>
> /dev/block/sdb2 /system ext4 errors=remount-ro
> /dev/block/sdb3 /data ext4
> nosuid,nodev,noatime defaults
>
> none /cache tmpfs nosuid,nodev,noatime defaults
>
> In the ramdisk i created symlinks:
>
> lib > /system/lib
> vendor > /system/vendor
> etc > /system/etc
>
> The system boots however none of the kernel modules are getting loaded, I
> suspect that the system partition gets mounted maybe just a bit to late or
> i'm missing something else.
> I also noticed that in my kernel description there is a #2 at the end. If i
> place the system next to the kernel all is working fine this seems to be a
> #1 :)

This seems to indicate you have two kernel images.
The one you boot mismatches with the modules in system.
You have to figure out what's going on.

> Anyone is having some useful feedback to help me figuring this out or are
> there perhaps logs somewhere?



--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Toetje583(NL)

unread,
Jun 29, 2018, 1:47:22 PM6/29/18
to Android-x86
Hi Chih-Wei,

To be honest that is what i suspected as-well, however I did everything once more but then with the stock AndroidX86 image same results.
It only happens if i add /system to fstab.android_x86_64

Here is a small overview what im trying to do:

I created a new grub entry:

https://pastebin.com/a3dVCQqN

I copy kernel to /boot and then I extracted ramdisk.img and changed the fstab:

https://pastebin.com/mwNCePBH


Repacked all and copy ramdisk to the boot partition, AndroidX86 loads fast but all kernel modules are not loading.
And so far browsing trough dmesg etc dident give me any clues, i must admit iḿ not to experienced to perhaps all of this is just above my grade atm but there is only one way to learn :)

Best Regards,

Michel

Op zondag 24 juni 2018 17:06:00 UTC+2 schreef Chih-Wei Huang:

Chih-Wei Huang

unread,
Jul 1, 2018, 12:30:03 AM7/1/18
to Android-x86
2018-06-30 1:47 GMT+08:00 Toetje583(NL) <osvan...@gmail.com>:
> Hi Chih-Wei,
>
> To be honest that is what i suspected as-well, however I did everything once
> more but then with the stock AndroidX86 image same results.
> It only happens if i add /system to fstab.android_x86_64
>
> Here is a small overview what im trying to do:
>
> I created a new grub entry:
>
> https://pastebin.com/a3dVCQqN
>
> I copy kernel to /boot and then I extracted ramdisk.img and changed the
> fstab:
>
> https://pastebin.com/mwNCePBH
>
>
> Repacked all and copy ramdisk to the boot partition, AndroidX86 loads fast
> but all kernel modules are not loading.
> And so far browsing trough dmesg etc dident give me any clues, i must admit
> iḿ not to experienced to perhaps all of this is just above my grade atm but
> there is only one way to learn :)

Are you sure /system is mounted correctly and
the symlink /lib -> /system/lib is created?
Note the symlink must be created before ueventd start.

Could the modules be loaded by modprobe or insmod?

Toetje583(NL)

unread,
Jul 1, 2018, 5:52:18 PM7/1/18
to Android-x86
I found a other way, OpenThos is mounting partitions by UUID I took a look into there init and created my own initrd.img based on how they where doing it, now I can have  /system /data /boot on itś own partitions!
Thanks for the help and effort!


Best Regards,

Op zondag 1 juli 2018 06:30:03 UTC+2 schreef Chih-Wei Huang:
Reply all
Reply to author
Forward
0 new messages