Menu

Nanolinux on Android

Georg

Nanolinux on Android

There is a Qemu based package available for Android called Limbo. This allows to run Nanolinux in a Qemu virtual machine on Android.

I run this on my Samsung Android Tablet. But it should also work on an Android phone, however, I doubt if this makes much sense given the small display of the phone.

The virtual machine runs very slow but it does work. The booting process takes very long but you can save the system state with Limbo and resume from there.

I recommend to get yourself an USB adapter cable so you can connect standard USB devices to your Android system. If you use a tiny USB hub you can connect a standard keyboard and a flash disk at the same time.

This is how you set this up:

1. File manager

Install a file manager on your Android system if you have not already done so. I used Astro which I got from Google Play. To copy a file press the file icon for a long time and then select the copy symbol, which are two sheets, from the status bar at the top. Then navigate to the folder where you want to place the file and press the insert button.

If you select the symbol with the three little squares you can rename, view the size of the file plus use other options after you have selected the file first.

2. Keyboard

I recommend to use an external keyboard because the soft keyboard covers a large part of the screen.

Otherwise, install the "Hackers Keyboard" from Google Play on your Android system. Follow the instructions provided to install that.

Additionally to remove the keyboard from the screen you can get into Android settings, select Controls and in there the settings for the Hackers Keyboard. In the section "Key behavior settings" select "Gesture and key actions". Under Hardware key actions bind the "close keyboard" action to the "Volume down" hardware key. This won't interfere with normal use of the volume button while the keyboard is closed.

To bring up the keyboard onto the display select keyboard from the Limbo settings menu while running that. Or stripe down from the top of the screen to get a list of applications from where you can select the Hackers Keyboard. You can also check the box for "Use permanent notification" in the "Key behavior settings" which will then keep an entry in the notifications which you can tap to bring up the keyboard at any point.

3. Install Limbo on Android

Limbo is not available from Google Play. So you have to download it directly with your browser on Android from the Limbo sourceforge site. This is simpler than doing that with your desktop PC as described below.

Alternatively you can use your desktop PC to download the APK file from the Limbo sourceforge site. Then you have to copy this file either to an SD card which you can insert into your Android system or to a flash disk which you can connect using the adapter cable. You can install Limbo from the card or disk directly or copy it first to internal storage with your file manager on Android.

When you select the APK file Android will come up with a warning and allow you to get into settings. Select in Settings/Security (in older versions Applications) Allow application installs from “unknown sources” and, if present, you can also uncheck “Verify apps” to proceed. You should not keep that setting for security reasons though. After Limbo is installed you will find a new Limbo icon which allows you to start Limbo. You may find Limbo if you click on the square of squares in the lower right corner of the home screen.

4. Configure Limbo for Nanolinux

When you start Limbo you will be in the Limbo console first. Select "new" from the "Load VM" input field which will bring up a small dialog window. In there name the settings profile for the virtual machine you will configure now e.g. "nanolinux" and then select "create".

Then you can make the following settings but other settings may also work:

User Interface: SDL
CPU Model: pentium 3
RAM Memory: 128
CDROM: - select Nanolinux ISO image file location
Hard Disk A: make a new 200 MB qcow2 disk image here to be able to save the Nanolinux state.
Boot from Device: CD ROM
Network Configuration: User
Network Card: rtl8139
VGA Configuration: std
Sound Card Configuration: none

When you are done with these settings you can press the start button. The boot process takes very long, but do not give up! Next time you do not need to boot, you can just make a resume. Eventually after a several minutes the Nanolinux desktop will appear.

To improve the performance you can add the following boot options after pressing F2 when prompted: "mc noacpi noapm nousb noscsi dma"

Limbo works faster with lower screen resolutions. So the following settings are recommended:
for phones: vga=785, for tablets: vga=788. This means 640x480x16 for phones and 800x600x16 for tablets. On a tablet you can also use 1024x768x16 which is 791. Add this to the line above e.g. "mc vga=788 noacpi noapm nousb noscsi dma".

There is another wiki page called [Change default video mode for old PCs]. This describes how to select different screen resolutions and how to use UltraISO to patch the nanolinux.iso image file to add these boot options permanently.

5. Run Nanolinux with Limbo

After Nanolinux has booted, in the upper left corner of the Qemu status bar there is a settings button represented by three little squares below each other. If you click on that a menu will appear.

The Keyboard entry in this menu will bring the Hackers Keyboard on the screen. If you made the settings for it as described above you can use the volume down button to remove it again. Otherwise select the keyboard entry again from the menu.

The Mouse entry will enable the mouse trackpad mode. You can move the mouse by moving your finger over the display. To click, tip on the display once. A double-click, however, will open the application twice. If you tap with two fingers this will issue a right-button click.

Tap and hold does drag the mouse, however, this requires some practice. If you move the mouse to the lower right corner of the window to increase its size the cursor will change to a double arrow. In this position lift your finger just enough to avoid that the touch screen will not recognize the finger any more and press it down again and drag. Otherwise the finger press is detected at a slightly different position and then dragging will not work. Also it will take a bit of time for the icon to start to move to the new position or the window to redraw to the new size, so please be patient. If you select a high resolution this requires even more practice. I had problems to use an external mouse properly with Limbo.

The Scaling entry in the menu allows you to select how the desktop is displayed on the Android system. Some settings require a restart of the VM.

If you want to terminate the session, bring up the settings menu and select Save state to save the current state of Nanolinux before terminating and next time resume from that.

The "Save State" selection issues a savevm command to Qemu to save a snapshot of the currently running VM. This snapshot contains the CPU state, RAM, device state and the contents of all the writable disks. I found if you have configured a hard disk image or floppy disk image in addition to the qcow2 disk where the snapshot will be saved, the "Save State" process will never terminate. So if you want to use the resume feature you cannot configure such a disk. If you want to access such a disk you have to use the mount tool in Nanolinux to mount that first.

If you have configured 128 MB of memory the snapshot will have a size of 128 MB on disk. So the qcow2 disk should be configured for 200 MB. However, as far as I am aware Qemu will increase the size of the qcow2 disk as needed though.

The Monitor entry in the settings menu lets you issue Qemu commands while the virtual machine is running. You could also save the state of the VM here, but this snapshot will not be listed in the Limbo drop-down list when you want to resume. Selecting the monitor entry again will exit the monitor.

The commands you can enter here are documented in this wikibook or the Qemu documentation

The command "info snapshots" will display information including the size of the saved snapshots.

To terminate the session select Shutdown VM from the menu to terminate. Save your data before that if possible and required.

Next time you run Limbo, select "Load VM" from the Limbo console to open the Nanolinux VM and then Resume VM State to open the saved state from the drop-down list. The start button will turn into a resume button which you can select to restart Nanolinux.

Have fun!

Addendum:

Windows 98

I also tried Limbo with Windows 98. I had already installed Windows 98 on a 300 MB hard disk image with Bochs in the past, so I just needed to copy that image file to my tablet and configure Limbo to use this hard disk and boot from it.

For Bochs I had made an ISO image of my Windows 98 installation disk using Nero and a 300 MB hard disk image with the bximage utility that comes with Bochs. Then I booted from the installation CD image and installed Windows 98 on the hard disk image using Bochs. This should also work with Limbo but it will probably take a looooong time till you are done.

FreeDOS

FreeDOS can be downloaded as a floppy disk image called metados. Configure this as floppya in Limbo and press the start button.


Related

Wiki: Change default video mode for old PCs