boot kernel.old and investingate the size and hash of /boot/kernel/kernel
Using the old kernel can start the system normally, and updating to the new kernel fails.looks like a bios/efi disk read error
if ((size_t)archsw.arch_readin(fd, dest, len) != len) {
#ifdef DEBUG
printf("\nreadin failed\n");
#endif
return (-1);
}
if (phdr[i].p_filesz > fpcopy) {
if (kern_pread(VECTX_HANDLE(ef),
phdr[i].p_vaddr + off + fpcopy,
phdr[i].p_filesz - fpcopy,
phdr[i].p_offset + fpcopy) != 0) {
printf("\nelf" __XSTRING(__ELF_WORD_SIZE)
"_loadimage: read failed\n");
goto out;
}
}
Thank you for your reply!the error most likely comes from here /usr/src/stand/common/misc.c
which is invoked from /usr/src/stand/common/load_elf.cCode:if ((size_t)archsw.arch_readin(fd, dest, len) != len) { #ifdef DEBUG printf("\nreadin failed\n"); #endif return (-1); }
which indicates a short read caused either by the underlying disk driver or bad elf header data (wrong length passed to read function)Code:if (phdr[i].p_filesz > fpcopy) { if (kern_pread(VECTX_HANDLE(ef), phdr[i].p_vaddr + off + fpcopy, phdr[i].p_filesz - fpcopy, phdr[i].p_offset + fpcopy) != 0) { printf("\nelf" __XSTRING(__ELF_WORD_SIZE) "_loadimage: read failed\n"); goto out; } }
it is hard to tell which one without some printfs added to the loader code