Welcome! Log In Create A New Profile

Advanced

ix2-200 wont see RAID1

Posted by damnit_ 
ix2-200 wont see RAID1
February 27, 2020 05:45PM
Now that my boot up issues are resolved per https://forum.doozan.com/read.php?2,95424, thank you very much @bodhi

I have new issue trying to migrate to RAID1 as shown here https://forum.doozan.com/read.php?2,27308

Made new uInitrd and flashed to NAND after initramfs updated from
dpkg-reconfigure mdadm

But uBoot hates it
NAND read: device 0 offset 0x100000, size 0x500000
 5242880 bytes read: OK

NAND read: device 0 offset 0x1000000, size 0xe00000
 14680064 bytes read: ERROR
## Booting image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-02-14  20:02:37 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4975352 Bytes =  4.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2020-02-27  22:14:03 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    10249645 Bytes =  9.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... Bad Data CRC

Not to worry I can still boot from my USB, and even reflash the working uInitrd (without RAID support)..

But why does this one fail checksum?

Here's my process
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00004000 "uboot"
mtd1: 00020000 00004000 "uboot_env"
mtd2: 00500000 00004000 "uImage"
mtd3: 00e00000 00004000 "uInitrd"
root@debian:~# cd /boot
root@debian:/boot# mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.2.9-kirkwood-tld-1 -d initrd.img-5.2.9-kirkwood-tld-1 uInitrd
Image Name:   initramfs-5.2.9-kirkwood-tld-1
Created:      Thu Feb 27 15:58:12 2020
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    10249645 Bytes = 10009.42 KiB = 9.77 MiB
Load Address: 00000000
Entry Point:  00000000
root@debian:/boot# flash_erase /dev/mtd3 0 0
Erasing 16 Kibyte @ 954000 -- 66 % complete flash_erase: Skipping bad block at 00958000
Erasing 16 Kibyte @ dfc000 -- 100 % complete
root@debian:/boot# nandwrite -p /dev/mtd3 /boot/uInitrd
Writing data to block 0 at offset 0x0
...... [removed for brevity]
root@debian:/boot#



Edited 2 time(s). Last edit at 02/27/2020 06:03PM by damnit_.
Re: ix2-200 wont see RAID1
February 27, 2020 06:44PM
NAND read: device 0 offset 0x1000000, size 0xe00000
 14680064 bytes read: ERROR

Looks like either this stock u-boot does not handle the bad block correctly. Or there is something else going on during that read we can't see.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: ix2-200 wont see RAID1
February 27, 2020 07:05PM
@bodhi I was tempted to install your newest uBoot but not seeing ix2-200 specifics. That read error has been ongoing but with the previous uInitrd it passes checksum. Can I get us more detail somehow?

Here's what the previous does
NAND read: device 0 offset 0x100000, size 0x500000
 5242880 bytes read: OK

NAND read: device 0 offset 0x1000000, size 0xe00000
 14680064 bytes read: ERROR
## Booting image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-02-14  20:02:37 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4975352 Bytes =  4.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initrd.img-5.2.9-kirkwood-tld-1
   Created:      2020-02-24  15:34:56 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes =  9.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.



Edited 1 time(s). Last edit at 02/27/2020 07:20PM by damnit_.
Re: ix2-200 wont see RAID1
February 27, 2020 08:25PM
@damnit_,

> @bodhi I was tempted to install your newest uBoot
> but not seeing ix2-200 specifics.

I don't have new u-boot for this device.

My guess for the checksum error was this u-boot behavior has something to do with it, but I can't be sure without seeing the GPL source for this u-boot.

As I've shown you before how to repartition the mtds to move uInitrd to a further part of NAND. I thought that was not successful, either.

So my best advice at this point is: allocate a partition on the 1st HDD to store uImage and uIntrd, or store the whole rootfs. The 2nd partition can be used for RAID with the 2nd HDD.

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: