To update the list on what I've done. I tried Andrew's suggestions
below, but entries in the blacklist file don't seem to make a
difference. I believe that this is either because a) the initramfs
process does not look at the /etc/modules directory or b) The scripts
mentioned in the link here:
http://etherboot.org/wiki/sanboot/ubuntu_iscsi2 do the loading of the
drivers explicitly. Though, if "b" was the explanation, I would expect
them to be loaded in the same order each time.
What I ended up doing was adjust this portion of the
/etc/initramfs-tools/scripts/local-top/iscsi file (hopefully, the
formatting comes across ok):
until ifconfig ${netdev}|grep -q "inet addr"; do
for netdev in `ifconfig -a|grep Ethernet|cut -d' ' -f1`; do
# Do a round-robin search for dhcp servers
ip link set ${netdev} up
# try to bring up the interface
ipconfig -t 2 -c dhcp -d ${netdev}
# Get an IP
if ifconfig -a|grep -q "inet addr"; then break 2; fi
# If we have got an address, stop searching.
# If we are here, then we have a problem, remove and re-add the NIC
rmmod forcedeth
# <--- Remove the NIC driver
sleep 1
# <--- Give it some time
modprobe forcedeth # <--- Re-add the NIC driver
sleep 2 # <--- Give it some time
done # end of netdev probing
CNT=$((${CNT} - 1))
if [ ${CNT} = 0 ]; then
echo "No dhcp servers found!"
exit 0
fi
echo "Tries left: ${CNT}"
done # end of until
I added the four lines below "If we are here, then we have a problem..."
Not the cleanest solution, but it has been reliable.
Thanks again Andrew for your help. If nothing else, you helped confirm
that I was looking in the right direction.
-Chad
On 01/19/2011 08:23 AM, Andrew Bobulsky wrote:
> Hello Chad,
>
> As a disclaimer, I've got next to no idea how device drivers on Linux
> work, so I've only got some guesses for you ;)
> I suspect you might be right about driver load order having something
> to do with it. Specifically, in your non-working example's dmesg
> output:
>
>
>> [ 1.249252] forcedeth 0000:00:0a.0: PCI INT A -> Link[LMAC] -> GSI 20
>> (level, low) -> IRQ 20
>> [ 1.249350] forcedeth 0000:00:0a.0: setting latency timer to 64
>> [ 1.302279] Loading iSCSI transport class v2.0-870.
>> [ 1.315354] forcedeth 0000:00:0a.0: ifname eth0, PHY OUI 0x732 @ 1, addr
>> 90:fb:a6:2b:ee:ff
>> [ 1.315450] forcedeth 0000:00:0a.0: highdma csum pwrctl gbit lnktim msi
>> desc-v3
>>
> I'm unsure as to whether the iSCSI driver used here cares whether or
> not a NIC is available before it goes hunting for the iBFT, but it
> could be possible. It looks like Linux kernels are designed to not
> care a whole lot about device driver load order... which seems odd to
> me, but I'm sure there's a reason for it.
>
> While the blog post I found is a little dated, the technique (though a
> little convoluted!) may likely still apply. Take a look here:
> http://rackerhacker.com/2009/01/26/linux-adjust-storage-kernel-module-load-order/
>
> Doubling down on that disclaimer again, the following suggestion is a
> complete guess:
>
> First, open your /etc/modprobe.d/blacklist file and add iscsi on to
> the end of it.
> Then, open your /etc/modules file and specify the forcedeth driver
> followed by the iscsi driver.
>
> Might work :P
>
> Best regards,
> Andrew Bobulsky
>
>
> On Wed, Jan 19, 2011 at 8:35 AM, Chad Voelker<[email protected]> wrote:
>
>> Hello,
>>
>> I apologize for being slightly off-topic...
>>
>> I have a Ubuntu 10.04 Myth frontend that I'm trying to get booting with
>> iSCSI. gPXE is working, and attaching the iSCSI drive and initiating the
>> boot sequence on the iSCSI drive. Following the guide here:
>> http://etherboot.org/wiki/sanboot/ubuntu_iscsi2, it sometimes fails on the
>> file /etc/initramfs-tools/scripts/local-top/iscsi where it tries to call
>> ipconfig to get DHCP info (even though the server is there and fine,
>> otherwise we wouldn't have gotten this far).
>>
>> This works somewhere around 1 out of 3 boots. What I've noticed in dmesg is
>> that when working, the iSCSI driver is loaded near the end of the process.
>> I've listed (trimmed) versions of the dmesg output below, if you need the
>> complete output let me know.
>>
>> Is there somewhere that I can dictate the order that things are loaded? Any
>> other ideas?
>>
>> Thanks.
>> -Chad
>>
>> dmesg (entries that are repeated / unimportant are shortened with a "...")
>>
>> Working...
>>
>> [ 0.947158] udev: starting version 151
>> [ 1.115166] ahci ...
>> [ 1.132935] scsi0 : ahci...
>> [ 1.252750] ata1: SATA max UDMA/133 ...
>> [ 1.253462] forcedeth: Reverse Engineered nForce ethernet driver. Version
>> 0.64.
>> [ 1.254782] ACPI: PCI Interrupt Link [LMAC] enabled at IRQ 23
>> [ 1.254869] forcedeth 0000:00:0a.0: PCI INT A -> Link[LMAC] -> GSI 23
>> (level, low) -> IRQ 23
>> [ 1.254965] forcedeth 0000:00:0a.0: setting latency timer to 64
>> [ 1.318176] forcedeth 0000:00:0a.0: ifname eth0, PHY OUI 0x732 @ 1, addr
>> 90:fb:a6:2b:ee:ff
>> [ 1.318264] forcedeth 0000:00:0a.0: highdma csum pwrctl gbit lnktim msi
>> desc-v3
>> [ 1.348043] usb 2-3: ...
>> [ 1.572051] ata1: SATA link down (SStatus 0 SControl 300)
>> [ 1.572193] ata2: SATA link down (SStatus 0 SControl 300)
>> [ 1.600025] ata6: SATA link down (SStatus 0 SControl 300)
>> [ 1.600139] ata3: SATA link down (SStatus 0 SControl 300)
>> [ 1.600146] ata4: SATA link down (SStatus 0 SControl 300)
>> [ 1.600202] ata5: SATA link down (SStatus 0 SControl 300)
>> [ 1.619530] Loading iSCSI transport class v2.0-870.
>> [ 1.667310] iscsi: registered transport (tcp)
>> [ 1.678221] iBFT detected at 0x93350.
>>
>> Not Working...
>>
>> [ 0.947224] udev: starting version 151
>> [ 1.247791] forcedeth: Reverse Engineered nForce ethernet driver. Version
>> 0.64.
>> [ 1.249164] ACPI: PCI Interrupt Link [LMAC] enabled at IRQ 20
>> [ 1.249252] forcedeth 0000:00:0a.0: PCI INT A -> Link[LMAC] -> GSI 20
>> (level, low) -> IRQ 20
>> [ 1.249350] forcedeth 0000:00:0a.0: setting latency timer to 64
>> [ 1.302279] Loading iSCSI transport class v2.0-870.
>> [ 1.315354] forcedeth 0000:00:0a.0: ifname eth0, PHY OUI 0x732 @ 1, addr
>> 90:fb:a6:2b:ee:ff
>> [ 1.315450] forcedeth 0000:00:0a.0: highdma csum pwrctl gbit lnktim msi
>> desc-v3
>> [ 1.325446] ahci ...
>> [ 1.327784] scsi0 : ahci...
>> [ 1.330959] ata1: SATA max UDMA/133 ...
>> [ 1.352040] usb 2-3: ...
>> [ 1.648030] ata2: SATA link down (SStatus 0 SControl 300)
>> [ 1.648131] ata1: SATA link down (SStatus 0 SControl 300)
>> [ 1.652029] ata4: SATA link down (SStatus 0 SControl 300)
>> [ 1.652122] ata5: SATA link down (SStatus 0 SControl 300)
>> [ 1.652132] ata3: SATA link down (SStatus 0 SControl 300)
>> [ 1.656026] ata6: SATA link down (SStatus 0 SControl 300)
>> [ 1.672896] iscsi: registered transport (tcp)
>> [ 1.683754] iBFT detected at 0x93350.
>>
>>
>> _______________________________________________
>> gPXE mailing list
>> [email protected]
>> http://etherboot.org/mailman/listinfo/gpxe
>>
>>
>
_______________________________________________
gPXE mailing list
[email protected]
http://etherboot.org/mailman/listinfo/gpxe