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?

4
  • 1
    Ugh, I cannot believe that is how Snappy works by default -- what a stupid thing to push on rpi users. Anyway, I think your question should be, "How can I use Snappy Core with a normal read-write filesystem?"
    – goldilocks
    Commented Feb 26, 2015 at 16:02
  • 1
    The obvious and simple but PITA method would be to take the card out and edit it on another system. If you add the output of mount (with no args) and cat /etc/fstab to your question I can tell you how to try and temporarily or permanently remount the root filesystem rw so you can make changes, then remount back ro if you want.
    – goldilocks
    Commented Feb 26, 2015 at 16:05
  • I don't pretend to understand this developer.ubuntu.com/en/snappy/guides/filesystem-layout but it implies that folders on the third partition are overlaid onto the main partitions dynamically on next boot. "The init system will then handle creating the appropriate mounts, overlaying the writable elements on top of the read-only core root filesystem. Note that since the /etc/fstab is generated dynamically, it should never be modified manually"
    – rob
    Commented Feb 26, 2015 at 16:29
  • This is also the filesystem behaviour for OpenELEC Kodi 5.0.6
    – user28114
    Commented Mar 18, 2015 at 2:55

3 Answers 3

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

1
  • Ubuntu Core per default includes vi like every UNIX.
    – Sybil
    Commented Dec 25, 2018 at 17:32
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.

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>.

Not the answer you're looking for? Browse other questions tagged or ask your own question.