Hi, i am a newer on ubuntu core OS.Now, i am porting the ubuntu core to imx6ull chip.I follow the post to build gaget and kernel from @ogra.Also, i build the image and burn into my sdcard.
And it boot and run into initramfs.After execute some script files, it has stuck on run-init command from serial port output.The error message is below:
Loading, please wait...
starting version 229
random: systemd-udevd urandom read with 79 bits of entropy available
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/nfs-top ... done.
Begin: Running /scripts/nfs-premount ... done.
Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... ext4
done.
initrd: checking filesystem for writable partition
EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (2c0)
EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (2c4)
EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: errors=remount-ro
ext4
squashfs: version 4.0 (2009/01/31) Phillip Lougher
EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (2c0)
EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (2c0)
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
initrd: mounting /run
mkdir: can't create directory '/root/writable/system-data//etc/default/keyboard': File exists
mkdir: can't create directory '/root/writable/system-data//etc/hosts': File exists
mkdir: can't create directory '/root/writable/system-data//etc/systemd/timesyncd.conf': File exists
mkdir: can't create directory '/root/writable/system-data//etc/default/swapfile': File exists
mkdir: can't create directory '/root/writable/system-data//etc/environment': File exists
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/nfs-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
request_module: runaway loop modprobe binfmt-464c
run-init: /lib/systemd/systemd: Exec format error
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
I extract the initrd.img file and found the last part is the source of init file.
348 exec run-init ${drop_caps} ${rootmnt} ${init} "$@" ${recovery:+--startup-event=recovery} <${rootmnt}/dev/ttymxc0 >${rootmnt}/dev/ttymxc0
349 echo "Something went badly wrong in the initramfs."
350 panic "Please file a bug on initramfs-tools."
I add some print lines to debug it, and i found the /lib/systemd/systemd file wasn’t exist.I try to manual execute those commands in initramfs.I found before the /lib/systemd/systemd/ wasn’t exist.
(initramfs) mount
rootfs on / type rootfs (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=250852k,nr_inodes=62713,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=50672k,mode=755)
/dev/mmcblk0p2 on /root/writable type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/writable type ext4 (rw,relatime,data=ordered)
/dev/loop0 on /root type squashfs (ro,relatime)
/dev/loop1 on /root/lib/modules type squashfs (ro,relatime)
/dev/loop1 on /root/lib/firmware type squashfs (ro,relatime)
tmpfs on /root/run type tmpfs (rw,nosuid,noexec,relatime,mode=755)
tmpfs on /root/etc/fstab type tmpfs (rw,nosuid,noexec,relatime,mode=755)
/dev/mmcblk0p2 on /root/etc/cloud type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/sysctl.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/default/keyboard type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/apparmor.d/cache type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/ssh type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/init type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/writable type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/systemd/system type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/sudoers.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/hosts type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/network/interfaces.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/network/if-up.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/udev/rules.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/dbus-1/system.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/modprobe.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/ppp type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/modules-load.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/systemd/network type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/netplan type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/systemd/system.conf.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/systemd/user.conf.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/systemd/logind.conf.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/iproute2 type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rc0.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rc1.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rc2.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rc3.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rc4.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rc5.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rc6.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rcS.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/init.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/rsyslog.d type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/systemd/timesyncd.conf type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/default/swapfile type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/environment type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/systemd/system type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p2 on /root/etc/machine-id type ext4 (rw,relatime,data=ordered)
(initramfs) ls
dev scripts conf tmpmnt_writable
root bin var tmpmnt_kernel
etc run sys tmpmnt_system-boot
lib sbin proc
usr init tmp
(initramfs) ls /lib/systemd/
network systemd-udevd
(initramfs) ls /root/lib/systemd/system
system-generators/ systemd-logind
system-preset/ systemd-modules-load
system-shutdown/ systemd-networkd
system-sleep/ systemd-networkd-wait-online
system/ systemd-quotacheck
systemd systemd-random-seed
systemd-ac-power systemd-remount-fs
systemd-activate systemd-reply-password
systemd-backlight systemd-resolved
systemd-binfmt systemd-rfkill
systemd-bootchart systemd-shutdown
systemd-bus-proxyd systemd-sleep
systemd-cgroups-agent systemd-socket-proxyd
systemd-cryptsetup systemd-sysctl
systemd-fsck systemd-sysv-install
systemd-fsckd systemd-timedated
systemd-hibernate-resume systemd-timesyncd
systemd-hostnamed systemd-udevd
systemd-initctl systemd-update-utmp
systemd-journald systemd-user-sessions
systemd-localed
(initramfs) ls /root/lib/systemd/systemd
/root/lib/systemd/systemd
Below info is manual execute run-init command
(initramfs) exec run-init ${drop_caps} ${rootmnt} ${init} "$@" ${recovery:+--sta
rtup-event=recovery} <${rootmnt}/dev/console >${rootmnt}/dev/console
run-init: /lib/systemd/systemd: Exec format error
/init: line 3: wait-for-root: not found
/init: line 3: tail: not found
/init: line 3: chvt: not found
cannot find 'writable' partition
/init: line 3: modprobe: not found
/init: line 3: modprobe: not found
/init: line 3: modprobe: not found
/init: line 3: modprobe: not found
/init: line 3: modprobe: not found
/init: line 3: modprobe: not found
/init: line 3: modprobe: not found
/init: line 3: modprobe: not foundinitrd: checking filesystem for writable partition
When i dig here, i am confuse about the /lib/systemd/systemd file.Could everyone support some hints for me to dig more deep? Thanks.