Why are the X1000 Linux kernels so sensitive?

AmigaOne X1000 platform specific issues related to Linux only.
Post Reply
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Why are the X1000 Linux kernels so sensitive?

Post by Hypex »

I'm running Ubuntu with the PW-1.2 kernel.

But half the time I try and boot it I get SATA errors and end up in a kernel panic! Why is it so sensitive and looses the HD easily? :-?

Let me explain further. I plugged in a HD to the IDE port and found Linux would no longer boot. Now it said my Linux volume on /dev/sda4 had an unknown block. That volume is fine. Turns out the IDE HD messed up the SATA assignments in the kernel. But why? SATA should be assigned to sda and IDE to hda, That doesn't make sense! Why is it combining them? :-)

Recently, I was testing some USB2 cards with the "evil" VIA 6212 chipset that OS4 doesn't like just too see what would happen in Lnux. Well I didn't even get the chance! Kernel panic, no root! Huh? :-?

How does a USB2 card make the kernel think another HD is attached and mess up the sda device points? This really does not make any sense! :?

The last time Linux broke was when I had plugged in my mouse directly and thought it confused my mouse with another HD on the system! Turned out it was a USB2 card it was confused about.

I have both a revision 63 and 65 of the VIA 6212 cards. Both break Linux booting as above. Which is just silly. In OS4 the 63 crashes the ReakTek driver and Ranger thinks the card is an SSA or some kind of SCSI controller. That's even more silly! What the!?!?

The 65 comes up correct and OS4 can almost use it. Well I got it to copy about 75MB to RAM before it broke the EHCI driver

I'm surprised the USB drive the kernel loads off doesn't confuse it as well. I must have disabled USB during bootup.

But in summary why does the Linux kernel get tripped up so easily and confuse the sda layout? Makes no sense! Is the X1000 version programmed to do this? Seen it no where else! :-?
User avatar
tingo
Beta Tester
Beta Tester
Posts: 191
Joined: Mon Dec 20, 2010 1:52 pm
Location: Oslo, Norway

Re: Why are the X1000 Linux kernels so sensitive?

Post by tingo »

Most likely because this kernel and the included drivers is quite new, and is tested by very few people (compared to Linux on other architectures). Thus, not all the bugs have been found and ironed out.
Torfinn
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Why are the X1000 Linux kernels so sensitive?

Post by Hypex »

That would appear to be the case. Certainly with all the "pty' messages coming up somethings are wrong. And later kernels tend to need an initrd to boot with so some drivers may be missing at bootup unless they compiled them as built in modules. But some things like IDE/SATA drivers are expected to be external, at least to the point of being in the initrd. That may affect it but strange if it would mess up the HD points if not deliberately. Though I have seem kernels loose the root volume during boot on the A1 and find it later after an exit from the initrd.
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Why are the X1000 Linux kernels so sensitive?

Post by mechanic »

I believe the hdx designation for different interfaces has been discontinued in later kernels.

On my X1000/MINT system the SATA HDs are counted first sda, sdb, etc. then the PATA drives are next. I have SATA1= HD, SATA2= DVD, SATA3= HD, and PATA= HD. They are listed in the kernel log as sda,sdb (on sata) and sdc (on pata). no hd(x) designations.

Hope this helps.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
daz
Beta Tester
Beta Tester
Posts: 329
Joined: Tue Dec 21, 2010 7:32 pm

Re: Why are the X1000 Linux kernels so sensitive?

Post by daz »

Hypex wrote:I'm running Ubuntu with the PW-1.2 kernel.
That's quite old, you should really update to 3.5.7
But half the time I try and boot it I get SATA errors and end up in a kernel panic! Why is it so sensitive and looses the HD easily? :-?

Let me explain further. I plugged in a HD to the IDE port and found Linux would no longer boot. Now it said my Linux volume on /dev/sda4 had an unknown block. That volume is fine. Turns out the IDE HD messed up the SATA assignments in the kernel. But why? SATA should be assigned to sda and IDE to hda, That doesn't make sense! Why is it combining them? :-)
Sounds like you dislodged your SATA connector when you were plugging in your IDE drive (Again) Adding a IDE drive adds it to the list AFTER the SATA drives.

And you are wrong the /dev/hdx naming scheme was retired in 2007 -> see here
http://www.tldp.org/HOWTO/Partition-Mas ... O/x99.html
Recently, I was testing some USB2 cards with the "evil" VIA 6212 chipset that OS4 doesn't like just too see what would happen in Lnux. Well I didn't even get the chance! Kernel panic, no root! Huh? :-?

How does a USB2 card make the kernel think another HD is attached and mess up the sda device points? This really does not make any sense! :?
It does to me. You plug a borked card in and moan when the system doesn't work. YOUR VIA CARD MISIDENTIFIES ITSELF!!!

You remember it comes up as a storage device under OS4 - cards are identified by the codes they return yours is returning the one for a storage device, not for a USB device and Linux is quite resonably attaching it to the storage driver.
The last time Linux broke was when I had plugged in my mouse directly and thought it confused my mouse with another HD on the system! Turned out it was a USB2 card it was confused about.

I have both a revision 63 and 65 of the VIA 6212 cards. Both break Linux booting as above. Which is just silly. In OS4 the 63 crashes the ReakTek driver and Ranger thinks the card is an SSA or some kind of SCSI controller. That's even more silly! What the!?!?

The 65 comes up correct and OS4 can almost use it. Well I got it to copy about 75MB to RAM before it broke the EHCI driver
Ditch the Via card - don't you have enough USB ports? But in case you decide not to I'll add a kernel module for UHCI to my next kernel build. OK?
I'm surprised the USB drive the kernel loads off doesn't confuse it as well. I must have disabled USB during bootup.
Err.. no. CFE loads the kernel remember? Linux does start until the kernel has been loaded, and as I recall USB devices appear last in the device list under Linux anyway.
But in summary why does the Linux kernel get tripped up so easily and confuse the sda layout? Makes no sense! Is the X1000 version programmed to do this? Seen it no where else! :-?
It doesn't here, and Trevor hasn't reported this problem, and he often changes his drives over.

Regards
Darren
daz
Beta Tester
Beta Tester
Posts: 329
Joined: Tue Dec 21, 2010 7:32 pm

Re: Why are the X1000 Linux kernels so sensitive?

Post by daz »

Hypex wrote: [...] And later kernels tend to need an initrd to boot with so some drivers may be missing at bootup unless they compiled them as built in modules. But some things like IDE/SATA drivers are expected to be external, at least to the point of being in the initrd. That may affect it but strange if it would mess up the HD points if not deliberately. Though I have seem kernels loose the root volume during boot on the A1 and find it later after an exit from the initrd.
Initrds are mainly used for booting an installer or used with a generic kernel to prevent bloat. Since X1000's are all very similar we just compile everything into the kernel. I still don't understand why you want to complicate the booting system by having to load 2 different files rather than 1

Regards
Darren
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Why are the X1000 Linux kernels so sensitive?

Post by Hypex »

mechanic wrote:I believe the hdx designation for different interfaces has been discontinued in later kernels.
I didn't know that. But I don't see why. "hdx" is a perfect designation for a HDD. Putting IDE drives on the "sdx" bus makes no sense to me as that is inaccurate. Using "atax" would make more sense in this case! We still have mechanical drives and most IDE ones would be.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Why are the X1000 Linux kernels so sensitive?

Post by Hypex »

daz wrote:That's quite old, you should really update to 3.5.7
I haven't checked for updates in a while. Plus it's hard to update a new kernel since the menu must be modified. Without a tool to do this I am loathe to edit everything by hand again.
Sounds like you dislodged your SATA connector when you were plugging in your IDE drive (Again) Adding a IDE drive adds it to the list AFTER the SATA drives.
No the SATA was fine. I could still reboot into OS4. It must add IDE drives on later kernels but on the ones I have tested it messes up my SATA list. In fact it is messed up so much it looks like it can't even find any SATA devices at all. It keeps resetting the SATA link and lower the speed while reporting errors about the devices. Pull IDE off and it's fine.
And you are wrong the /dev/hdx naming scheme was retired in 2007 -> see here
That was a long time ago. I've only recently discovered UUID and LABEL methods. But on the A1 found UUID didn't work all the time. Of course that is a different kernel and it does lose or swap busses around at times for no apparent reason.
It does to me. You plug a borked card in and moan when the system doesn't work. YOUR VIA CARD MISIDENTIFIES ITSELF!!!
So you are saying VIA chipset cards are all borked new from the factory?

The card is fine. (I wouldn't say great.) On my A1 the 63 comes up as a USB2 card in OS4 and OHCI/UHCI works fine. Why is it reported correctly on A1 OS4?

On A1 Linux EHCI works on the 65 model it so there is no hardware issue, only OS4 has the issue on that one.
You remember it comes up as a storage device under OS4 - cards are identified by the codes they return yours is returning the one for a storage device, not for a USB device and Linux is quite resonably attaching it to the storage driver.
That doesn't make sense. The 63 comes up as SSA on the X1000 but on the A1 it comes up as USB2. :-?

How can the card report itself differently on the same OS on different hardware? Does it know what type of Amiga machine it is running on and change the numbers accordingly? :-D

To me this would point down to the expansion.library which reads the card IDs.

But this is all a moot point because the last I tested was the 65 which is reported correctly on X1000 OS4. But it breaks on X1000 Linux by messing up the drive points somehow. On A1 Linux it works fine including EHCI.
Ditch the Via card - don't you have enough USB ports? But in case you decide not to I'll add a kernel module for UHCI to my next kernel build. OK?
Which one, the 63 model? ;-) I agree on that one!

I don't need more ports on the X1000. The point was to test the card in the X1000 to see how it works and if the EHCI Linux PPC driver can properly use it. My intention is to use the card on my A1 to add USB2 ports. Currently this only works with Linux. At least with the 65 model.

But UHCI? No don't bother, EHCI is what I'm after! ;-)
Err.. no. CFE loads the kernel remember? Linux does start until the kernel has been loaded, and as I recall USB devices appear last in the device list under Linux anyway.
Yes I know CFE loads it and here the kernel loads off a USB drive. CFE loads it off the USB drive. My point was a USB drive is attached to the system when the kernel boots. So there is another drive attached with the possibility of messing up the device points.
It doesn't here, and Trevor hasn't reported this problem, and he often changes his drives over.
I'll need to test the later kernels then.
I still don't understand why you want to complicate the booting system by having to load 2 different files rather than 1
I don't wish too. I just noticed later later kernels like to be split into kernel and modules separately. At least they like too on x86. Even later A1 builds of Linux kernels follow this method. Even though a combined kernel+modules is more desirable. But probably not possible as a too large kernel image will crash SLB or UBoot.

A combined image should help to prevent errors in the installer due to missing modules like RAID which I got with my install. Of course a preseed is really needed for a clean installer but that's another story. :-D
User avatar
tingo
Beta Tester
Beta Tester
Posts: 191
Joined: Mon Dec 20, 2010 1:52 pm
Location: Oslo, Norway

Re: Why are the X1000 Linux kernels so sensitive?

Post by tingo »

Hypex wrote: I didn't know that. But I don't see why. "hdx" is a perfect designation for a HDD. Putting IDE drives on the "sdx" bus makes no sense to me as that is inaccurate. Using "atax" would make more sense in this case! We still have mechanical drives and most IDE ones would be.
Well, think of the "sdX" designation as "storage" (or "scsi") to make it easier on yourself. :-)
Torfinn
daz
Beta Tester
Beta Tester
Posts: 329
Joined: Tue Dec 21, 2010 7:32 pm

Re: Why are the X1000 Linux kernels so sensitive?

Post by daz »

I've calmed down enough to answer now.
Hypex wrote:I'm running Ubuntu with the PW-1.2 kernel.
This comment should have set the alarm bells ringing, but I credited you with more intelligence, That is an IOMMU enabled kernel. All these problems you are mentioning (AGAIN I might add) are due to the obscure iommu bug i've told you about. I still haven't fixed it. I'll remind you as you've forgotten, SOME graphics cards cause the IOMMU to sometimes misconfigure on boot when there is only 2G RAM installed. My rv770(4850) does this, but works perfectly when 4G is installed.

When this occurs the result is exactly the same as booting an non iommu kernel on a 4G machine (IIUC) You config seems to fall into this catagory (as I told you before) - there are three fixes: (as I've also told you before)

Add another 2G ram
Change Graphics card

Or: use the following kernel EXCLUSIVELY (Note this Kernel will not boot on a machine with >2G Ram)

http://www.fileden.com/files/2012/6/20/ ... .5.7ni.zip

If I am right you'll find it a much better experience
But half the time I try and boot it I get SATA errors and end up in a kernel panic! Why is it so sensitive and looses the HD easily? :-?

Let me explain further. I plugged in a HD to the IDE port and found Linux would no longer boot. Now it said my Linux volume on /dev/sda4 had an unknown block. That volume is fine. Turns out the IDE HD messed up the SATA assignments in the kernel. But why? SATA should be assigned to sda and IDE to hda, That doesn't make sense! Why is it combining them? :-)
See above. This is nothing to do with adding an IDE drive.
Yes I know CFE loads it and here the kernel loads off a USB drive. CFE loads it off the USB drive. My point was a USB drive is attached to the system when the kernel boots. So there is another drive attached with the possibility of messing up the device points.
Wrong. Drive letters are always allocated in the following order:

SB600 SATA ports
SB600 IDE ports
CF port (if compiled into kernel)
USB last.

In other words your SATA and IDE will be the same letters regardless of how many USB devices you use.
But in summary why does the Linux kernel get tripped up so easily and confuse the sda layout? Makes no sense! Is the X1000 version programmed to do this? Seen it no where else! :-?
The X1000 kernel is still a work in progress, being maintained unofficially by a few amateurs, unlike the A1 (which you like to compare against) which is a mainstream Linux platform with support provided by the main Linux kernel developers. There are a few rough edges, as you've found but it works very well for most people, and there are no show-stoppers (that I know of)
I haven't checked for updates in a while. Plus it's hard to update a new kernel since the menu must be modified. Without a tool to do this I am loathe to edit everything by hand again.
You don't actually need to edit the menu you know.

For when I am developing/testing new kernels I have an entry that loads a file called 'vmlinux-tst' I simply copy any new kernel I want to test over this file and then select that entry. No need to edit the CFE menu. Not that editing the CFE menu is that hard or time consuming, just saving myself a bit of typing.

The kernels only have different names to differentiate them, you can rename them however you like.

[rant mode]
I'm a little confused why you've decided to bring this up again. I thought every thing had been going OK with your Linux install, as I've not seen any messages from you about problems. I've never seen you post any good comments about Linux for the X1000, in fact you seem to go out of your way to rubbish it whenever the opportunity arises. Why is that?
[/rant mode]

Let us know how the 3.5.7ni kernel works for you.

Regards
Darren
Post Reply