[RESOLVED] Blinky LED, xce.ko, and borked /dev/mtdblock[0-2]

Discussion about U-Boot and the kernel.

[RESOLVED] Blinky LED, xce.ko, and borked /dev/mtdblock[0-2]

Postby DavidYon » Fri Jul 01, 2011 7:25 pm

Enough problems in one topic for ya? :-)

I finally resolved my eSATA problem: got a 750G drive which is 9.5mm, which then fits in an eSATA enclosure that my OXNAS plug will talk to.

So in prep for eSATA nirvana, I booted off my USB stick with the Arch Linux ARM kernel, and noticed that the LED keeps on blinking. The problem seems to be that I don't have an xce.ko installed. And it may be due to the fact that at one point I got desperate to unbrick this thing by just downloading and unpacking the rootfs for OXNAS (plus setting the MAC address file manually).

Time to Google and search the Arch Linux ARM forums...

Ah, ok, the script grabs some of the cloudengine binaries from NAND and merges them in with the rootfs. Fine, I can do that.

Oh, but, oops, none of my /dev/mtdblock devices will mount:

$this->bbcode_second_pass_code('', '[root@alarm usb]# ls /tmp
ce ssh-pfQgZD1417 usb
[root@alarm usb]# mount /dev/mtdblock0 /tmp/ce
mount: you must specify the filesystem type
[root@alarm usb]# mount /dev/mtdblock1 /tmp/ce
mount: you must specify the filesystem type
[root@alarm usb]# mount /dev/mtdblock2 /tmp/ce
mount: you must specify the filesystem type
[root@alarm usb]# ls /dev/mtdblock*
/dev/mtdblock0 /dev/mtdblock1 /dev/mtdblock2
[root@alarm usb]# mount -t ext2 /dev/mtdblock0 /tmp/ce
mount: wrong fs type, bad option, bad superblock on /dev/mtdblock0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@alarm usb]# mount -t ext2 /dev/mtdblock1 /tmp/ce
mount: wrong fs type, bad option, bad superblock on /dev/mtdblock1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@alarm usb]# mount -t ext2 /dev/mtdblock2 /tmp/ce
mount: wrong fs type, bad option, bad superblock on /dev/mtdblock2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@alarm usb]#
')

So somewhere in my beat-it-with-a-bigger-sledgehammer-until-it-boots procedure, the NAND blocks got borked.

Ugh.

So, ok, now what? Any creative ideas?

Thanks much...
DavidYon
 
Posts: 19
Joined: Thu May 19, 2011 11:34 am

Re: Blinky LED, xce.ko, and borked /dev/mtdblock[0-2]

Postby WarheadsSE » Fri Jul 01, 2011 7:36 pm

1) That's not uncommon
2) That's not how you mount ubi0:rootfs :)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Blinky LED, xce.ko, and borked /dev/mtdblock[0-2]

Postby DavidYon » Fri Jul 01, 2011 8:39 pm

$this->bbcode_second_pass_quote('WarheadsSE', '1')) That's not uncommon
2) That's not how you mount ubi0:rootfs :)

Ok, oh Great One, you could have just included the mount command line rather than sending me off on another Google. :roll:

And yes, I did in fact do a search of ubi0 on the forums and nothing jumped out at me. So for the rest of us mere mortals, I will include the command line so that it might be found on a forum search:

$this->bbcode_second_pass_code('', '
[root@alarm ~]# mkdir /tmp/ce
[root@alarm ~]# mount -t ubifs ubi0:rootfs /tmp/ce
[root@alarm ~]# ls /tmp/ce
bin etc lost+found mnt root sys usr
dev lib mke2fs proc sbin tmp var
[root@alarm ~]#
')

So great, I have the stock rootfs back. But wait, not so fast...

$this->bbcode_second_pass_code('', '
[root@alarm usb]# find /tmp/ce/lib/modules -name \*xce\* -print
[root@alarm usb]# find /tmp/ce/lib/modules -name \*ko\* -print
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/fat/msdos.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/fat/vfat.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/fat/fat.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/hfs/hfs.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/cifs/cifs.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/ext4/ext4.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/jbd2/jbd2.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/ntfs/ntfs.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/fs/hfsplus/hfsplus.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/net/802/psnap.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/net/802/stp.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/net/802/p8022.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/net/llc/llc.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/net/wireless/cfg80211.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/net/bridge/bridge.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/net/mac80211/mac80211.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/arch/arm/plat-oxnas/power_button.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/crypto/pcbc.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/crypto/michael_mic.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/md/dm-crypt.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/md/raid0.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/md/raid1.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/md/md-mod.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/md/dm-mod.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/md/linear.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/net/gmac/gmac.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/net/mii.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/usb/core/usbcore.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/usb/host/ehci-hcd.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/usb/storage/usb-storage.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/char/hw_random/rng-core.ko
/tmp/ce/lib/modules/2.6.31.6_SMP_820/kernel/drivers/scsi/scsi_wait_scan.ko
[root@alarm usb]#
')

Still no xce.ko. There's that power_button.ko in the oxnas directory...

Another hint?
DavidYon
 
Posts: 19
Joined: Thu May 19, 2011 11:34 am

Re: Blinky LED, xce.ko, and borked /dev/mtdblock[0-2]

Postby WarheadsSE » Fri Jul 01, 2011 9:02 pm

/tmp/ce/usr/local/cloudengines/bin/*

And glad to see your GoogleFu is growing :)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Blinky LED, xce.ko, and borked /dev/mtdblock[0-2]

Postby DavidYon » Fri Jul 01, 2011 10:31 pm

$this->bbcode_second_pass_quote('WarheadsSE', '/')tmp/ce/usr/local/cloudengines/bin/*

And glad to see your GoogleFu is growing :)

I won't take the bait on the condescending attitude (oh, wait, I guess I just did). :lol:

For the other clueless noobs:
$this->bbcode_second_pass_code('', '
[root@alarm usb]# find /tmp/ce/usr/local/cloudengines/bin -name \*ko\* -print
/tmp/ce/usr/local/cloudengines/bin/ufsd.ko
/tmp/ce/usr/local/cloudengines/bin/xce.ko
[root@alarm usb]# ')

Silly me for thinking a kernel module would reside in the same tree as the other kernel modules. After more than a decade of Linux experience, it never ceases to surprise me with one new bit of randomness I didn't see coming.

And yes, I know that this particular design decision wasn't made by the fine folks here. Thank you for pointing me in the right direction.

Now that I've had my fill of sniping, one piece of constructive feedback... From oxnas-install.sh:

$this->bbcode_second_pass_code('', '
echo "# Recording MAC Address"
echo "$MAC" > usr/local/mac_addr
echo "# Coping key CE binaries..."
cp -ar /usr/local/cloudengines usr/local/
cp /usr/sbin/nandwrite usr/local/cloudengines/bin/
cp /usr/sbin/flash_erase usr/local/cloudengines/bin/
cp /usr/sbin/nanddump usr/local/cloudengines/bin/
echo "# Done copying."
')

From what's sitting on ubi0 of my OXNAS-based plug:

$this->bbcode_second_pass_code('', '
[root@alarm ~]# ls /tmp/ce/usr/sbin/
brctl crond flash_erase nandwrite telnetd
chroot dropbear flash_eraseall rdev
[root@alarm ~]#
')
So, what's wrong with this picture?
DavidYon
 
Posts: 19
Joined: Thu May 19, 2011 11:34 am

Re: Blinky LED, xce.ko, and borked /dev/mtdblock[0-2]

Postby WarheadsSE » Sat Jul 02, 2011 1:22 am

That I had nanddump on my dev system and didn't remember that I had downloaded it :p

No condescension meant, honestly.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Blinky LED, xce.ko, and borked /dev/mtdblock[0-2]

Postby DavidYon » Sat Jul 02, 2011 4:01 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'T')hat I had nanddump on my dev system and didn't remember that I had downloaded it :p

No condescension meant, honestly.

No worries, I'm in less of a snitty mood today, especially now that things are on the right track. I'll keep saying it: you guys are doing a great service.

I started running into other oddball things yesterday---network not starting unless you did it twice, therefore ntpd not setting the date, weird ext2 node warnings on the console, etc.

So I got it to boot from NAND into the stock image (now that I know about uBoot's affection for "=" :-) ). I read through the install script again and decided that it wouldn't hurt to just blow away the partition on the eSATA drive and start over.

Short of the nanddump errors, it all just worked, and things look pretty stable at this point.

But it does beg the question of exactly what you were intending the script to do with nanddump, and what the ramifications are of the script not doing them. In other words, what new land mine have I left for myself? :-)
DavidYon
 
Posts: 19
Joined: Thu May 19, 2011 11:34 am
Top

It's... ALIIIIVE!

Postby DavidYon » Sat Jul 02, 2011 5:13 pm

And it even survived the trip from my desk to the wiring closet! And, it even survived having the console serial cable unplugged, so that it could boot up without me watching! Murphy's Test Bench Law defeated!

Thanks for all the assistance....
DavidYon
 
Posts: 19
Joined: Thu May 19, 2011 11:34 am


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 14 guests