2

I have a Raspberry Pi 3 and would like to create a virtual environment on my PC to install and configure the OS directly to the SD card, then remove the SD card from my PC and boot with my Pi.

This has to be possible I just don't know how. Doing this will keep me from dragging my mouse and keyboard and internet connection back and forth to the other room. Any thoughts?

2

$20 gets you a new wired USB keyboard and mouse dedicated for your Pi. :)

2

There is a simple way to access/configure your RPI directly on the laptop without screen and keyboard using ssh.

You can access your raspberry pi, you need to set its IP in the same subnetwork as your computer. For example, if your IP is 192.168.0.123, you set your rpi address to 192.168.0.X , X being between 2 and 254 and different from your computer IP.

To do so, you have to edit /etc/network/interfaces file of your rpi and set the IP as static, accessing the file system by the sd card.

You can then ssh your board. If you have no network, you can even also access it using an ethernet cable between your machine and RPI.

Copy pasted from my answer here: https://stackoverflow.com/questions/37516877/remote-build-c-program-on-raspberry-pi/37529386#37529386

1

This has to be possible I just don't know how.

Don't be so sure. The only emulator I'm aware of which is widely available for any model of Pi is QEMU, and while that definitely can be used to emulate the BCM 2835 based models (A/B/+/0), and there is some indication that it might be usable to emulate the BCM 2836 (i.e., the Pi 2), the status of the BCM 2837 (i.e., the Pi 3) is unclear. By this I mean I don't think there is an image specifically for it, but should be plausible to use a generic 64-bit ARMv8 (aka. aarch64) image and run Raspbian within that.

[You don't actually mention an OS, but hopefully you can extrapolote -- I'll just refer to Raspbian.]

This would mean not using the real Pi kernel and not having access to certain physical features which would be a bit meaningless in an emulator anyway, except perhaps to test software exploiting those physical features (the GPIO, the camera interface, the onboard wifi and bluetooth).

Whether this would seriously impact what you want to do I'm not sure. Note that some pi-specific configuration involves files on the boot partition, so you will have to make arrangements for that if you want to use, e.g., raspi-config, which by default is run the first time you boot Raspbian.

It's worth noting that since Raspbian (and as far as I am aware, all the other potential operating systems; Windows IoT may be an exception) is identical regardless of model except for the kernel, you could use one of the other QEMU images and the only thing it will make any difference to that I can think of off-hand is configuring the serial console, which uses a different device node on the 3.

I am fairly certain you should be able to download, install, and configure most software using the distro package manager (on Raspbian, apt) that way, but getting this all working correctly, especially without any previous experience using and configuring a Pi, is very unlikely to be easy.

Doing this will keep me from dragging my mouse and keyboard and internet connection back and forth to the other room. Any thoughts?

Yes: If you follow this path you will be begging and pleading to "drag" a keyboard from room to room instead within a few hours.

Put another way, it may not be impossible, but it is going to require much more effort, not less.

  • I didn't mention an OS because I am not sure yet which will best suit my needs and I may us several depending on function, My goal is to be able to modify the device from my pc with out having to directly be in front of the device. Would it be easier to use SSH, or RDP into the device instead? The downside here is I have to install the OS on the SD before I can do that. I would prefer to set-up everything from my PC and just insert the SD with everything on it already. The thought is to have OS's with different functions preinstalled on SD and just swap them to change the device function. – Jeffery Carter Jun 19 '16 at 18:53
  • I'm sure many people would prefer some of those things, but keep in mind this is a device created with economy in mind, from scratch, by a start-up company which, although they have increasingly started to contribute software to Raspbian and distribute their own official version of it, isn't directly responsible for any operating system software for the device. Put another way: This is not a plug n' play toy put out by a multi-billion dollar international corporation targeting a mass consumer audience. – goldilocks Jun 19 '16 at 19:48
  • You get what you pay for, so to speak. There's no deception in that, and it is great for what it is (perhaps as in "historically significant" great), but I think some people are caught a little off guard and frustrated by a whole realm that is probably different than anything they are used to. It make require some patience, dedication, an open mind, and occasionally "dragging things back and forth". Good luck and don't expect to get too much done too fast. There is a learning curve in front of you. – goldilocks Jun 19 '16 at 19:48
1

This is not an answer to the question you asked, which is difficult if not impossible.

On the other hand if you do not wish to keep "dragging my mouse and keyboard and internet connection back and forth to the other room" this is easily solved.

Most distributions are easier to setup INITIALLY with a keyboard and mouse, but once this is done you can configure and operate your system remotely with a combination of ssh and VNC.

I have 5 Pi and a large number of SD Cards with different OS and/or setups which I swap between Pi. These are all configured with ssh, ftp or other remote protocol (I use netatalk).

  • I wonder how many SD cards you have. – PNDA Jun 20 '16 at 10:23
1

Recent versions of QEMU aim to directly emulate the Raspberry Pi 1 , 2 and even 3 instead of "Versatile PB". You should especially keep an eye on QEMUs "user mode" emulation feature which sadly only works on Linux.

You can directly modify SD card images "from the inside" (apt-get etc.) this way !

To get an idea of the power of this approach in combination with chroot-ing read this blogpost :

http://sentryytech.blogspot.de/2013/02/faster-compiling-on-emulated-raspberry.html

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.