I have a ECS that cannot be restarted to enter the system every time I upgrade

Many upgrades failed, so I had to :boot /boot/kernel.old/kernel
Stuck in the boot interface, I don't know why?
Upgrade version P4 > Upgrade version P8
 

Attachments

  • 123456.png
    123456.png
    49.3 KB · Views: 116
boot kernel.old and investingate the size and hash of /boot/kernel/kernel

Upgrade failed MD5 that cannot be started
root@freebsd:~ # md5 /boot/kernel/kernel
MD5 (/boot/kernel/kernel) = 18f43409f035127acd05985fda18d46c
Another successfully upgraded server kernel MD5
root@bsd:~ # md5 /boot/kernel/kernel
MD5 (/boot/kernel/kernel) = 18f43409f035127acd05985fda18d46c

Compared with another ECS that has been upgraded successfully, the MD5 value is the same. I don't know it's the problem of finding the inside.
 
the error most likely comes from here /usr/src/stand/common/misc.c
Code:
        if ((size_t)archsw.arch_readin(fd, dest, len) != len) {
#ifdef DEBUG
                printf("\nreadin failed\n");
#endif
                return (-1);
        }
which is invoked from /usr/src/stand/common/load_elf.c
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;
                        }
                }
which indicates a short read caused either by the underlying disk driver or bad elf header data (wrong length passed to read function)
it is hard to tell which one without some printfs added to the loader code
 
the error most likely comes from here /usr/src/stand/common/misc.c
Code:
        if ((size_t)archsw.arch_readin(fd, dest, len) != len) {
#ifdef DEBUG
                printf("\nreadin failed\n");
#endif
                return (-1);
        }
which is invoked from /usr/src/stand/common/load_elf.c
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;
                        }
                }
which indicates a short read caused either by the underlying disk driver or bad elf header data (wrong length passed to read function)
it is hard to tell which one without some printfs added to the loader code
Thank you for your reply!
/usr/src/ Under the directory is an empty folder
 
Back
Top