I'm connecting to internet with my pc using Ethernet cable, I just have one internet cable input and one RJ45 cable, so I cant share internet with my Raspberry.

is there any solution to install Rapsbian packages from Ubuntu by just accessing Raspbian SD card on Ubuntu and using chroot command, and run apt-get as though I'm on raspberry??

  • do they sell routers, switches and hubs in your country? get one and share the internet connection. – lenik Oct 4 '14 at 12:50
  • 1
    I believe you can tell apt-get to download a specific architecture. Obviously, you'd have to add the Raspbian archives to your system and then run apt-get specifically targeting the RPis arch, but it should be doable. – RPiAwesomeness Oct 4 '14 at 14:17
  • When I first got my Pi I went down this route, downloading individual .deb packages and copying them onto the SD card then booting the Pi then installing them only to find I was missing just one more dependency. usb wifi is very cheap and a better long term solution. – rob Oct 6 '14 at 10:11
  • @rob yes this is the problem, I want to use usb wifi, but before i should install driver, so I would use the sd card on ubuntu to install the driver – mikmik Oct 6 '14 at 10:26
  • a number of the usb wifi devices work out of the box. I have a Tenda device id 148f:5370 that just works and another (make) that does not work on the Pi until I have connected via ethernet and run sudo apt-get update; sudo apt-get upgrade. – rob Oct 6 '14 at 12:16

First, install two packages on your Ubuntu system: qemu-user, and proot.

After you mount the Raspbian SD card, you can do the equivalent of a 'chroot' with:

sudo proot -q qemu-arm -S /mnt/path/to/raspbian/

From there, you can use apt-get commands as though you are actually on the Raspberry Pi. (Use the exit command to exit.)

  • I got this error with -S option proot error: unknown option -S. proot error: see proot --help or man proot. i removed -S and apt-get not working ,???? – mikmik Oct 21 '14 at 17:42
  • 2
    Bah, proot keeps changing their commandline options. If one of the following forms of the command works for you, let us know. sudo proot -q qemu-arm -B -r /mnt/path/to/raspbian/ or sudo proot -Q qemu-arm -r /mnt/path/to/raspbian/ – nerd65536 Oct 22 '14 at 12:55
  • 1
    sudo proot -q qemu-arm -B -r ./rootfs-mnt did the job for me on Raspbian 2015-05-05 – Isaac May 14 '15 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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