The fact that the kernel appeared to crash when you plugged in the wifi adapter would seem to indicate a psu stability problem. Do you have a powered hub you can plug the wifi in to? There have been quite a few people who have had similar problems and then moved the wifi to a hub or tried a different PSU and then found the wifi installed OK.
Some of the errors you saw after rebooting were almost certainly due to the crash and it's possible the image could be corrupted in some way. You could always write a new image to the SD card and try installing again but I'd recommend you try with the wifi in a powered hub if you have one.
I don't have a powered hub around atm but i will look into this.
but there are still two questions that bother me:
why was it working in xbian just fine?
why would i need to plug the adapter during install and not before? whats the difference?
There is a driver included in the kernel that is supposed to support wifi adapters using the rtl8188cus chip but it doesn't work and can cause the kernel to effectively hang if the adapter is plugged in before the working driver is installed and the broken driver is disabled.
Regarding XBian it could be it uses a little less power allowing more for the wifi adapter without upsetting the Pi. Or with 2012-08-16-wheezy the reboot was just an unlucky occurence. Plugging in the wifi could have caused a current spike that upset the kernel. Difficult to tell without checking voltage levels on the Pi and USB ports.
Check back through this thread and elsewhere on the forum and you will find plenty of people reporting similar issues which were fixed by either using a powered hub for the wifi or changing the power supply.
UPDATE: I've just run some tests on a fresh 2012-08-16-wheezy-raspbian image which gave interesting results. Explains why your adapter would not connect originally.
OK. Created a new image. Plugged it into the PI. Plugged the wifi adapter, EW-7811Un, into the Pi's USB port. Powered on and waited for it to boot. Gets to the point where it displays the message
Code: Select all
cfg80211: Calling CRDA to update world regulator domain
and then appears to hang. However, after a short delay screen starts outputting a load of messages
Code: Select all
udev: timeout: killing '/sbin/modprobe -b usb:v7392p7811d0200dc00dsc00dp00icFFicsFFipFF' 
This is refering to the wifi adapter. v7392p7811 is the USB id of the wifi adapter and probably due to the faulty driver included in the image. Eventually the logon prompt appears. Logged on and then ran the script. Stopped after inputting the ssid as it said it was not visible.
Checked file /etc/udev/rules.d/70-persistent-net.rules. It did not exist. It should be there and have a line referencing the wifi adapter as "wlan0" as this is the first wifi installed. I believe it's not there because of the error messages referencing udev above. A problem because of the non-working driver included in the kernel images I expect.
Then removed the wifi adapter and rebooted. Logged on and ran the script, plugging in the wifi when told to, and installed the wifi without problems.
I'm certain it did not connect the first time because /etc/udev/rules.d/70-persistent-net.rules did not exist. When a wifi device is plugged in an entry is normally made in this file tying the MAC address of the wifi adapter to the wifi name "wlan0" or whatever depending if more than one is configured. It can, however, cause problems if it contains an invalid entry which is why I asked you to look at it in the first place.
There appears to be a way round this which allows you to plug in the wifi adapter before running the script. You need to generate the file /etc/modprobe.d/blacklist.conf with a line "blacklist rtl8192cu" included in it.
Start with a new image with the driver and script in the /boot directory, power on and do the necessary raspi-config setup and then reboot. Now run the commands
Code: Select all
echo "blacklist rtl8192cu" >> /etc/modprobe.d/blacklist.conf
This will add the line to the file and stop the faulty driver loading and allow you to run the Pi with the wifi plugged in before installing then driver. Now shutdown the Pi
, power off, plug in the wifi adapter, power on and boot. After logging in run the script. This should start the wifi and allow the script to finish and run the updates. The updates will install a new version of linux so when it finishes you will need to reboot, but the wifi will not run after the reboot due to the new kernel revision, and so run the script one more time to complete the installation
, requiring you to download a new driver version in the process. Hopefully you will end up with a working wifi adapter.
Let me know how you get on.
Update: good to hear you've manged to finally get it running. Just need to update the driver to handle the latest kernel update.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra
Please post ALL technical questions on the forum. Please Do Not send private messages.