[HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found
-
@nvriezen said in [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found:
EDIT:
I managed to get the kernel log file, however I don't see anything regarding ubuntu touch/halium... (how do I upload it here though?)Just copy paste it between the Code Tags :
Your text here! :)
-
@nero355 said in [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found:
Just copy paste it between the Code Tags :
Your text here! :)
The log is way too long to post it here
The only way would be to upload the file itself I guess -
@nvriezen
As in the forum doesn't allow you to or you think it's too long ?!The Code Tags cut off after a certain amount of lines so it's OK to post a large amount of code I guess ??
Otherwise use something like pastebin.com for such things
-
@nero355 I guess it's not needed anymore.
I managed to get telnet to work again.
It seems I was setting it up incorrectly somehow, but this page in the Halium docs helped me.So now that I can connect to the phone again I can start looking into more what is going wrong.
The first thing I noticed was that I don't see any /data folder when I run thels
command.
I found in the Halium docs what the boot image is supposed to do, which is mounting the data partition. However when I runmount $DATA_PARTITION /data
it returns that it couldn't find /data in fstab.Currently I am looking into stuff that could have gone wrong while flashing according to some other replies you gave in other threads.
Especially this one here where someone also has the errorumount: .halium-install-rootfs.hUAJA: not mounted
The phone is flashing right now without any partitions being mounted in TWRP (cache and data were mounted all the previous times) to see if that makes any difference. -
@nvriezen
COOL!Can't wait for the results!
-
@nvriezen said in [HTC J Butterfly 3] Error building mkbootimg - tools/metalava/manual not found:
@nero355 I guess it's not needed anymore.
I managed to get telnet to work again.
It seems I was setting it up incorrectly somehow, but this page in the Halium docs helped me.So now that I can connect to the phone again I can start looking into more what is going wrong.
The first thing I noticed was that I don't see any /data folder when I run thels
command.
I found in the Halium docs what the boot image is supposed to do, which is mounting the data partition. However when I runmount $DATA_PARTITION /data
it returns that it couldn't find /data in fstab.Currently I am looking into stuff that could have gone wrong while flashing according to some other replies you gave in other threads.
Especially this one here where someone also has the errorumount: .halium-install-rootfs.hUAJA: not mounted
The phone is flashing right now without any partitions being mounted in TWRP (cache and data were mounted all the previous times) to see if that makes any difference.Well that didn't work...
It somehow rebooted TWRP halfway during flashing the rootfs to /data.
So the flashing failed, twice.
Now I'm reflashing the normal way as I also have seen more people with the umount error.
Someone mentioned it had something to do with the phone not booting instead of the actual installer script.
I don't know how though since the phone is not actually rebooting or anything when cleanup starts.
Maybe if I look more closely todmesg -w
output that I can find a clue on what's happening -
So this is the dmesg output filtered on
initrd
:[ 3.050478] c1 1 initrd: checking filesystem integrity for the userdata partition [ 3.093157] c1 1 initrd: checking filesystem for userdata took (including e2fsck) 0 seconds [ 3.103620] c0 1 initrd: mounting /dev/mmcblk0p69 [ 3.126205] c1 1 initrd: Halium rootfs is /tmpmnt/rootfs.img [ 3.126831] c0 1 initrd: mounting system rootfs at /halium-system [ 3.141646] c0 1 initrd: mounting /tmpmnt/rootfs.img (user mode) [ 3.146123] c0 1 initrd: mounting android system image (/tmpmnt/android-rootfs.img) ro, in /android-rootfs (rootfs mode) [ 3.146215] c0 1 initrd: mounting android system image from userdata partition [ 3.172121] c1 1 initrd: Android system image API level is 28 [ 3.172202] c1 1 initrd: boot mode: halium [ 3.173274] c1 1 initrd: Normal boot [ 3.205264] c0 1 initrd: device is halium_arm64 [ 3.212544] c1 1 initrd: Adding bind-mounts to /root/etc/fstab [ 4.101235] c0 1 initrd: checking fstab /root/var/lib/lxc/android/rootfs/fstab* for additional mount points [ 4.107906] c1 1 initrd: moving Android system to /android/system [ 4.659792] c0 776 ########################## usb_info: Halium initrd Debug telnet on port 23 on rndis0 192.168.2.15 - also running udhcpd
The whole dmesg output can be found here: https://0paste.com/343730
The most interesting line is probably the one saying something about not being able to find init. -
After looking at a lot of github issues and other posts I think the problem lies in the
After mounting rootfs.img it will start the systemd init from the rootfs
step of the boot sequence (from the Halium docs).
Unfortunately this is out of my league so I can't do much anymore.
Hopefully someone with experience in the boot process of Linux/Ubuntu Touch can help out here.The log lines that pointed me to this are:
[ 4.101235] c0 1 initrd: checking fstab /root/var/lib/lxc/android/rootfs/fstab* for additional mount points [ 4.103681] c0 755 cat: can't open '/root/var/lib/lxc/android/rootfs/fstab*': No such file or directory [ 4.106813] c0 759 mkdir: can't create directory '/root/android/cache': File exists [ 4.107906] c1 1 initrd: moving Android system to /android/system [ 4.114412] c1 1 Begin: Running /scripts/local-bottom ... done. [ 4.114583] c1 1 done. [ 4.118526] c1 1 Begin: Running /scripts/nfs-bottom ... done. [ 4.118872] c1 1 Begin: Running /scripts/init-bottom ... done. [ 4.128084] c0 769 run-init: opening console: No such device [ 4.128224] c0 1 Target filesystem doesn't have requested /sbin/init. [ 4.128896] c1 770 run-init: opening console: No such device [ 4.129720] c0 771 run-init: opening console: No such device [ 4.130458] c1 772 run-init: opening console: No such device [ 4.131154] c0 773 run-init: opening console: No such device [ 4.131946] c1 774 run-init: opening console: No such device [ 4.133078] c0 1 No init found. Try passing init= bootarg.
Though stupid thing is that
sbin/init
does exist as I can see it through the telnet connection... -
Made some great progress tonight after I got some help through the Telegram group!
Turns out the error;[ 4.128084] c0 769 run-init: opening console: No such device [ 4.128224] c0 1 Target filesystem doesn't have requested /sbin/init. [ 4.128896] c1 770 run-init: opening console: No such device [ 4.129720] c0 771 run-init: opening console: No such device [ 4.130458] c1 772 run-init: opening console: No such device [ 4.131154] c0 773 run-init: opening console: No such device [ 4.131946] c1 774 run-init: opening console: No such device [ 4.133078] c0 1 No init found. Try passing init= bootarg.
Had something to do with console=tty0 missing from the kernel cmdline.
Basically I had to follow these step for Halium 7.1 even though I am using Halium 9.0.After that I also needed to use this fix because my phone uses arm64.
But after that I was able to boot Ubuntu 16.04 correctly on my phone!!Unfortunately trying to get Lomiri to work (the GUI) didn't go so well.
But that is for another day.
I'm already happy that the phone now runs Ubuntu! -
@nvriezen thanks for sharing! do you think it would help to add error messages or other details to the docs?
-
@doniks Well, just make sure that the thing about
console=tty0
is not only mentioned on the Halium 7.1 page but also on the Halium 9.0 page in the docs.
And that the docs points to the above mentioned fix for people with an arm64 architecture phone. That could just be in the errors section I think.Another thing I ran into was e2fsdroid giving me errors. I didn't realize this at first.
So for people that see something likeenv: 'e2fsdroid' No such file or directory
Just runmka e2fsdroid
in the build directory because you probably miss it on your machine somehow.
That made it finally possible for me to build a system image as well. -
Now I'm stuck at a new point. Which is that android lxc won't start.
The device gives me the following error when trying to start it manually:root@ubuntu-phablet:~# lxc-start -n android -F lxc-start: conf.c: mount_entry: 1858 No such file or directory - Failed to mount "tmpfs" on "/usr/lib/aarch64-linux-gnu/lxc/dev" lxc-start: conf.c: lxc_setup: 3335 failed to setup the mount entries for 'android' lxc-start: start.c: do_start: 1248 Failed to setup container "android". lxc-start: sync.c: __sync_wait: 59 An error occurred in another process (expected sequence number 5) lxc-start: start.c: __lxc_start: 1802 Failed to spawn container "android". The container failed to start. Additional information can be obtained by setting the --logfile and --logpriority options.
In the dmesg log I already saw that the camera and audio will not work.
But that is really something for later.
First I want to get the GUI running or just the system in general.
I also can't reboot the device through the shell anymore.
Making your own system image definitely is the harder way to port UT.