Closed humanoid2050 closed 3 years ago
Unfortunately this
Initramfs unpacking failed: invalid magic at start of compressed archive
is not related to your problems. It means the kernel is expecting a built-in initramfs, but it's not, we load it separately. I have the same same message, it's harmless.
Afaict you are having at least 2 problems.
pca953x
, as you probably don't have them. Question is, what asl would you need instead to enable your hardware. But let's try to boot first.@htot Thanks for taking the time to reply.
From uboot, I can do ls mmc 0:8
and get a nice dump of the partition contents. Side note, uboot can't detect the presence of an SD card, but I suspect that can be filed along with the .asl issues.
If I boot into rescue, I do get a prompt and I can poke around. The partitions seem to be fine, as /dev/mmcblk*
lists all expected partitions. Additionally, /run/media/
contains automatically mounted entries for mmcblk0p5 mmcblk0p7 mmcblk0p8 mmcblk1
.
Contents of fstab:
/run/media/mmcblk0p8/etc # cat fstab
tmpfs /var/volatile tmpfs defaults 0 0
/dev/disk/by-partlabel/factory /factory auto noauto,x-systemd.automount,nosuid,nodev,noatime,discard 1 1
/dev/disk/by-partlabel/home /home auto nofail,x-systemd.automount,noatime,discard 1 1
Checking for those partitions (at least in the intramfs env):
/dev/disk/by-partlabel # ls
boot home rootfs u-boot-env1 u-boot1
factory panic u-boot-env0 u-boot0 update
I am using zeus.
I also see in the boot log
mount: can't find /boot in /etc/fstab
mount: mounting /boot on /realroot/boot failed: Invalid argument
mount: can't find /lib/modules in /etc/fstab
mount: mounting /lib/modules on /realroot/lib/modules failed: Invalid argument
But what I can't find is what/where the requests for mounting /boot/
and /lib/modules
are coming from. Is that relevant?
Did a little more digging. By using the ./flashall --btrfs
option instead of make flash
from the project root, it works fine now. Just a mismatch somewhere in the install process?
From uboot, I can do ls mmc 0:8 and get a nice dump of the partition contents. Side note, uboot can't detect the presence of an SD card, but I suspect that can be filed along with the .asl issues.
That's not normal. U-Boot can these days actually boot directly from the SD card.
I don't see why mounting home failed, still. This happens by the init script which is inside the initrd. After executing, loading needed modules and mounting it does a switchroot to systemd, same environment as do_rescue. You can find it here: https://github.com/edison-fw/meta-intel-edison/blob/zeus/meta-intel-edison-distro/recipes-core/initrdscripts/initramfs-framework/init
Installing the btrfs image, you get a slightly modified fstab. This is what I use so it is better tested. Still the ext image worked last time I tried.
Good that btrfs image is working though.
I have discovered that in the non-btrfs path of flashall.sh
, the rootfs is flashed but nothing is done for the home partition. As a result, mounting home fails due to lack of a proper filesystem. If I boot into recovery and run mkfs.ext4 /dev/mmcblk0p10
and then reboot, everything is fine. Perhaps I missed a step?
I had the intention not to break the home partition :-( But good that the recovery partition works.
I see your intent. Sometimes there are scripts that fire on first boot. If there is such a thing in this environment, could it be used to check for the existence of an ext4 fs on the home partition, and make one if it is missing? Otherwise at least a note in the online documentation might be helpful. Either way, I'm happy to close this issue.
I have seen reports with the original firmware that if home is damaged you couldn't boot.
There is a script that runs on first boot (post-install.sh). But I think it runs after systemd. Best thing would be to have systemd fsck the partition if it's broken or create one if missing. But I thought it already did that.
@htot The following warnings apply for me as well. Could we quiet them somehow?
I also see in the boot log
mount: can't find /boot in /etc/fstab mount: mounting /boot on /realroot/boot failed: Invalid argument mount: can't find /lib/modules in /etc/fstab mount: mounting /lib/modules on /realroot/lib/modules failed: Invalid argument
But what I can't find is what/where the requests for mounting
/boot/
and/lib/modules
are coming from. Is that relevant?
Hi @mwallnoefer it is done by this script (in the initrd) https://github.com/edison-fw/meta-intel-edison/blob/master/meta-intel-edison-distro/recipes-core/initrdscripts/initramfs-framework/init
Question: are you using Zeus or Dunfell? And are you booting ext4 or btrfs image?
Dunfell with ext4
Ok so it seems mount -n /boot || true
and mount -n --move /boot /realroot/boot || true
don't just silently fail as I hoped :-(
Other then that it's harmless.
I have an Edison on a stack of sparkfun carrier boards, including the base block, the SD card block, and the UART block. I have tried multiple things, but in all cases the board fails to boot to the root fs. I think the root of the issue may be related to the following line:
Initramfs unpacking failed: invalid magic at start of compressed archive
The full boot log is here:
The recovery boot log is here, with the same issue:
I have tried building directly on my host system running Ubuntu 20.04, as well as in dockerized environments based in Ubuntu18.04 and even 16.04. Results are always the same. I have tried changing the load address of the initramfs. Results are always the same. I have tried checking out different branches of this repo. Results are always the same, except for old ones like sumo which fail
make setup
due to a patch that won't apply and warrior that failsmake image
due toundefined reference to stime
.Can someone point me in the right direction?