8

I know how to modify interfaces file to enable raspberry pi work under WIFI. But for raspberry pi 2, installed of snappy ubuntu, the file is on a read-only file system and I cannot modify it. Like below:

ubuntu@localhost:/etc/network$ cat interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
ubuntu@localhost:/etc/network$ touch 1
touch: cannot touch ?.?. Read-only file system

Without modifying it, I cannot enable the USB WIFI dongle. How to solve it?

Steve Robillard
  • 34,988
  • 18
  • 106
  • 110
Tom Xue
  • 241
  • 4
  • 10

3 Answers3

1

I connected wifi dongle and didnt see any led indication. after hitting :

sudo ifconfig wlan0

Green LED on Wifi Dongle start indicating its now ready to connect,

now you have to put these lines

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
   wpa-scan-ssid 1
   wpa-ap-scan 1
   wpa-key-mgmt WPA-PSK
   wpa-proto RSN WPA
   wpa-pairwise CCMP TKIP
   wpa-group CCMP TKIP
   wpa-ssid "My Secret SSID"
   wpa-psk "My SSID PSK"

iface default inet dhcp

but the problem is Ubuntu snappy doesnt comes with any text editor not even nano. for that first you have to install it bu connecting it direct to router with ethernet cable

Ghanima
  • 15,958
  • 17
  • 65
  • 125
0

You can remount root file system as read/write then edit any file you like from there. For the text editor you can download nano from here, then copy to your Pi 2 and issue dpkg -i nano_2.2.6-3_armhf.deb... This will install it, or you can use the preinstalled classic vi editor.

Anyway, you still need to download the necessary .deb package for your wifi (i.e. wpa suplant) then install it the same way.

jsejcksn
  • 103
  • 3
chumpon
  • 9
  • 1
0

For anyone still having trouble with this, I found the following blogpost to be invaluable: http://jefflane.org/v2/technology/adventures-with-ubuntu-snappy-prologue/. @chumpon's answer was correct, but didn't provide enough detail for a noob like me.

Basically what it came down to was remounting in read/write mode with mount -o remount,rw / and then editing as root with sudo vi /etc/network/interfaces.d/<interface id>.

Elliot
  • 101
  • 1