qnap_mtd_resize_for_bullseye icon indicating copy to clipboard operation
qnap_mtd_resize_for_bullseye copied to clipboard

Installation after recovery

Open BZmatthias opened this issue 2 years ago • 22 comments

I run your script at a TS-419 P+ and it worked like a charm. Unfortunatly I had to replace the system harddisk. So I had to reinstall Debian. I did this with the recover proces discribet at https://www.cyrius.com/debian/kirkwood/qnap/ts-41x/deinstall/. Installation of Debian 10 works fine but update to Debian 11 was not posible:

flash-kernel: installing version 5.10.0-11-marvell Not enough space for kernel in MTD 'Kernel' (need 2451032 but is actually 2097152). run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1

I try to run your script again but also this leeds to a failur:

./qnap_mtd_resize.py --dry-run

[Check of the QNAP model and see if supported] kirkwood-qnap: machine: QNAP TS419 family DTB file: kirkwood-ts419-6282.dtb Checking: flashcp -V Checking: flash_erase --version Using 'libubootenv-tool' package

[find on which MTD device partitions are currently mounted] spi0.0

[Dump current U-boot config'] Current U-boot bootcmd: uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000 Current U-boot bootargs: console=ttyS0,115200 root=/dev/ram initrd=0xb00000,0xc00000 ramdisk=34816 cmdlinepart.mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot Config),256k@0xc0000(NAS Config)" mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot Config),256k@0xc0000(NAS Config)"

[Prepare new 'bootcmd'] "'cp.l 0xf8200000 0x800000 0x0*80000' not found in 'uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000'" Don't know how to patch 'bootcmd' for this model. Please report this log.

Do you have any hints how to solve this?

Kind regards

BZmatthias avatar Mar 02 '22 00:03 BZmatthias

[Not sure you received the answer I sent with an email... github didn't seem to relay it]

Hello.

can you run the following commands and send the result:

uname -a
cat /proc/mtd
lsmod
dmesg

Arnaud

amouiche avatar Mar 04 '22 08:03 amouiche

Hello Arnaud, Your email arrived me, so it looks that github relay these things.

Here are the results of the four commands:

uname -a
Linux debian 4.19.0-18-marvell #1 Debian 4.19.208-1 (2021-09-29) armv5tel GNU/Linux
cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00040000 "U-Boot"
mtd1: 00200000 00040000 "Kernel"
mtd2: 00900000 00040000 "RootFS1"
mtd3: 00300000 00040000 "RootFS2"
mtd4: 00040000 00040000 "U-Boot Config"
mtd5: 00140000 00040000 "NAS Config"
lsmod
af_packet              40960  2
ofpart                 16384  0
ehci_orion             16384  0
ehci_hcd               61440  1 ehci_orion
cmdlinepart            16384  0
m25p80                 16384  0
spi_nor                32768  1 m25p80
mtd                    49152  9 m25p80,ofpart,cmdlinepart
marvell                20480  2
sata_mv                32768  0
marvell_cesa           36864  0
usbcore               172032  2 ehci_orion,ehci_hcd
mv643xx_eth            36864  0
usb_common             16384  1 usbcore
mvmdio                 16384  0
nls_base               16384  1 usbcore
orion_wdt              16384  0
des_generic            24576  1 marvell_cesa
rtc_s35390a            16384  0
spi_orion              16384  0
sg                     32768  0
kirkwood_thermal       16384  0
thermal_sys            65536  1 kirkwood_thermal
hwmon                  16384  1 thermal_sys
evdev                  24576  2
gpio_keys              20480  0
fuse                   90112  1
configfs               36864  1
ip_tables              20480  0
x_tables               24576  1 ip_tables
sha256_generic         20480  1
hmac                   16384  2
ipv6                  409600  12
autofs4                36864  2
ext4                  532480  2
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                   90112  1 ext4
crc32c_generic         16384  3
fscrypto               24576  1 ext4
ecb                    16384  0
sd_mod                 45056  4
ahci                   24576  3
libahci                28672  1 ahci
libata                180224  3 ahci,libahci,sata_mv
scsi_mod              180224  3 sd_mod,libata,sg
dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-18-marvell ([email protected]) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 Debian 4.19.208-1 (2021-09-29)
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: QNAP TS419 family
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 1024 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 131072 pages, LIFO batch:31
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4a8 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: root=/dev/ram initrd=0xb00000,0xc00000 ramdisk=34816 cmdlinepart.mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot Config),256k@0xc0000(NAS Config)" mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot Config),256k@0xc0000(NAS Config)"
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 501340K/524288K available (3987K kernel code, 342K rwdata, 1040K rodata, 316K init, 220K bss, 22948K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
                   lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0x(ptrval) - 0x(ptrval)   (3989 kB)
                     .init : 0x(ptrval) - 0x(ptrval)   ( 316 kB)
                     .data : 0x(ptrval) - 0x(ptrval)   ( 343 kB)
                      .bss : 0x(ptrval) - 0x(ptrval)   ( 221 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 18981 entries in 38 pages
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000005] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000030] Switching to timer-based delay loop, resolution 5ns
[    0.000099] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
[    0.000117] pid_max: default: 32768 minimum: 301
[    0.000315] Security Framework initialized
[    0.000329] Yama: disabled by default; enable with sysctl kernel.yama.*
[    0.000419] AppArmor: AppArmor initialized
[    0.000515] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000532] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001266] CPU: Testing write buffer coherency: ok
[    0.002012] Setting up static identity map for 0x8200 - 0x823c
[    0.002190] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x0
[    0.003529] devtmpfs: initialized
[    0.006434] VFP support v0.3: not present
[    0.006550] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.006569] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.006789] pinctrl core: initialized pinctrl subsystem
[    0.007625] NET: Registered protocol family 16
[    0.007926] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.008435] audit: initializing netlink subsys (disabled)
[    0.009028] cpuidle: using governor ladder
[    0.009041] cpuidle: using governor menu
[    0.009309] Feroceon L2: Enabling L2
[    0.009340] Feroceon L2: Cache support initialised.
[    0.009515] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.009589] [Firmware Info]: /ocp@f1000000/ethernet-controller@76000/ethernet1-port@0: local-mac-address is not set
[    0.012067] audit: type=2000 audit(0.008:1): state=initialized audit_enabled=0 res=1
[    0.012656] No ATAGs?
[    0.015872] clocksource: Switched to clocksource orion_clocksource
[    0.033278] VFS: Disk quotas dquot_6.6.0
[    0.033341] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.033714] AppArmor: AppArmor Filesystem Enabled
[    0.034532] NET: Registered protocol family 2
[    0.034653] IP idents hash table entries: 8192 (order: 4, 65536 bytes)
[    0.035350] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.035375] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.035427] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.035477] TCP: Hash tables configured (established 4096 bind 4096)
[    0.035544] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.035565] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.035714] NET: Registered protocol family 1
[    0.035746] PCI: CLS 0 bytes, default 32
[    0.035947] Unpacking initramfs...
[    0.514013] Freeing initrd memory: 12288K
[    0.514686] Initialise system trusted keyrings
[    0.514725] Key type blacklist registered
[    0.514865] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.518398] zbud: loaded
[    0.519725] Key type asymmetric registered
[    0.519734] Asymmetric key parser 'x509' registered
[    0.519772] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.519917] io scheduler noop registered
[    0.520104] io scheduler cfq registered (default)
[    0.521197] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.522447] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.522462] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.522472] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.522482] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    0.522549] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    0.522743] pci 0000:00:02.0: [11ab:6282] type 01 class 0x060400
[    0.523552] PCI: bus0: Fast back to back transfers disabled
[    0.523565] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.523576] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.523690] pci 0000:01:00.0: [1b4b:9125] type 00 class 0x010601
[    0.523719] pci 0000:01:00.0: reg 0x10: [io  0xf0000000-0xf0000007]
[    0.523733] pci 0000:01:00.0: reg 0x14: [io  0xf0000008-0xf000000b]
[    0.523746] pci 0000:01:00.0: reg 0x18: [io  0xf0000010-0xf0000017]
[    0.523758] pci 0000:01:00.0: reg 0x1c: [io  0xf0000018-0xf000001b]
[    0.523771] pci 0000:01:00.0: reg 0x20: [io  0xf0000020-0xf000002f]
[    0.523783] pci 0000:01:00.0: reg 0x24: [mem 0x90000000-0x900007ff]
[    0.523796] pci 0000:01:00.0: reg 0x30: [mem 0xd0000000-0xd000ffff pref]
[    0.523852] pci 0000:01:00.0: PME# supported from D3hot
[    0.523907] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    0.524725] PCI: bus1: Fast back to back transfers disabled
[    0.524738] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.524828] pci 0000:02:00.0: [1b4b:9125] type 00 class 0x010601
[    0.524857] pci 0000:02:00.0: reg 0x10: [io  0xf2000000-0xf2000007]
[    0.524871] pci 0000:02:00.0: reg 0x14: [io  0xf2000008-0xf200000b]
[    0.524883] pci 0000:02:00.0: reg 0x18: [io  0xf2000010-0xf2000017]
[    0.524896] pci 0000:02:00.0: reg 0x1c: [io  0xf2000018-0xf200001b]
[    0.524908] pci 0000:02:00.0: reg 0x20: [io  0xf2000020-0xf200002f]
[    0.524921] pci 0000:02:00.0: reg 0x24: [mem 0x98000000-0x980007ff]
[    0.524933] pci 0000:02:00.0: reg 0x30: [mem 0xd0000000-0xd000ffff pref]
[    0.524989] pci 0000:02:00.0: PME# supported from D3hot
[    0.525013] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:02.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    0.525826] PCI: bus2: Fast back to back transfers disabled
[    0.525839] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    0.525979] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.525991] pci 0000:00:02.0: BAR 8: assigned [mem 0xe0100000-0xe01fffff]
[    0.526000] pci 0000:00:01.0: BAR 7: assigned [io  0x10000-0x10fff]
[    0.526009] pci 0000:00:02.0: BAR 7: assigned [io  0x20000-0x20fff]
[    0.526023] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    0.526034] pci 0000:01:00.0: BAR 5: assigned [mem 0xe0010000-0xe00107ff]
[    0.526046] pci 0000:01:00.0: BAR 4: assigned [io  0x10000-0x1000f]
[    0.526058] pci 0000:01:00.0: BAR 0: assigned [io  0x10010-0x10017]
[    0.526070] pci 0000:01:00.0: BAR 2: assigned [io  0x10018-0x1001f]
[    0.526081] pci 0000:01:00.0: BAR 1: assigned [io  0x10020-0x10023]
[    0.526093] pci 0000:01:00.0: BAR 3: assigned [io  0x10024-0x10027]
[    0.526105] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.526113] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    0.526124] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.526139] pci 0000:02:00.0: BAR 6: assigned [mem 0xe0100000-0xe010ffff pref]
[    0.526149] pci 0000:02:00.0: BAR 5: assigned [mem 0xe0110000-0xe01107ff]
[    0.526161] pci 0000:02:00.0: BAR 4: assigned [io  0x20000-0x2000f]
[    0.526173] pci 0000:02:00.0: BAR 0: assigned [io  0x20010-0x20017]
[    0.526185] pci 0000:02:00.0: BAR 2: assigned [io  0x20018-0x2001f]
[    0.526196] pci 0000:02:00.0: BAR 1: assigned [io  0x20020-0x20023]
[    0.526208] pci 0000:02:00.0: BAR 3: assigned [io  0x20024-0x20027]
[    0.526219] pci 0000:00:02.0: PCI bridge to [bus 02]
[    0.526227] pci 0000:00:02.0:   bridge window [io  0x20000-0x20fff]
[    0.526237] pci 0000:00:02.0:   bridge window [mem 0xe0100000-0xe01fffff]
[    0.526294] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    0.526359] pcieport 0000:00:02.0: enabling device (0140 -> 0143)
[    0.526717] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.556526] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.556659] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.584523] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.584791] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.585500] console [ttyS0] disabled
[    0.585545] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 27, base_baud = 12500000) is a 16550A
[   10.208271] console [ttyS0] enabled
[   10.250461] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 28, base_baud = 12500000) is a 16550A
[   10.357843] random: fast init done
[   10.399073] libphy: Fixed MDIO Bus: probed
[   10.448156] i2c /dev entries driver
[   10.490904] ledtrig-cpu: registered to indicate activity on CPUs
[   10.563533] registered taskstats version 1
[   10.612523] Loading compiled-in X.509 certificates
[   10.689770] Loaded X.509 cert 'Debian Secure Boot CA: 6ccece7e4c6c0d1f6149f3dd27dfcc5cbb419ea1'
[   10.812561] Loaded X.509 cert 'Debian Secure Boot Signer 2021 - linux: 4b6ef5abca669825178e052c84667ccbc0531f8c'
[   10.934545] AppArmor: AppArmor sha1 policy hashing enabled
[   11.001198] hctosys: unable to open rtc device (rtc0)
[   11.063864] Freeing unused kernel memory: 316K
[   11.117064] This architecture does not have kernel memory protection.
[   11.194246] Run /init as init process
[   11.575159] SCSI subsystem initialized
[   11.714082] libata version 3.00 loaded.
[   11.718537] ahci 0000:01:00.0: version 3.0
[   11.718688] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[   11.815696] ahci 0000:01:00.0: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[   11.914417] ahci 0000:01:00.0: port 0 can do FBS, forcing FBSCP
[   11.985720] ahci 0000:01:00.0: port 1 can do FBS, forcing FBSCP
[   12.058993] scsi host0: ahci
[   12.095468] scsi host1: ahci
[   12.130719] ata1: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010100 irq 38
[   12.219299] ata2: SATA max UDMA/133 abar m2048@0xe0010000 port 0xe0010180 irq 38
[   12.308759] ahci 0000:02:00.0: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[   12.405762] ahci 0000:02:00.0: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[   12.502794] ahci 0000:02:00.0: port 0 can do FBS, forcing FBSCP
[   12.574131] ahci 0000:02:00.0: port 1 can do FBS, forcing FBSCP
[   12.647614] scsi host2: ahci
[   12.683080] scsi host3: ahci
[   12.718436] ata3: SATA max UDMA/133 abar m2048@0xe0110000 port 0xe0110100 irq 39
[   12.807083] ata4: SATA max UDMA/133 abar m2048@0xe0110000 port 0xe0110180 irq 39
[   12.996964] ata2: SATA link down (SStatus 0 SControl 330)
[   13.061678] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 330)
[   13.136286] ata1.00: ATA-9: WDC WD40EFRX-68WT0N0, 82.00A82, max UDMA/133
[   13.216524] ata1.00: 7814037168 sectors, multi 0: LBA48 NCQ (depth 32), AA
[   13.298945] ata4: SATA link down (SStatus 0 SControl 330)
[   13.363638] ata3: SATA link down (SStatus 0 SControl 330)
[   13.428879] ata1.00: configured for UDMA/133
[   13.480189] scsi 0:0:0:0: Direct-Access     ATA      WDC WD40EFRX-68W 0A82 PQ: 0 ANSI: 5
[   13.613338] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[   13.706087] sd 0:0:0:0: [sda] 4096-byte physical blocks
[   13.770968] sd 0:0:0:0: [sda] Write Protect is off
[   13.828369] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[   13.828437] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   13.987203]  sda: sda1 sda2 sda3
[   14.028421] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   16.023613] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[   17.014278] systemd[1]: System time before build time, advancing clock.
[   17.228011] random: crng init done
[   17.387720] systemd[1]: Inserted module 'autofs4'
[   17.494096] NET: Registered protocol family 10
[   17.701532] Segment Routing with IPv6
[   17.778070] cgroup: cgroup2: unknown option "memory_recursiveprot"
[   17.928347] systemd[1]: systemd 247.3-6 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
[   18.195584] systemd[1]: Detected architecture arm.
[   18.367431] systemd[1]: Set hostname to <debian>.
[   20.251127] systemd[1]: Queued start job for default target Graphical Interface.
[   20.341940] systemd[1]: system-getty.slice: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[   20.489945] systemd[1]: (This warning is only shown for the first unit using IP firewalling.)
[   20.594200] systemd[1]: Created slice system-getty.slice.
[   20.736974] systemd[1]: Created slice system-modprobe.slice.
[   20.880945] systemd[1]: Created slice system-serial\x2dgetty.slice.
[   21.044921] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[   21.208734] systemd[1]: Created slice User and Session Slice.
[   21.356383] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[   21.556317] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   21.753150] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[   21.972476] systemd[1]: Reached target Local Encrypted Volumes.
[   22.132408] systemd[1]: Reached target Paths.
[   22.244178] systemd[1]: Reached target Remote File Systems.
[   22.388112] systemd[1]: Reached target Slices.
[   22.513102] systemd[1]: Listening on Syslog Socket.
[   22.644696] systemd[1]: Listening on fsck to fsckd communication Socket.
[   22.820407] systemd[1]: Listening on initctl Compatibility Named Pipe.
[   22.989095] systemd[1]: Listening on Journal Audit Socket.
[   23.132724] systemd[1]: Listening on Journal Socket (/dev/log).
[   23.292776] systemd[1]: Listening on Journal Socket.
[   23.447427] systemd[1]: Listening on udev Control Socket.
[   23.588732] systemd[1]: Listening on udev Kernel Socket.
[   23.729022] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[   23.830395] systemd[1]: Mounting POSIX Message Queue File System...
[   23.991654] systemd[1]: Mounting Kernel Debug File System...
[   24.143428] systemd[1]: Mounting Kernel Trace File System...
[   24.292602] systemd[1]: Starting Create list of static device nodes for the current kernel...
[   24.499798] systemd[1]: Starting Load Kernel Module configfs...
[   24.647849] systemd[1]: Starting Load Kernel Module drm...
[   24.791752] systemd[1]: Starting Load Kernel Module fuse...
[   24.891949] fuse init (API version 7.27)
[   24.981424] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[   25.090233] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[   25.202441] systemd[1]: Starting Journal Service...
[   25.343150] systemd[1]: Starting Load Kernel Modules...
[   25.575510] systemd[1]: Starting Remount Root and Kernel File Systems...
[   25.678431] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   25.951955] EXT4-fs (sda3): re-mounted. Opts: errors=remount-ro
[   26.067563] systemd[1]: Starting Coldplug All udev Devices...
[   26.251432] systemd[1]: Started Journal Service.
[   27.417087] systemd-journald[150]: Received client request to flush runtime journal.
[   27.565821] systemd-journald[150]: File /var/log/journal/92b807cfc07243678067a4b67878f30f/system.journal corrupted or uncleanly shut down, renaming and replacing.
[   29.801568] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   29.960559] rtc-s35390a 0-0030: rtc core: registered rtc-s35390a as rtc0
[   30.042695] orion_wdt: Initial timeout 21 sec
[   30.100043] libphy: orion_mdio_bus: probed
[   30.169913] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   30.285190] usbcore: registered new interface driver usbfs
[   30.355201] sata_mv f1080000.sata: version 1.28
[   30.355420] sata_mv f1080000.sata: slots 32 ports 2
[   30.423992] marvell-cesa f1030000.crypto: CESA device successfully registered
[   30.648077] scsi host4: sata_mv
[   30.699009] usbcore: registered new interface driver hub
[   30.800507] mv643xx_eth_port mv643xx_eth_port.0: DMA mask not set
[   30.883922] rtc-mv f1010300.rtc: internal RTC not ticking
[   31.030809] scsi host5: sata_mv
[   31.234453] m25p80 spi0.0: m25p128 (16384 Kbytes)
[   31.345914] usbcore: registered new device driver usb
[   31.468140] ata5: SATA max UDMA/133 irq 35
[   31.517299] ata6: SATA max UDMA/133 irq 35
[   31.688895] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:08:9b:c5:b9:6d
[   31.896845] ata5: SATA link down (SStatus 0 SControl F300)
[   32.000304] cmdlinepart: unknown parameter 'Config),256k@0xc0000(NAS' ignored
[   32.085939] cmdlinepart: unknown parameter 'Config)" ' ignored
[   32.209357] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   32.288022] ata6: SATA link down (SStatus 0 SControl F300)
[   32.440447] mv643xx_eth_port mv643xx_eth_port.1: DMA mask not set
[   32.605594] mtd: no closing ) found in partition name
[   32.674557] ehci-orion: EHCI orion driver
[   32.747036] orion-ehci f1050000.ehci: EHCI Host Controller
[   32.821539] mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 00:08:9b:c5:b9:6e
[   32.995912] 6 fixed-partitions partitions found on MTD device spi0.0
[   33.072016] Creating 6 MTD partitions on "spi0.0":
[   33.239957] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   33.362687] 0x000000000000-0x000000080000 : "U-Boot"
[   33.434580] orion-ehci f1050000.ehci: irq 32, io mem 0xf1050000
[   33.526752] 0x000000200000-0x000000400000 : "Kernel"
[   33.607920] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   33.687077] 0x000000400000-0x000000d00000 : "RootFS1"
[   33.758887] 0x000000d00000-0x000001000000 : "RootFS2"
[   33.824618] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[   33.923657] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   34.010193] usb usb1: Product: EHCI Host Controller
[   34.068628] usb usb1: Manufacturer: Linux 4.19.0-18-marvell ehci_hcd
[   34.144763] usb usb1: SerialNumber: f1050000.ehci
[   34.289214] 0x000000080000-0x0000000c0000 : "U-Boot Config"
[   34.369272] Adding 2928636k swap on /dev/sda2.  Priority:-2 extents:1 across:2928636k FS
[   34.498497] 0x0000000c0000-0x000000200000 : "NAS Config"
[   34.781886] hub 1-0:1.0: USB hub found
[   34.836273] hub 1-0:1.0: 1 port detected
[   35.155896] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   35.401337] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.60
[   35.504492] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   35.603540] usb 1-1: Product: USB2.0 Hub
[   35.662142] hub 1-1:1.0: USB hub found
[   35.718604] hub 1-1:1.0: 4 ports detected
[   35.785557] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[   35.964275] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[   37.093704] audit: type=1400 audit(1626197384.076:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/man" pid=241 comm="apparmor_parser"
[   37.303864] audit: type=1400 audit(1626197384.076:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_filter" pid=241 comm="apparmor_parser"
[   37.564181] audit: type=1400 audit(1626197384.076:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="man_groff" pid=241 comm="apparmor_parser"
[   37.971132] audit: type=1400 audit(1626197384.484:5): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=244 comm="apparmor_parser"
[   38.257370] audit: type=1400 audit(1626197384.484:6): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=244 comm="apparmor_parser"
[   38.457783] audit: type=1400 audit(1626197384.516:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="lsb_release" pid=245 comm="apparmor_parser"
[   39.887296] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   40.043262] NET: Registered protocol family 17
[   42.953237] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   43.978437] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Matthias

BZmatthias avatar Mar 04 '22 16:03 BZmatthias

Hello Arnaud

Is there any information left that you need from me to go ahead on this issue?

Best regards Matthias

BZmatthias avatar Mar 11 '22 18:03 BZmatthias

Sorry, being busy.

The interesting part in the trace is

[   32.000304] cmdlinepart: unknown parameter 'Config),256k@0xc0000(NAS' ignored
[   32.085939] cmdlinepart: unknown parameter 'Config)" ' ignored

For some reasons, the kernel-image+module from installer failed to parse the command line (maybe for presence of single 'space'). I need to check the difference between the install kernel and the "upgrade after install" kernel.

Do you have acces to the serial console of you QNAP ? If yes, we can attempt to remove this space safely

amouiche avatar Mar 12 '22 16:03 amouiche

I dont know if I'm doing it right. I have conected a TTL-serial-usb-conector to the serial head on the QNAP mainboard. Set the com-port to 9600, 8, 1 no parity, no flow control and get the startup messages until: ... [ OK ] Reached target System Time Synchroni[ 40.245725] NET: Registered protocol family 17 zed. [ OK ] Started Daily apt download activities. [ OK ] Started Daily apt upgrade and clean activities. [ OK ] Started Periodic ext4 Onli…ata Check for All Filesystems. [ OK ] Started Daily rotation of log files. [ OK ] Started Daily man-db regeneration. [ OK ] Reached target Timers. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Listening on qcontrold.socket. [ OK ] Reached target Sockets. [ OK ] Reached target Basic System. [ OK ] Started Regular background program processing daemon. [ OK ] Started D-Bus System Message Bus. Starting Remove Stale Onli…t4 Metadata Check Snapshots... [ OK ] Started qcontrold. Starting System Logging Service...

ather this a couple of lines with this ▒ symbol. Some keybord keys print also this symbol in the terminal.

??? Matthias

BZmatthias avatar Mar 13 '22 11:03 BZmatthias

Hi @BZmatthias,

Make sure your serial interface is running at 3.3v. Also the connection parameters are 115200, 8N1.

See here: https://cyrius.com/debian/kirkwood/qnap/ts-219/serial/

QNAP serial pin 1 (TX, red)    -> serial interface RX
QNAP serial pin 2 (VCC, n/c)   -> DON'T CONNECT
QNAP serial pin 3 (RX, green)  -> serial interface TX
QNAP serial pin 4 (GND, black) -> serial interface GND

PXL_20220314_111906006

lpaolini avatar Mar 14 '22 11:03 lpaolini

Hi, I have a similar problem. I have a TS419P that I have recovered and I can't run your script (got the same error message) and same message in dmesg

[ 32.000304] cmdlinepart: unknown parameter 'Config),256k@0xc0000(NAS' ignored [ 32.085939] cmdlinepart: unknown parameter 'Config)" ' ignored

I've also tried to connect in serial but get strange result: By connecting at 115200, 8N1 I never get anything in putty expect 3 blank lines at the begining of the boot. With Thermite I get a bunch of [00]. By connecting at 1200, 8N1 in Putty I get a lot of strange characters at the bigining of the boot (bootloader part ?) and after the normal linux boot (Starting OpenBSD Secure Shell server... And so on...) I can use the serial. I've tried other speeds but never got to a working result, I have no more time today for this. But if I can help you I can try things.

vmasseron avatar Mar 20 '22 17:03 vmasseron

Hello.I'm currently looking in your problem.but testing recovery + install + fix takes lot of time... be patient. Arnaud On Sun, 2022-03-20 at 10:14 -0700, lapourgagner wrote:

Hi,

I have a similar problem. I have a TS419P that I have recovered and I can't run your script (got the same error message) and same message in dmesg

[ 32.000304] cmdlinepart: unknown parameter @.*** (NAS' ignored

[ 32.085939] cmdlinepart: unknown parameter 'Config)" ' ignored

I've also tried to connect in serial but get strange result:

By connecting at 115200, 8N1 I never get anything in putty expect 3 blank lines at the begining of the boot. With Thermite I get a bunch of [00].

By connecting at 1200, 8N1 in Putty I get a lot of strange characters at the bigining of the boot (bootloader part ?) and after the normal linux boot (Starting OpenBSD Secure Shell server... And so on...) I can use the serial.

I've tried other speeds but never got to a working result, I have no more time today for this.

But if I can help you I can try things.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: < @.***

amouiche avatar Mar 23 '22 10:03 amouiche

Well, here is the status:

  • the kernel used during the installer is fine
  • The kernel flash by the Debian buster installer (Linux debian 4.19.0-19-marvell #1 Debian 4.19.232-1 (2022-03-07) armv5tel GNU/Linux) is broken concerning the cmldline mtdparts parsing...
  • very strangely, I have an old buster image backup, which once upgrade to 4.19.0-19 is fine.... I need more investigation to understand...

~~Now the fix...~~ [note: this fix doesn't work correctly... don't use it] ~~The idea is to add patched versions of DTB, that I already build, that provide proper MTD partitionning even in case the cmdline mtdparts are not correctly understood.~~

cd /etc/flash-kernel/dtbs/
wget https://github.com/amouiche/qnap_mtd_resize_for_bullseye/raw/master/dtb/kirwood-tsX19.dtb.tgz
tar xvzf kirwood-tsX19.dtb.tgz

~~Once done, you need to flash the kernel with flash-kernel~~

root@debian:/etc/flash-kernel/dtbs# flash-kernel 
kirkwood-qnap: machine: QNAP TS219 family
Using DTB: kirkwood-ts219-6281.dtb
Installing /etc/flash-kernel/dtbs/kirkwood-ts219-6281.dtb into /boot/dtbs/4.19.0-19-marvell/./kirkwood-ts219-6281.dtb
Taking backup of kirkwood-ts219-6281.dtb.
Installing new kirkwood-ts219-6281.dtb.
flash-kernel: installing version 4.19.0-19-marvell
flash-kernel: appending /etc/flash-kernel/dtbs/kirkwood-ts219-6281.dtb to kernel
Generating kernel u-boot image... done.
Flashing kernel (using 2070950/2097152 bytes)... done.
Flashing initramfs (using 5788350/9437184 bytes)... done.

~~It will work if your APT is still configured to use the 4.19.0 image. Otherwise, if flash-kernel is trying to flash a 5.10.0 version it will not fit in the current 2MB.~~

~~The solution here is to temporary flash a 4.19 kernel.~~

apt list linux-image-*-marvell

provides le list of available and/or installed kernels.

  • apt install one of those 4.19 kernel
  • use : `flash-kernel --force 4.19.0-19-marvell'

amouiche avatar Mar 23 '22 15:03 amouiche

Ok, it even more simple... so forget what is just before.

I finally understand what's happened.

  • various kernel modules are loaded from userland with "modprobe"
  • it looks like modprobe is scanning various configuration file from /etc/modprobe.d/
  • during debian install, the installer populates the file /etc/modprobe.d/local.conf with the kernel cmdline paramters it founds. so, if you install debian after the MTD resize you will have
# Local module settings
# Created by the Debian installer

options cmdlinepart mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot

THIS IS COMPLETE GARBAGE! the installer failed to properly follow the cmdline syntax... Unfortunately, modprobe will use this garbage and provide wrong informations to the kernel module.... CQFD

Consequently, the fix is simple:

rm /etc/modprobe.d/local.conf
reboot

Once you have rebooted, the mtd partitions should be the good resized one.

amouiche avatar Mar 23 '22 18:03 amouiche

Hello Arnaud,

sorry your last comment was a little late for me. I tryed the:

cd /etc/flash-kernel/dtbs/ wget https://github.com/amouiche/qnap_mtd_resize_for_bullseye/raw/master/dtb/kirwood-tsX19.dtb.tgz tar xvzf kirwood-tsX19.dtb.tgz

and used apt list linux-image-*-marvell

to list the aviable 4.19 kernels

after this is used

flash-kernel --force 4.19.0-19-marvell

I belive it was a 4.19.0-18 one but I`m not shure any more. Unfortunatly now the system will no longer boot. I tryed the recovery with tftp an a saved qnap-kernel and also with the live cd from qnap, it seems that the installation in both cases works (two short beebs at the end) but the reboot fails in both cases.

Have I bricked the NAS? :-( Kind regards Matthias

BZmatthias avatar Mar 24 '22 10:03 BZmatthias

On Thu, 2022-03-24 at 03:32 -0700, BZmatthias wrote:

Hello Arnaud,

sorry your last comment was a little late for me. I tryed the:

cd /etc/flash-kernel/dtbs/

wget https://github.com/amouiche/qnap_mtd_resize_for_bullseye/raw/master/dtb/kirwood-tsX19.dtb.tgz

tar xvzf kirwood-tsX19.dtb.tgz

and used

apt list linux-image-*-marvell

to list the aviable 4.19 kernels

after this is used

flash-kernel --force 4.19.0-19-marvell

I belive it was a 4.19.0-18 one but I`m not shure any more. Unfortunatly now the system will no longer boot. I tryed the recovery with tftp an a saved qnap-kernel and also with the live cd from qnap, it seems that the installation in both cases works (two short beebs at the end) but the reboot fails in both cases.

Have I bricked the NAS? :-(

Kind regards Matthias If you are able to hear the beeps, it means you still have a bootloader and it is not bricked. flash-kernel only write on kernel and initrd partitions.It you were able to perform the Qnap recovery once and re-install debian, there is no reason you are not able to do it again.

get back your serial adapter and follow the qnap recovery process. If I remember, the 2 short beeps are heard when the bootloader starts to try to load the recovery firmware

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: < @.***

amouiche avatar Mar 24 '22 11:03 amouiche

Sorry but I dont know what to do exactly with the serial adapter becaus I cant access the serial output. As far as I can see the mainboard rev is 1.3 it is a TS-419p+ it has 2 serial sockets. One is in the same high as the display socket and one is slightly left and below from the first one. I was able to get some outputs during boot at 9600 baud no parity and 1 stop bit when the serial adapter was conected to the lower socket bevor I made the "flash-kernel --force" step. With the harddrive disconectet even a limited shell was accessable. But I never saw the BootTP Screen. Now with the same configuration nothing comes out. I tryed 115200 8N1 - nothing - so how to proceed? Is ther any step by step howto how to work correcktly with the serial console? I believe I have a qnap-kernel actual installed not debian. As far as I can see the recovery procedure with TFTP is still aviable becaus its starts wit two beebs and after a couple of minutes two beebs sound again and a reboot starts. But the booting seems not to finish or start.

I have a TS-419P II that is running fine with Bullsey can I do something with this device to recover the 419P+?

Kind regards Matthias

BZmatthias avatar Mar 24 '22 13:03 BZmatthias

I also have a TS-419p+. As far as I remember, the LCD pannel must be disconnected with a jumper to let have a proper uboot console see https://www.cyrius.com/debian/kirkwood/qnap/ts-41x/serial/ id="-x-evo-selection-start-marker"> On Thu, 2022-03-24 at 06:38 -0700, BZmatthias wrote:

Sorry but I dont know what to do exactly with the serial adapter becaus I cant access the serial output.

As far as I can see the mainboard rev is 1.3 it is a TS-419p+ it has 2 serial sockets. One is in the same high as the display socket and one is slightly left and below from the first one.

I was able to get some outputs during boot at 9600 baud no parity and 1 stop bit when the serial adapter was conected to the lower socket bevor I made the "flash-kernel --force" step. With the harddrive disconectet even a limited shell was accessable. But I never saw the BootTP Screen. Now with the same configuration nothing comes out.

I tryed 115200 8N1 - nothing - so how to proceed? Is ther any step by step howto how to work correcktly with the serial console?

I believe I have a qnap-kernel actual installed not debian. As far as I can see the recovery procedure with TFTP is still aviable becaus its starts wit two beebs and after a couple of minutes two beebs sound again and a reboot starts. But the booting seems not to finish or start. I have a TS-419P II that is running fine with Bullsey can I do something with this device to recover the 419P+? Kind regards

Matthias

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: < @.***

amouiche avatar Mar 24 '22 14:03 amouiche

I read this to and the LCD is disconnected and the jumper is set but stil no output.

BZmatthias avatar Mar 24 '22 14:03 BZmatthias

In sure that baurate = 115200 for the bootloader. what kind of serial port adapter are you using ? Can you take of photo ? On Thu, 2022-03-24 at 07:20 -0700, BZmatthias wrote:

I read this to and the LCD is disconnected and the jumper is set but stil no output.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: < @.***

amouiche avatar Mar 25 '22 13:03 amouiche

Hello every one,

sorry for the long time since the last post from me. I had som privat issus to solve and no energy left to go ahead with this. Finaly I was able to get a respons from the serial - I dont know that I had done different last year. The output is:

U-Boot 1.1.4 (Sep 20 2010 - 15:17:40) Marvell version: 3.5.3

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CD5C0

Soc: 88F6282 A0CPU running @ 1600Mhz L2 running @ 533Mhz SysClock = 533Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7 DRAM CS[0] base 0x00000000 size 256MB DRAM CS[1] base 0x10000000 size 256MB DRAM Total size 512MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done [16384kB@f8000000] Flash: 16 MB

CPU : Marvell Feroceon (Rev 1) USB 0: host mode PEX 0: PCI Express Root Complex Interface PEX interface detected Link X1 PEX 1: PCI Express Root Complex Interface PEX interface detected Link X1

Reset IDE: Marvell Serial ATA Adapter Integrated Sata device found

Net: egiga0 [PRIME], egiga1 Hit any key to stop autoboot: 0 Send Cmd : 0x68 to UART1

Booting image at 00800000 ...

Image Name: kernel 4.19.0-18-marvell Created: 2022-03-01 22:37:11 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2069942 Bytes = 2 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... Bad Data CRC Marvell>>

What do have to do next to get a running Debian?

Kind regards Matthias

BZmatthias avatar Apr 29 '23 08:04 BZmatthias

Can you run "printenv" to display the current uboot configuration ?

Arnaud

On Sat, 2023-04-29 at 01:15 -0700, BZmatthias wrote:

Hello every one, sorry for the long time since the last post from me. I had som privat issus to solve and no energy left to go ahead with this. Finaly I was able to get a respons from the serial - I dont know that I had done different last year. The output is: U-Boot 1.1.4 (Sep 20 2010 - 15:17:40) Marvell version: 3.5.3 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CD5C0 Soc: 88F6282 A0CPU running @ 1600Mhz L2 running @ 533Mhz SysClock = 533Mhz , TClock = 200Mhz DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7 DRAM CS[0] base 0x00000000 size 256MB DRAM CS[1] base 0x10000000 size 256MB DRAM Total size 512MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done @.*** Flash: 16 MB CPU : Marvell Feroceon (Rev 1) USB 0: host mode PEX 0: PCI Express Root Complex Interface PEX interface detected Link X1 PEX 1: PCI Express Root Complex Interface PEX interface detected Link X1 Reset IDE: Marvell Serial ATA Adapter Integrated Sata device found Net: egiga0 [PRIME], egiga1 Hit any key to stop autoboot: 0 Send Cmd : 0x68 to UART1 Booting image at 00800000 ... Image Name: kernel 4.19.0-18-marvell Created: 2022-03-01 22:37:11 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2069942 Bytes = 2 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... Bad Data CRC Marvell>> What do have to do next to get a running Debian? Kind regards Matthias — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.*** m>

amouiche avatar Apr 29 '23 08:04 amouiche

Hello Arnaud,

Wow that was fast :-)

bootargs_backup=console=ttyS0,115200 root=/dev/ram initrd=0xa00000,0x900000 ramdisk=34816 bootcmd_backup=uart1 0x68;cp.l 0xf8200000 0x800000 0x80000;cp.l 0xf8400000 0xa00000 0x240000;bootm 0x800000 bootargs=console=ttyS0,115200 root=/dev/ram initrd=0xb00000,0xc00000 ramdisk=34816 cmdlinepart.mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot Config),256k@0xc0000(NAS Config)" mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot Config),256k@0xc0000(NAS Config)" bootcmd=uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000

I hope I catch the relevant lines.

Matthias

BZmatthias avatar Apr 29 '23 08:04 BZmatthias

Ok,

You have performed the resizing at a time where recovery was not working due to 2 issues:

  • spaces "U-Boot Config" and  "NAS Config" in in bootargs , triggering a bug in debian installer
  • no fallback in kernel search for old/legacy offset.

The 2 issues can be simply fixed with the following uboot commands:

setenv bootcmd uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000;echo Kernel_legacy layout fallback;bootm 0x900000 setenv bootargs console=ttyS0,115200 root=/dev/ram initrd=0xb00000,0xc00000 ramdisk=34816 @.@.@.*** @.@.(U- @.(NAS_Config)" @.@.@.(RootF @.@.(U- @.***(NAS_Config)" saveenv reset

You should reboot and boot on the kernel already installed by the QNAP recovery tool. If no kernel can be found, we still have the possiblity to write the debian installer in flash from uboot with a TFTP download

Arnaud

On Sat, 2023-04-29 at 01:24 -0700, BZmatthias wrote:

Hello Arnaud, Wow that was fast :-) bootargs_backup=console=ttyS0,115200 root=/dev/ram initrd=0xa00000,0x900000 ramdisk=34816 bootcmd_backup=uart1 0x68;cp.l 0xf8200000 0x800000 0x80000;cp.l 0xf8400000 0xa00000 0x240000;bootm 0x800000 bootargs=console=ttyS0,115200 root=/dev/ram initrd=0xb00000,0xc00000 ramdisk=34816 @.@.(Kernel),12M@ @.@.(U-Boot @.(NAS Config)" @.@.@.(Roo @.@.(U-Boot @.(NAS Config)" bootcmd=uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000 I hope I catch the relevant lines. Matthias — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @. m>

amouiche avatar Apr 30 '23 14:04 amouiche

Hello Arnaud,

I had copy the first command to the uboot cli:

setenv bootcmd uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l
0xf8400000 0xb00000 0x300000;bootm 0x800000;echo Kernel_legacy layout
fallback;bootm 0x900000

the uboot had read the first line break after "...0xc0000;cp.l" as an return key and gives an error and a hint how to use the "copy command". Than I copy the command in a txt-editor, remove any line break and after that copy the line to the uboot cli again. setenv bootcmd uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000;echo Kernel_legacy layout fallback;bootm 0x900000

After hitting the return key the Uboot starts after some seconds the Debian installer The installer works until the end and i finaly had a booting Debian Buster.

Thanks a lot for your help ;-)

The question for me is now how to check the configuration of the machine to be sure to have it in the correct shape for the future?

Little update, I aplied the solution from you for the garbage in the conf file:

rm /etc/modprobe.d/local.conf

Now the installation of Debian Bullsey was also possible.

Matthias

BZmatthias avatar Apr 30 '23 15:04 BZmatthias

On Sun, 2023-04-30 at 08:24 -0700, BZmatthias wrote:

Hello Arnaud, I had copy the first command to the uboot cli: setenv bootcmd uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000;echo Kernel_legacy layout fallback;bootm 0x900000 the uboot had read the first line break after "...0xc0000;cp.l" as an return key and gives an error and a hint how to use the "copy command". Than I copy the command in a txt-editor, remove any line break and after that copy the line to the uboot cli again. setenv bootcmd uart1 0x68;cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000;echo Kernel_legacy layout fallback;bootm 0x900000 After hitting the return key the Uboot starts after some seconds the Debian installer The installer works until the end and i finaly had a booting Debian Buster. Thanks a lot for your help ;-) The question for me is now how to check the configuration of the machine to be sure to have it in the correct shape for the future?

do  cat /proc/mtd

If you have dev: size erasesize name mtd0: 00080000 00040000 "uboot" mtd1: 00300000 00040000 "Kernel" mtd2: 00c00000 00040000 "RootFS1" mtd3: 00200000 00040000 "Kernel_legacy" mtd4: 00040000 00040000 "U-Boot_Config" mtd5: 00040000 00040000 "NAS_Config"

It means the partitions are as expected.

Also, since you successfuly boot the debian installer (located in legacy partitions) and the buster kernel (located in enlarged partition), you system is able to find the kernel wherever is is located.

Arnaud

Matthias — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.*** m>

amouiche avatar May 02 '23 06:05 amouiche