AndiDog
Posts: 28
Joined: Sat Apr 07, 2012 6:01 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sat Apr 07, 2012 7:21 pm

Recently we got a Pi (I think it"s the prototype version, not exactly sure) and I tried to make it work using a 2GB SDHC card and the Fedora Remix installer for Windows (http://files.velocix.com/c1410.....-1.0.0.zip). Also tried a Debian image that I already had working in the most recent version of QEMU on Ubuntu (dd"ed the image to the card).

But with both distributions (Fedora/Debian), the boot process hangs at the following point: http://i.imgur.com/TX3i6.jpg

Note that the plugged in USB keyboard/mouse does not make a difference, if they"re not plugged in it hangs after the message "smsc95xx 1-1.1:1.0: eth0: register...". I can"t switch to other VTs using the keyboard. Any idea on what the problem is, or how to debug it? As mentioned it works with the same image in qemu-arm.

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sat Apr 07, 2012 7:52 pm

I may be corrected on this - but if you are using a kernel under qemu, it is compiled for versatile - and will not work on real Pi hardware. Conversely, a Pi distribution kernel will not work under qemu because the hardware definition is different.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sat Apr 07, 2012 8:51 pm

That was my first impression - that the different kernels was the problem - because it fits the prototype so well ("works under QEMU, but not on the real Pi").  But I don't think it is, for the following reasons:

1) On real hardware, the kernel is a regular file inside the "image" - and the kernel file inside the distributed image(s) - i.e., the Debian and Fedora ones - is a correct, Pi kernel.  The other one - the versatile kernel - is an external file that you have to store on your host machine outside the image file.  So, it is not really possible to be using one when you should be using the other (if you see what I mean).

2) The failure point (see the JPG) doesn't seem right for a "wrong kernel" problem.  Admittedly, I  don't know enough about the differences between the "versatile" and the Pi to say for sure, but I would have expected a bad kernel to cause it to fail much earlier - like right at the start - not after it has been running for awhile.  The failure to me, looks like a hardware initialization problem.

3) To Andy: Just FYI, you can never switch virtual consoles while the system is booting.  That's pretty standard Linux as far as I know.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

hexameron
Posts: 47
Joined: Sun Jan 08, 2012 12:14 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sat Apr 07, 2012 9:02 pm

It appears to be waiting for /root .. because it cannot read your sdcard?

jacklang
Posts: 166
Joined: Thu Aug 04, 2011 10:59 am

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sat Apr 07, 2012 9:02 pm

Have you tried with just keyboard and mouse plugged directly - no hub?

hexameron
Posts: 47
Joined: Sun Jan 08, 2012 12:14 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sat Apr 07, 2012 9:09 pm

The log says that it cannot read the SD-Card. We need to know what type that is.

Bad Wolf
Posts: 66
Joined: Wed Jan 25, 2012 11:18 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sat Apr 07, 2012 9:44 pm


Timeout error on the SD cardPossible card is a Class 10 by chance?  
To a person with a hammer, everything looks like a nail.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sat Apr 07, 2012 10:51 pm

It is the sdcard. The error -110 is fatal. Do you have another one to try?
Updating kernel.img/start.elf from raspberrypi/firmware on GitHub does fix some sdcard issues, so may be worth a try.

hexameron
Posts: 47
Joined: Sun Jan 08, 2012 12:14 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 8:04 am

That looks like a bug in Linux - it should be re-trying, not timing out.

I would guess that the the 1.8v rail still isn`t connected everywhere that it should be.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 9:59 am

Newer SD cards, including MicroSD, that use SDHC will be flaky because, as Eben has pointed out, some use 1.8 volt technology and the SD interface is not able to reliably handle the commands to shift between 3.3 and 1.8 volt modes. The fix will require a hardware upgrade which has not been planned at this time, according to Eben.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

User avatar
Chromatix
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 11:27 am

As long as the firmware can load the kernel (which it looks like it does at this point), it should be possible to insert a "quirk" in the Linux SDHCI driver so that it doesn't attempt 1.8V (UHS) mode on this particular hardware.  It's the kind of trivial change that gets accepted upstream quite easily.

For best results, I suggest talking to the SDHCI driver maintainer.  They will know precisely what to edit, and how to get the information needed to precisely identify this hardware.  Alternatively, they might be willing to add a config option to never attempt UHS modes.
The key to knowledge is not to rely on people to teach you it.

User avatar
Tass
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 11:28 am

Just out of curiosity, where did you get the Pi? Just wondering at what stage of the project this was produced, and therefore whether the problems you"re experiencing are expected in the version we"re getting next week (fingers crossed) or not?

Lets hope it"s just the SD class 10 issue...

AndiDog
Posts: 28
Joined: Sat Apr 07, 2012 6:01 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 1:21 pm

Hi all, thanks for your replies. It actually was the SD card which as mentioned was a SDHC card - the Pi doesn"t like that. Regarding the revision, it is a Model B (production revision, not a prototype as I thought).

What I don"t understand - how could the kernel be started (requires reading sectors from the SD card) but later on the card cannot be mounted as root? I guess I"m missing something here...

User avatar
Tass
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 1:40 pm

From what I"ve read it isn"t SDHC that"s the issue, it"s the speed (i.e. class). SDHC refers to the capacity - everything bigger than 4GB will be SDHC as opposed to SD. Problems haver been found with Class 10 cards (something to do with the die?) whereas Class 4 or Class 6 are fine.

Theoretically an 8GB (SDHC) Class 6 card will work well.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 1:53 pm

1) @Andy - my guess is that it can read the (small) FAT partition (where the bootloaders and kernel live) but is having problems reading/mounting the bigger Linux partition where the rootfs lives.

2) @Tass - out of curiosity, how can one determine what "class" an SD card is?  How does one test this?
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 2:12 pm

Read my post here:

http://www.raspberrypi.org/for.....bottleneck

for some info on why sdcard may fail.

User avatar
Tass
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Sun Apr 08, 2012 2:17 pm

Joe Schmoe said:


2) @Tass – out of curiosity, how can one determine what "class" an SD card is?  How does one test this?


It looks like it's all based on read/write speeds – the definitions can be found here:
http://en.wikipedia.org/wiki/S.....ass_Rating

As for how to determine this, it should be written on the card   I'm sure there will be a utility for measuring read/write speeds but I don't know of one off the top of my head.  I seem to remember a post a while ago where someone did a whole series benchmark tests on different cards, and they probably mentioned the utility used there.

EDIT: Here's the post I was thinking of:

http://www.raspberrypi.org/for.....benchmarks

User avatar
Chromatix
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Mon Apr 09, 2012 2:09 am

The SD card standard has evolved in much the same way as the IDE standard over the years - ie. it's got very complicated and confusing.  It doesn't help that card manufacturers tend to stay well away from real technical data when publishing performance claims or even choosing/maintaining model branding, so it is genuinely difficult to tell from the outside what a card is likely to do.

The bottom line however is that an SD card has two components: a flash chip which is used for storage, and a controller chip which interfaces between the flash chip and the card connector.  A very similar controller chip is used for USB flash drives.

The card connector can be run in a number of different modes and at a variety of different speeds.  Obviously the card and the computer have to support the same mode and the same speed in order for the two to work together.  To simplify matters, the card always comes up first in a standard, rather slow mode which all computers (and other card readers and writers) must support.  The computer and the card then negotiate a faster mode if possible.

The original SD card standard (and thus the standard, slow mode mentioned above) operates the interface at 3.3V.  This supports up to 50MHz SDR signalling and 4 bits per clock, which is technically sufficient to support anything up to and including a Class 10 card, but some applications really prefer more than that.

Recent high-performance cards tend to support the new interface standard known as UHS (Ultra High Speed).  This changes the interface voltage to 1.8V to allow faster speeds, but only when the computer and the card both support this and have negotiated such - so the card still initially comes up at 3.3V as normal.  UHS supports DDR signalling giving effectively 8 bits per clock, and up to 104MHz clock speeds.

The problem seems to be a hardware bug in the Broadcom chip's SD card interface, which prevents it from supporting 1.8V signalling properly.  As long as the interface is kept in 3.3V mode, it works correctly.  Since all SD cards support 3.3V mode, albeit not necessarily at their maximum performance, this is a solvable problem - simply ensure that the firmware and the Linux kernel know that UHS support is broken so that they never use it.

By the look of it, the firmware is already staying in 3.3V mode and thereby loading the kernel correctly.  Linux however is trying to be clever and turning on the UHS mode - and only then noticing that something is wrong, hence the error message mentioning 1.8V.  Linux is then unable to recover the SD card hardware to a working state.

So the bottom line is, as I mentioned before, that Linux needs to be told that 1.8V UHS mode is unavailable on the R-Pi.
The key to knowledge is not to rely on people to teach you it.

hexameron
Posts: 47
Joined: Sun Jan 08, 2012 12:14 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Mon Apr 09, 2012 7:20 am

The kernel WAS patched on March 17th, they just didn`t bother mentioning it until now. The clock is also locked at 20MHz - that can`t be good.

User avatar
Tass
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Mon Apr 09, 2012 8:38 am

Great tech info - thanks guys!  So does this mean until Broadcom release new firmware the speed of the SD card would be limited to 10MB/s? (4 bits/clock @ 20MHz?)

User avatar
Chromatix
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Mon Apr 09, 2012 2:16 pm

Only 20MHz?  I thought the minimum standard was 25MHz.
The key to knowledge is not to rely on people to teach you it.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Mon Apr 09, 2012 3:44 pm

http://en.wikipedia.org/wiki/M.....iMediaCard
says the max speed of standard mmc card is 20MHz.

User avatar
Tass
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Mon Apr 09, 2012 3:53 pm

dom said:


http://en.wikipedia.org/wiki/M.....iMediaCard
says the max speed of standard mmc card is 20MHz.


We're talkign about SD cards here, not MMC cards as I understand it? (see link in my earlier post).

@Chromatix - yes, looking at the wikipedia page I believe you're right - 25MHz is the default (as opposed to the other available speeds of 50, 100 & 208 MHz)

@hexameron - what makes you think it's been locked at 20MHz?

AndiDog
Posts: 28
Joined: Sat Apr 07, 2012 6:01 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, works in QEMU)

Mon May 07, 2012 10:21 pm

Does anyone know if this problem is fixed in the latest Debian image?

rgm
Posts: 1
Joined: Sat Jun 02, 2012 9:55 pm

Re: Problem with Debian/Fedora hanging on boot (on a Pi, wor

Sat Jun 02, 2012 10:10 pm

I had this "-110" problem with my SDHC card when using the Fedora 14 remix. I solved it by replacing /boot/*img and /boot/*elf with the files from here:

https://github.com/raspberrypi/firmware ... aster/boot

The card is labeled:

SanDisk Ultra, Class 6
30MB/s* SDHC I
4 GB

Presumably the asterisk means "This is a total lie" because I get these benchmark results:
# hdparm -t /dev/mmcblck0
/dev/mmcblk0:
Timing buffered disk reads: 14 MB in 3.16 seconds = 4.43 MB/sec

[root@raspi ~]# time dd if=/dev/zero of=zerotest bs=1024 count=102400
102400+0 records in
102400+0 records out
104857600 bytes (105 MB) copied, 24.253 s, 4.3 MB/s

Return to “General discussion”