VirtualBox simulator and emulator - now with added Cow


87 posts   Page 1 of 4   1, 2, 3, 4
by nick.mccloud » Wed Feb 08, 2012 2:59 pm
You can download the VirtualBox image here:

http://dl.dropbox.com/u/606232.....ualBox.zip

If you need VirtualBox (a free download):

https://www.virtualbox.org/wiki/Downloads

User is rpi and password is password.

The Ubuntu host that the VirtualBox image provides has Python & Geany installed on it so you can follow the programming tutorials at:

http://www.youtube.com/user/Ra.....iTutorials

If you wish to emulate an actual ARM device, launch LXTerminal and:

./getDebian

which will download and unpack the Debian ARM disk image, a kernel and a launch file.

cd debian

./launchDebian

Enter the password for sudo (remembering that the password is password) and it will show a couple of lines of setup.

Launch xtightvncviewer from right at the bottom of the Other menu (click bottom left to get to the menus).

Type localhost and press return.

This will connect you to the Debian ARM 'screen' so you can actually see something.

Login as root, password is password.

cat /proc/cpuinfo and lo, you are in a copy of Debian that is running on an ARM processor.

Nothing is installed expect the bare minimum to get you in - it does have apt sources setup so you can start installing straightaway.

If you want to really confuse yourself, why not setup just like the Ubuntu host is:

apt-get install lxde xorg python geany

Ensure you click in the VNC viewer window so that when you are asked for keyboard/character set options you see the dialog boxes come up. If you forget, just click and press an up or down key to get the window to refresh.

As LXDE isn't keen on the root user logging in, add a new user:

adduser userNameOfYourChoiceHere

You will be prompted to enter a new password - it is important that you remember it!

Reboot:

shutdown -r now

and when it comes back, you can login with your new user and password. You can surf the internet with IceWeasel (a bug fixed version of FireFox) and program Python with Geany.
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by nick.mccloud » Wed Feb 08, 2012 3:08 pm
Added cow?

The debian root file system has been copied over from a 4Gb raw file to an auto-expanding cow2 file. So it no longer takes up a huge amount of space for no apparent reason.
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by hugorodrigues » Thu Feb 09, 2012 2:14 am


Absolutely Amazing!

The BEST dev and emulator enviroment for RPI

Thanks for sharing!

-- HR
Posts: 1
Joined: Thu Feb 09, 2012 2:11 am
by RaTTuS » Thu Feb 09, 2012 10:44 am
excellent

you win the internet for today
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
"That's not right, the badgers have moved the goalposts."
User avatar
Posts: 5003
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by rurwin » Thu Feb 09, 2012 11:29 pm
Very good. Using your files I"ve got a RPi VM up and running on this Linux box.

There are a couple of things I"ve noticed though.

1. The keyboard is set to US-101 (I think.) There is no hash key and the back-slash is moved when it is accessed with a UK-102 keyboard.

To fix: "apt-get install keyboard-configuration" in the RPi. It prompts you to ask what keyboard you're using.

2. Only VNC access to the console framebuffer. No huge screen buffer to scroll back over like I'm used to.

Is it worth installing SSH on the RPi VM and adding  to launchDebian?

To fix: "apt-get install ssh" in the RPi, install ssh on the host. Then add "–redir:22::2222" to launchDebian. Then "ssh -p 2222 127.0.0.1" gets you a command window onto the RPi, and you can open more than one.

I don't know if these are worth adding to the image, but if not this might help someone.
User avatar
Forum Moderator
Forum Moderator
Posts: 2904
Joined: Mon Jan 09, 2012 3:16 pm
by nick.mccloud » Fri Feb 10, 2012 9:28 am
Thanks for this - I'll add them to the not yet released release notes.
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by rurwin » Fri Feb 10, 2012 11:08 am
I'm still having problems with the keyboard when run from Windows. Adding  the qemu flag "-k en-gb" helps, but it still looks like a US keyboard on the RPi, even though that flag and the guest keyboard-configuration is set to UK.

Is anyone else seeing this?
User avatar
Forum Moderator
Forum Moderator
Posts: 2904
Joined: Mon Jan 09, 2012 3:16 pm
by ta2025 » Mon Feb 20, 2012 6:22 pm
I would love to download, but the dropbox image has been throttled.  Is there an alternative?
Posts: 5
Joined: Wed Jan 25, 2012 6:29 pm
by ta2025 » Wed Feb 22, 2012 8:46 pm
rpi@RaspberryPi:~$ su -
Password:
su: Authentication failure
rpi@RaspberryPi:~$

"password" is not working for me as the root password?

nm... being linux stupid... its been awhile.
Posts: 5
Joined: Wed Jan 25, 2012 6:29 pm
by scudderfish » Thu Feb 23, 2012 8:09 am
Do

sudo su -

Then your user password will get you to root.

Regards,

Dave
Posts: 2
Joined: Thu Feb 23, 2012 8:06 am
by nick.mccloud » Thu Feb 23, 2012 3:01 pm
DropBox has hit it's limit - see Simulator & emulator downloads for a new link
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by djdumbass » Sat Mar 03, 2012 8:16 pm
when we have this configured like we want, can we just dd debian.qcow2 to sdcard & boot?
Posts: 1
Joined: Sat Mar 03, 2012 7:48 pm
by jojopi » Sat Mar 03, 2012 10:51 pm
djdumbass said:


when we have this configured like we want, can we just dd debian.qcow2 to sdcard & boot?


No.  At minimum you would need to convert the image back to raw format, and then combine it with a valid partition table and a working RasPi boot partition to form a bootable disk image.  Some of the Pi-specific files like the accelerated video client may be missing as well.

If, however, you use the official debian6-17-02-2012.img directly in qemu as in the thread Official image and QEMU then you should still be able to dd that image afterwards.
User avatar
Posts: 2040
Joined: Tue Oct 11, 2011 8:38 pm
by Jim Manley » Sun Mar 04, 2012 9:35 am
When I try to launch the VirtualBox image, I get a "Cannot access the kernel driver" error.  The zip file seemed to extract fine to a .ova file, and VirtualBox lists it just fine, indicating it's a valid archive file (at least in the header?), but, perhaps something beyond the header got munged?

Thanks!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!
User avatar
Posts: 1356
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, USA
by nick.mccloud » Sun Mar 04, 2012 12:23 pm
djdumbass said:


when we have this configured like we want, can we just dd debian.qcow2 to sdcard & boot?


I'll write up some instructions on using the official release Debian image file - you can directly access the partition via the emulator with the right command line.
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by nick.mccloud » Sun Mar 04, 2012 12:31 pm
Jim Manley said:


When I try to launch the VirtualBox image, I get a "Cannot access the kernel driver" error.  The zip file seemed to extract fine to a .ova file, and VirtualBox lists it just fine, indicating it's a valid archive file (at least in the header?), but, perhaps something beyond the header got munged?


Can you tell me when you downloaded, where you downloaded and the file name of the download so I can check this out.

Also, what OS are you using & what version of VirtualBox.
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by Jim Manley » Mon Mar 05, 2012 12:34 am

When I try to launch the VirtualBox image, I get a "Cannot access the kernel driver" error.  The zip file seemed to extract fine to a .ova file, and VirtualBox lists it just fine, indicating it's a valid archive file (at least in the header?), but, perhaps something beyond the header got munged?

Can you tell me when you downloaded, where you downloaded and the file name of the download so I can check this out.

Also, what OS are you using & what version of VirtualBox.


VirtualBox 4.1.8r75467

VirtualBox R-Pi image downloaded from about 0400 through 0730 GMT Sunday from http://dl.dropbox.com/u/606232.....ualBox.zip

Obviously, given the size of this file and the slow speed of my Internet connection (averaging ~80Kbps), downloading it again isn't going to be much fun.

Windows 7 Home Premium 64-bit with all updates through today.

Thanks!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!
User avatar
Posts: 1356
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, USA
by nick.mccloud » Mon Mar 05, 2012 9:01 am
Jim Manley said:


VirtualBox R-Pi image downloaded from about 0400 through 0730 GMT Sunday from http://dl.dropbox.com/u/606232.....ualBox.zip


Somewhat confused here - since last Wednesday that file is a tiny zip file with a bittorrent link in it - LinuxFormat published the link so we had to make alternative arrangements for bandwidth & capacity.

Assuming you did a bittorrent download from that zip file, at least I know you are getting the file from source.

I've had no other reports of issues and the share ratio is running in to three figures now. I'll download it to a clean machine just to be sure - can you try it on a different machine at all?
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by monkeyra » Mon Mar 05, 2012 4:36 pm
Hi,

I've added the file to my CDN, so there's another backup now if needed:

http://www.rpiforum.net/forum/.....irtualbox/

I've pointed people to this thread for further support.

Cheers

Nick
Want a FREE 4GB SD Card?

Click here for details:
http://www.rpiforum.net/forum/topic/56-raspberry-pi-tutorials-guides-how-tos-free-4gb-sd-card-for-all-submissions/
Posts: 39
Joined: Sun Mar 04, 2012 1:24 pm
by Jim Manley » Mon Mar 05, 2012 6:46 pm
Sorry, yes, the zipped file contained the torrent link and it did point to the large shared .ova archive, which I did download, obviously, and VirtualBox seemed to think it was a valid archive at some level.  I do have some XP systems I can copy the archive to and try opening with VirtualBox, and I'll let you know whether that worked.

Thanks!

nmcc said:


Jim Manley said:


VirtualBox R-Pi image downloaded from about 0400 through 0730 GMT Sunday from http://dl.dropbox.com/u/606232.....ualBox.zip


Somewhat confused here - since last Wednesday that file is a tiny zip file with a bittorrent link in it - LinuxFormat published the link so we had to make alternative arrangements for bandwidth & capacity.

Assuming you did a bittorrent download from that zip file, at least I know you are getting the file from source.

I've had no other reports of issues and the share ratio is running in to three figures now. I'll download it to a clean machine just to be sure - can you try it on a different machine at all?

The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!
User avatar
Posts: 1356
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, USA
by AnotherToothbrush » Mon Mar 05, 2012 6:59 pm
You could not have imagined my sheer happiness when I saw the download was an extremely small 15kB.

I should"ve known nothing good is THAT small
Posts: 3
Joined: Mon Mar 05, 2012 6:35 pm
by nick.mccloud » Mon Mar 05, 2012 8:59 pm
I'll download the torrent to a clean machine myself and run QA on it in the morning (my morning is 8am GMT).
User avatar
Posts: 795
Joined: Sat Feb 04, 2012 4:18 pm
by AndyInSurrey » Mon Mar 05, 2012 9:02 pm
That is very good. Downloaded and installed VirtualBox onto my iMac and then downloaded the torrent for the RPi virtual box.  All just works as described I found no problems what so ever.  A big thanks to you for this, fabulous.
Posts: 20
Joined: Mon Mar 05, 2012 8:45 am
by Jim Manley » Tue Mar 06, 2012 4:20 am
OK, copied the .ova archive over to an XP machine and (after upgrading VirtualBox to the current 4.1.8) it immediately opened the archive for import.  The import succeeded and the Ubuntu image booted right up.  I rebooted my original Windoze 7 machine and tried again and, voila, VirtualBox imported and booted into Ubuntu.

So, for those who aren't experts at VirtualBox on Windoze (I avoid MS if at all possible), you may need to reboot Windoze if it's been running for a while and building up cruft.  One of the nice things about having (multiple, eventually) R-Pi boards running Linuxen anywhere and everywhere is that it will become that much easier to eventually ditch Windoze altogether, when I can turn down even the occasional paid Windoze work project where the paying customer is always right (at least to their face ;)

Now, to get the Debian image up and running.  Thanks again!

BTW during forum access from California, the R-Pi server throws database and HTTP 500 errors the vast majority of the time.  I've given up even trying to post in reply to blog comments, since the Wordpress spam filter is apparently waaay over-reacting and keeps asking for the password to be typed in dozens of times before one successful post.  Others have been having the same problem.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!
User avatar
Posts: 1356
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, USA
by Newbie » Tue Mar 06, 2012 8:58 am
Some things that non-UK newbies may not realize about the emulated R-Pi:

- The VirtualBox Ubuntu session starts with the keyboard mapped to UK keys, so, some keys are in odd places (@ is ", # is £, | is ~ ...), and some seem to not be available (vertical pipe: | ???).  I haven't been able to find a VirtualBox setting option for the keyboard, which the VirtualBox Help just says is mapped to a PS/2 keyboard.

- The xtightvncviewer Debian session starts with a very small typeface that's not ideal for reading on smaller screens (e.g., netbooks, small TV screens - even HDTV displays).  It's not clear how to change the default typeface, and the terminal doesn't seem to be set to anything (e.g., $TERM isn't set to tty, xterm, etc.).  It's not clear how the xtightvncviewer typeface can be changed to a larger size, and $TERM doesn't seem to have the desired effect in setting the terminal type.  This is a bit surprising, since every Linux variant I've used has the typeface and terminal set to one of the more common options.  Perhaps no one has gotten around to making the values something a bit more friendly for smaller screens, or it's a reflection of the more restricted R-Pi memory and filesystem size environment (i.e., around 200 MB RAM and the typical smaller sizes of SD cards used for these kinds of projects, e.g., 1 ~ 2 GB).

Some help with these nits would be greatly appreciated.  Google searches brought up pretty much everything about xtightvncviewer and Debian terminal settings except those noted above.
Posts: 17
Joined: Tue Mar 06, 2012 8:00 am