Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#4207 - sysupgrade is not aborted by an error but causes a cyclic reboot #9185

Open
openwrt-bot opened this issue Dec 25, 2021 · 1 comment
Labels
flyspray release/21.02

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Dec 25, 2021

legale:

Device: Beeline SmartBox flash (RAMIPS MT7621, 128mb NAND)
Version: OpenWrt 5.10.87
Commit: legale@99dd68b

Start system normally then try to upgrade firmware with sysupgrade.

Upgrade and next boot log:
root@OpenWrt:/tmp# sysupgrade -v openwrt-ramips-mt7621-beeline_smartbox-flash-squashfs-sysupgrade.bin
Fri Dec 24 20:32:54 UTC 2021 upgrade: Saving config files...
etc/config/dhcp
etc/config/dropbear
etc/config/firewall
etc/config/luci
etc/config/network
etc/config/rpcd
etc/config/system
etc/config/ubootenv
etc/config/ucitrack
etc/config/uhttpd
etc/config/wireless
etc/dropbear/dropbear_ed25519_host_key
etc/dropbear/dropbear_rsa_host_key
etc/fw_env.config
etc/group
etc/hosts
etc/inittab
etc/luci-uploads/.placeholder
etc/opkg/keys/456559476c33fb8f
etc/opkg/keys/b5043e70f9a75cde
etc/passwd
etc/profile
etc/rc.local
etc/shadow
etc/shells
etc/shinit
etc/sysctl.conf
etc/uhttpd.crt
etc/uhttpd.key
etc/uhttpd.key
etc/uhttpd.crt
Fri Dec 24 20:32:55 UTC 2021 upgrade: Commencing upgrade. Closing all shell sessions.
[ 166.384122] device wlan0 left promiscuous mode
[ 166.393301] br-lan: port 3(wlan0) entered disabled state
Watchdog handover: fd=3

  • watchdog -
    Watchdog does not have CARDRESET support
    [ 166.491730] device wlan1 left promiscuous mode
    [ 166.500880] br-lan: port 4(wlan1) entered disabled state
    Fri Dec 24 20:32:56 UTC 2021 upgrade: Sending TERM to remaining processes ...
    Fri Dec 24 20:32:56 UTC 2021 upgrade: Sending signal TERM to ntpd (2321)
    Fri Dec 24 20:32:56 UTC 2021 upgrade: Sending signal TERM to ntpd (2372)
    Fri Dec 24 20:33:00 UTC 2021 upgrade: Sending KILL to remaining processes ...
    [ 177.140419] sh (3318): drop_caches: 3
    Fri Dec 24 20:33:06 UTC 2021 upgrade: Switching to ramdisk...
    [ 180.241606] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" stops
    [ 180.269397] UBIFS (ubi0:1): un-mount UBI device 0
    Fri Dec 24 20:33:09 UTC 2021 upgrade: Performing system upgrade...
    Unlocking kernel ...

Writing from to kernel ... [ ][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w]
removing ubiblock0_0
[ 190.263812] block ubiblock0_0: released
Volume ID 0, size 32 LEBs (4063232 bytes, 3.8 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 77455360
Volume ID 1, size 610 LEBs (77455360 bytes, 73.8 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs_data", alignment 1
[ 192.395021] UBIFS (ubi0:1): default file-system created
[ 192.406795] UBIFS (ubi0:1): Mounting in unauthenticated mode
[ 192.418401] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 4026
[ 192.543243] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[ 192.558916] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 192.578665] UBIFS (ubi0:1): FS size: 76185600 bytes (72 MiB, 600 LEBs), journal size 3809280 bytes (3 MiB, 30 LEBs)
[ 192.599447] UBIFS (ubi0:1): reserved for root: 3598434 bytes (3514 KiB)
[ 192.612638] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID A34CF210-54A6-40D8-AD48-EC8928E6FB68, small LPT model
[ 192.660816] UBIFS (ubi0:1): un-mount UBI device 0
[ 192.670249] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" stops
sysupgrade successful
umount: can't unmount /dev: Resource busy
umoun[ 192.704192] reboot: Restarting system
t: can't unmount /tmp: Resource busy

================
NEXT BOOT

HHLX{+rprintk: console [ttyS0] enabled
[ 0.614144] printk: console [ttyS0] enabled
[ 0.630629] printk: bootconsole [early0] disabled
[ 0.630629] printk: bootconsole [early0] disabled
[ 0.651459] mt7621-nand 1e003000.nand: Using programmed access timing: 31c07388
[ 0.666330] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[ 0.678982] nand: Winbond W29N01HV
[ 0.685755] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 0.700826] mt7621-nand 1e003000.nand: ECC strength adjusted to 4 bits
[ 0.713863] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[ 0.728415] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[ 0.742962] Scanning device for bad blocks
[ 1.394912] 15 fixed-partitions partitions found on MTD device mt7621-nand
[ 1.408599] Creating 15 MTD partitions on "mt7621-nand":
[ 1.419180] 0x000000000000-0x000007f80000 : "all"
[ 1.429887] 0x000000000000-0x000000100000 : "bootloader"
[ 1.441504] 0x000000100000-0x000000200000 : "config"
[ 1.452314] 0x000000200000-0x000000300000 : "factory"
[ 1.463398] 0x000000300000-0x000002300000 : "kernel_stock"
[ 1.475511] 0x000000720000-0x000002300000 : "rootfs_stock"
[ 1.487464] 0x000002300000-0x000004300000 : "kernel"
[ 1.498443] 0x000002720000-0x000004300000 : "rootfs2"
[ 1.509518] 0x000004300000-0x000004500000 : "glbcfg"
[ 1.520383] 0x000004500000-0x000004600000 : "board_data"
[ 1.531888] 0x000004600000-0x000004800000 : "glbcfg2"
[ 1.542849] 0x000004800000-0x000004900000 : "board_data2"
[ 1.554540] 0x000004900000-0x000007f80000 : "data"
[ 1.565220] 0x000002720000-0x000004300000 : "ubipart0"
[ 1.576539] 0x000004600000-0x000007f80000 : "ubipart1"
[ 1.596752] Concatenating MTD devices:
[ 1.604282] (0): "ubipart0"
[ 1.609836] (1): "ubipart1"
[ 1.615405] into device "ubi-concat"
[ 1.622556] 1 fixed-partitions partitions found on MTD device ubi-concat
[ 1.635911] Creating 1 MTD partitions on "ubi-concat":
[ 1.646157] 0x000000000000-0x000005280000 : "ubi"
[ 1.659457] libphy: Fixed MDIO Bus: probed
[ 1.704050] libphy: mdio: probed
[ 1.710796] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[ 1.725444] mtk_soc_eth 1e100000.ethernet: generated random MAC address c6:47:a5:c0:79:e2
[ 1.742529] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[ 1.762221] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[ 1.775637] mt7621-pci 1e140000.pcie: No bus range found for /pcie@1e140000, using [bus 00-ff]
[ 1.793205] mt7621-pci 1e140000.pcie: MEM 0x0060000000..0x006fffffff -> 0x0000000000
[ 1.809503] mt7621-pci 1e140000.pcie: IO 0x001e160000..0x001e16ffff -> 0x0000000000
[ 1.825901] mt7621-pci 1e140000.pcie: Parsing DT failed
[ 1.838529] NET: Registered protocol family 10
[ 1.848854] Segment Routing with IPv6
[ 1.856296] NET: Registered protocol family 17
[ 1.865498] 8021q: 802.1Q VLAN Support v1.8
[ 1.877127] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[ 1.901570] libphy: dsa slave smi: probed
[ 1.911030] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[ 1.931035] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[ 1.951019] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[ 1.971739] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[ 1.988679] DSA: tree 0 setup
[ 1.994935] rt2880-pinmux pinctrl: pcie is already enabled
[ 2.005971] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[ 2.019339] mt7621-pci 1e140000.pcie: No bus range found for /pcie@1e140000, using [bus 00-ff]
[ 2.036878] mt7621-pci 1e140000.pcie: MEM 0x0060000000..0x006fffffff -> 0x0000000000
[ 2.053187] mt7621-pci 1e140000.pcie: IO 0x001e160000..0x001e16ffff -> 0x0000000000
[ 2.069569] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[ 2.084676] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[ 2.099669] mt7621-pci 1e140000.pcie: failed to parse bus ranges property: -22
[ 2.214265] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[ 2.225382] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[ 2.336639] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[ 2.350502] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[ 2.364377] mt7621-pci 1e140000.pcie: PCIE1 enabled
[ 2.374097] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[ 2.392794] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[ 2.405490] pci_bus 0000:00: root bus resource [io 0x1e160000-0x1e16ffff]
[ 2.419193] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[ 2.432890] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.443826] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff] (bus address [0x00000000-0x0fffffff])
[ 2.464146] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[ 2.476130] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[ 2.488623] pci 0000:00:00.0: reg 0x14: [mem 0x60200000-0x6020ffff]
[ 2.501171] pci 0000:00:00.0: supports D1
[ 2.509160] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 2.522258] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[ 2.534319] pci 0000:01:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[ 2.548367] pci 0000:01:00.0: reg 0x10: [mem size 0x00100000 64bit]
[ 2.561019] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[ 2.591952] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 2.602410] pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
[ 2.614562] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
[ 2.628085] pci 0000:00:00.0: bridge window [mem 0x60100000-0x601fffff pref]
[ 2.642476] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 2.655705] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 2.668882] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 2.682753] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[ 2.696282] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[ 2.710669] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[ 2.724208] pci 0000:00:00.0: BAR 7: assigned [io 0x1e160000-0x1e160fff]
[ 2.737743] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[ 2.752314] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 2.762206] pci 0000:00:00.0: bridge window [io 0x1e160000-0x1e160fff]
[ 2.775732] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
[ 2.789260] pci 0000:00:00.0: bridge window [mem 0x60100000-0x601fffff pref]
[ 2.805717] UBI error: no valid UBI magic found inside mtd15
[ 2.817722] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[ 2.831896] /dev/root: Can't open blockdev
[ 2.840115] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 2.855062] Please append a correct "root=" boot option; here are the available partitions:
[ 2.871702] 1f00 130560 mtdblock0
[ 2.871707] (driver?)
[ 2.884729] 1f01 1024 mtdblock1
[ 2.884734] (driver?)
[ 2.897736] 1f02 1024 mtdblock2
[ 2.897740] (driver?)
[ 2.910744] 1f03 1024 mtdblock3
[ 2.910749] (driver?)
[ 2.923764] 1f04 32768 mtdblock4
[ 2.923769] (driver?)
[ 2.936770] 1f05 28544 mtdblock5
[ 2.936775] (driver?)
[ 2.949777] 1f06 32768 mtdblock6
[ 2.949782] (driver?)
[ 2.962785] 1f07 28544 mtdblock7
[ 2.962789] (driver?)
[ 2.975804] 1f08 2048 mtdblock8
[ 2.975809] (driver?)
[ 2.988812] 1f09 1024 mtdblock9
[ 2.988817] (driver?)
[ 3.001819] 1f0a 2048 mtdblock10
[ 3.001824] (driver?)
[ 3.015012] 1f0b 1024 mtdblock11
[ 3.015017] (driver?)
[ 3.028194] 1f0c 55808 mtdblock12
[ 3.028199] (driver?)
[ 3.041373] 1f0d 28544 mtdblock13
[ 3.041378] (driver?)
[ 3.054567] 1f0e 58880 mtdblock14
[ 3.054572] (driver?)
[ 3.067745] 1f0f 84480 mtdblock15
[ 3.067750] (driver?)
[ 3.080926] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 3.097389] Rebooting in 1 seconds..

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 8, 2022

legale:

Problem is solved. It was partition layout problem. rootfs partition overlaps by kernel partition. So sysupgrade unable to write rootfs partition correctly.

Fixed with this commit:
87644ee

@aparcar aparcar added the release/21.02 label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/21.02
Projects
None yet
Development

No branches or pull requests

2 participants