bad node type after using ubiupdatevol

Per Smitt per.smitt at sbie.se
Mon Oct 20 04:51:22 PDT 2014


Hi

I am having some issues with ubifs. I have a system with two rootfs and
when I upgrade I planned to simply update the rootfs volume currently not 
in use with the new filesystem.

When loading the system for the first time using U-Boot it always works to
write both rootfs volumes but once I try to upgrade I run into problems.

My upgrade process:
ubiupdatevol /dev/ubi0_$INDEX "$FS_IMG"
sync
mount -t ubifs ubi0:rootfs$INDEX "$MOUNT_POINT"
# Migrate config files like passwords, hostname, application specific config
sync
umount "$MOUNT_POINT"
sync
fw_setenv boot_index "$INDEX"    (Telling U-Boot environment which rootfs to use)
reboot

Yes I was littering with syncs in a desperate attempt to get it to work. I am also
checking for error codes after every command and I get return code 0 all the time.

When rebooting I get the following in the log:
UBIFS error (pid 418): ubifs_read_node: bad node type (255 but expected 1)                                
UBIFS error (pid 418): ubifs_read_node: bad node at LEB 68:27440                                                                      
UBIFS error (pid 418): do_readpage: cannot read page 1000 of inode 617, error -22                                                     
UBIFS error (pid 418): ubifs_read_node: bad node type (255 but expected 1)                                                            
UBIFS error (pid 418): ubifs_read_node: bad node at LEB 68:27440                                                                      
UBIFS error (pid 418): do_readpage: cannot read page 1000 of inode 617, error -22      

It seems random which files are affected as I can sometimes upgrade without
any error message. It might even be possible that the upgrade completed without
any error at all, I cannot say.

Do anyone see anything outright wrong here that I simply am not aware of?

Best regards,
Per Smitt​


More information about the linux-mtd mailing list