[9fans] Installing Plan 9 on a ICH9 SATA controller. - Plan9

This is a discussion on [9fans] Installing Plan 9 on a ICH9 SATA controller. - Plan9 ; Hi, I've tried to install Plan 9 on my new computer and I'm having trouble with the SATA controller. If I have AHCI mode enabled in BIOS: - Booting the install CD only gets to: PBS1...Bad format or I/O error ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: [9fans] Installing Plan 9 on a ICH9 SATA controller.

  1. [9fans] Installing Plan 9 on a ICH9 SATA controller.

    Hi,

    I've tried to install Plan 9 on my new computer and I'm having trouble
    with the SATA controller.

    If I have AHCI mode enabled in BIOS:
    - Booting the install CD only gets to:
    PBS1...Bad format or I/O error

    - Booting using a floppy:
    9load seems to load fine, and it even detects the SATA controller
    printing
    sdiahci: drive 0 in state ready after 0 resets
    (it does the same for drive 1, wich should be the DVD drive).

    But it only lists fd0 as valid boot source.

    Following advice from people in #plan9 I disabled AHCI mode and went for
    legacy mode:
    - Install CD booted fine. I could even partition the hard disk. But it
    can't copy files as it begins throwing lots of I/O errrors while copying
    files. I tried with DMA enabled and disabled.

    I switched back to AHCI mode and tried booting the floppy again. Now it
    shows fd0 and sdE0!9fat as boot devices (9fat partiton is empty, so I
    can't boot). It seems in AHCI mode it can access hard disk just fine,
    but it can't access the DVD drive.

    Both hard disk and DVD drive are connected via SATA to the ICH9 controller.

    Any ideas?

    Thanks in advance.
    Armando.



  2. Re: [9fans] Installing Plan 9 on a ICH9 SATA controller.

    Has you try to put the sata controller in legacy pata or something like?
    I had the same problem with my Linux and I changed to pata and all works
    fine. The AHCI mode do not run with me.

    slds.

    Armando Camarero escribió:
    > Hi,
    >
    > I've tried to install Plan 9 on my new computer and I'm having trouble
    > with the SATA controller.
    >
    > If I have AHCI mode enabled in BIOS:
    > - Booting the install CD only gets to:
    > PBS1...Bad format or I/O error
    >
    > - Booting using a floppy:
    > 9load seems to load fine, and it even detects the SATA controller
    > printing
    > sdiahci: drive 0 in state ready after 0 resets
    > (it does the same for drive 1, wich should be the DVD drive).
    >
    > But it only lists fd0 as valid boot source.
    >
    > Following advice from people in #plan9 I disabled AHCI mode and went
    > for legacy mode:
    > - Install CD booted fine. I could even partition the hard disk. But it
    > can't copy files as it begins throwing lots of I/O errrors while
    > copying files. I tried with DMA enabled and disabled.
    >
    > I switched back to AHCI mode and tried booting the floppy again. Now
    > it shows fd0 and sdE0!9fat as boot devices (9fat partiton is empty, so
    > I can't boot). It seems in AHCI mode it can access hard disk just
    > fine, but it can't access the DVD drive.
    >
    > Both hard disk and DVD drive are connected via SATA to the ICH9
    > controller.
    >
    > Any ideas?
    >
    > Thanks in advance.
    > Armando.
    >
    >




  3. Re: [9fans] Installing Plan 9 on a ICH9 SATA controller.

    it would be useful if you could send the output of lspci to me offline.
    there are many models of ich9. not all of them have the same properties.

    i do have an ich9r controller:

    0.31.2: 01.06.01 8086/2922 10 0:00001c51 16 1:00001c45 16 2:00001c49 16 3:00001c41 16 4:000018e1 32 5:d8d01000 2048

    which works with some cavets. hot plugging does not work and if
    ports are skipped, drives after the skip are not accessable.

    > If I have AHCI mode enabled in BIOS:
    > - Booting the install CD only gets to:
    > PBS1...Bad format or I/O error


    don't know. pbs uses bios to do i/o.

    > - Booting using a floppy:
    > 9load seems to load fine, and it even detects the SATA controller
    > printing
    > sdiahci: drive 0 in state ready after 0 resets
    > (it does the same for drive 1, wich should be the DVD drive).


    that's normal.

    > But it only lists fd0 as valid boot source.


    i'd guess no suitable partition was found.

    > Following advice from people in #plan9 I disabled AHCI mode and went for
    > legacy mode:
    > - Install CD booted fine. I could even partition the hard disk. But it
    > can't copy files as it begins throwing lots of I/O errrors while copying
    > files. I tried with DMA enabled and disabled.


    it sounds like you have either a bad drive or a cable problem. i
    would replace the sata cable first. it is also possible that you are
    having a problem with power management. but i don't know how to tell
    if you're using the ide interface.

    > I switched back to AHCI mode and tried booting the floppy again. Now it
    > shows fd0 and sdE0!9fat as boot devices (9fat partiton is empty, so I
    > can't boot). It seems in AHCI mode it can access hard disk just fine,
    > but it can't access the DVD drive.
    >
    > Both hard disk and DVD drive are connected via SATA to the ICH9 controller.


    make sure they are connected to ports 0 and 1 of the controller.
    (either order.)

    - erik



  4. Re: [9fans] Installing Plan 9 on a ICH9 SATA controller.

    erik quanstrom escribió:
    > it would be useful if you could send the output of lspci to me offline.
    > there are many models of ich9. not all of them have the same properties.
    >
    > i do have an ich9r controller:
    >
    > 0.31.2: 01.06.01 8086/2922 10 0:00001c51 16 1:00001c45 16 2:00001c49 16 3:00001c41 16 4:000018e1 32 5:d8d01000 2048
    >
    > which works with some cavets. hot plugging does not work and if
    > ports are skipped, drives after the skip are not accessable.
    >
    >

    lspci -nnv on Linux.

    00:1f.2 SATA controller [0106]: Intel Corporation 6 port SATA AHCI
    Controller [8086:2922] (rev 02) (prog-if 01 [AHCI 1.0])
    Subsystem: Giga-byte Technology Unknown device [1458:b005]
    Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 506
    I/O ports at e600 [size=8]
    I/O ports at e700 [size=4]
    I/O ports at e800 [size=8]
    I/O ports at e900 [size=4]
    I/O ports at ea00 [size=32]
    Memory at fa106000 (32-bit, non-prefetchable) [size=2K]
    Capabilities: [80] Message Signalled Interrupts: Mask- 64bit-
    Queue=0/4 Enable+
    Capabilities: [70] Power Management version 3
    Capabilities: [a8] SATA HBA
    Capabilities: [b0] PCIe advanced features
    Kernel driver in use: ahci
    >> Following advice from people in #plan9 I disabled AHCI mode and went for
    >> legacy mode:
    >> - Install CD booted fine. I could even partition the hard disk. But it
    >> can't copy files as it begins throwing lots of I/O errrors while copying
    >> files. I tried with DMA enabled and disabled.
    >>

    >
    > it sounds like you have either a bad drive or a cable problem. i
    > would replace the sata cable first. it is also possible that you are
    > having a problem with power management. but i don't know how to tell
    > if you're using the ide interface.
    >

    I have Windows XP and Linux on this same disk. It can't be a cable
    problem. I doubt it is a disk problem either because I/O errors during
    file copy seem to be on random disk bloks. Sometimes it copies files
    until 2%, others it gets to 13% (I reformat fossil partition every time
    I try reinstalling Plan 9)...
    >
    >> I switched back to AHCI mode and tried booting the floppy again. Now it
    >> shows fd0 and sdE0!9fat as boot devices (9fat partiton is empty, so I
    >> can't boot). It seems in AHCI mode it can access hard disk just fine,
    >> but it can't access the DVD drive.
    >>
    >> Both hard disk and DVD drive are connected via SATA to the ICH9 controller.
    >>

    >
    >
    > make sure they are connected to ports 0 and 1 of the controller.
    > (either order.)
    >

    AHCI BIOS detects hard disk on port 0 and DVD recorder on port 1.
    And it is consistent with 9load messages regarding drive reset. Should I
    be able to access DVD drive on sdF0?
    > - erik
    >

    Thanks.



  5. Re: [9fans] Installing Plan 9 on a ICH9 SATA controller.

    > > it sounds like you have either a bad drive or a cable problem. i
    > > would replace the sata cable first. it is also possible that you are
    > > having a problem with power management. but i don't know how to tell
    > > if you're using the ide interface.
    > >

    > I have Windows XP and Linux on this same disk. It can't be a cable
    > problem. I doubt it is a disk problem either because I/O errors during
    > file copy seem to be on random disk bloks. Sometimes it copies files
    > until 2%, others it gets to 13% (I reformat fossil partition every time
    > I try reinstalling Plan 9)...


    i wouldn't be so quick to rule out a cabling problem. i have seen failing
    on random blocks happen in three senarios. 1) cabling problems. 2)
    power management problems (the error is actually due to pm kicking in
    when you're trying to do i/o) and 3) sata protcol errors. unfortunately,
    there are some compatability problems between some drive firmware and
    some hbas. these problems can depend on the programming interface.
    your hba has three different programming interfaces (a) ide, (b) old
    intel sata (c) ahci. i believe (but can't confirm) that all three modes are
    driven by firmware in the southbridge.

    so, it would be useful to know what programming interface are linux &
    windows using and what disk throughput are you getting. from linux
    it would be good to get timing/throughput for
    dd if=/dev/$harddrive of=/dev/null bs=512k count=10000
    it could be that there is some wrinkle of ahci that i have missed.
    if you could send me the exact output, that would be useful. you
    may want to enable extra debugging by
    echo ahci debug>/dev/sdctl

    if you have a way to compile a kernel, i left my development version
    of sdiahci.c on sources
    /n/sources/contrib/quanstro/sdiahci.c

    > AHCI BIOS detects hard disk on port 0 and DVD recorder on port 1.
    > And it is consistent with 9load messages regarding drive reset. Should I
    > be able to access DVD drive on sdF0?
    > > - erik
    > >


    sd gives each controller a letter, not each port. so port 1 would be sdE1.

    for example, i have a machine with an amd sb600 with 4 ports and a
    marvell 88sx...and with a marvell 88sx so i have sdE0-sdE4 and
    sdF0-sdF7.

    so it would be useful to have 1) the contents of /dev/sdE0/ctl, 2) the
    exact error messages 3) the programming interface used by linux
    and the 4) dd timing. you might want to send that to me off list.

    - erik


  6. Re: [9fans] Installing Plan 9 on a ICH9 SATA controller.

    I finally installed it!
    The I/O problems I got were using the controller in legacy mode. But in
    AHCI mode the install CD wouldn't boot ("PBS1...Bad format or I/O error").
    So I built a 9pcflop.gz wich included the sdiahci driver and used it
    instead of the one included in the floppy install image.

    Thank you, Erik, it seems that your driver is working perfectly. The
    problem must be in the driver Plan 9 uses when the controller is working
    in legacy mode (I suppose sdiahci isn't responsible for that).

    Apart from that, I had problems with multiprocessor mode (but I think
    it's because I use the vesa video driver). And I had problems also with
    the kernel the installation copied, wich seemed to use kfs instead of
    fossil.

    Why doesn't install floppy include the sdiahci driver?

    I don't know if other people have problems installing Plan 9 because of
    this. In my case, the main problem was that install CD wouldn't boot in
    AHCI mode. And if I didn't use AHCI, I got I/O errors during install.

    Armando.


  7. Re: [9fans] Installing Plan 9 on a ICH9 SATA controller.

    you're welcome. i'm glad you had success. i apologize that things
    aren't yet seamless.

    i think you've uncovered some dirt in the cracks. intel's zeal for
    multiple programming interfaces does cause trouble in some cases.

    happy hacking.

    - erik

    > Thank you, Erik, it seems that your driver is working perfectly. The
    > problem must be in the driver Plan 9 uses when the controller is working
    > in legacy mode (I suppose sdiahci isn't responsible for that).
    >
    > Apart from that, I had problems with multiprocessor mode (but I think
    > it's because I use the vesa video driver). And I had problems also with
    > the kernel the installation copied, wich seemed to use kfs instead of
    > fossil.
    >
    > Why doesn't install floppy include the sdiahci driver?
    >
    > I don't know if other people have problems installing Plan 9 because of
    > this. In my case, the main problem was that install CD wouldn't boot in
    > AHCI mode. And if I didn't use AHCI, I got I/O errors during install.




+ Reply to Thread