https://frrl.wordpress.com

A site of endless curiosity

50 MB of Penguin Power – PC Emulator with Embedded Linux

leave a comment »

DSL – Damn Small Linux

By now you have probably heard about Linux. Maybe you wanted to try it out and see what it was all about. Then you found out that to install Linux you had to create a new partition on your hard disk, or buy a new hard disk, make a dual boot system, or otherwise disturb your beautiful MS Windows operating system. Then, if you got it installed how would you get if off your system when you were done playing with it? How would you get rid of the dual boot software – grub or lilo – and get the Microsoft boot blocks back on your hard disk?

Well heck, where there is a will there is a way.

50MB of Penguin Power

There are quite a large number of different Linux distributions. Each is different in some way addressing a specific need or accentuating some feature.

These days, USB jump drive (really solid state memory emulating a hard disk) are really cheap. At the time of this writing a 2GB MB drive is about $40.  Back in the days when USB jump drives were still relatively expensive someone came up with a “Damn Small Linux” that would not only fit on a USB jump drive but would also boot from that USB drive. In this way, you could “bring Linux with you”. That is, you could carry Linux and all your files on your keychain USB drive, walk up to any computer no matter what Operating System it had, and boot your Linux and do your thing. On the downside of this perfect world, was the fact that the computer you walked up to had to be able to boot from USB. Many computers do not have this capability.

But there is another way. Lets say that you wanted a “Damn Small Linux” on a USB jump drive that you could walk around with and still use it on any computer that had at least MS Windows. That is, run Linux under MS Windows. If you could just “double click” and run Linux as an application under MS Windows – well, that would be great – the underlying MS Windows operating system would not be disturbed running Linux as a simple application.

So how would that happen? Some folks took the time and effort to bundle a “Damn Small Linux” with a software PC emulator and they made it all free for anyone to use. So, here”s the deal. The PC emulator has a Linux operating system embedded within it and when you boot the emulator it boots Linux and all this happens under MS windows on the real hardware. It all sounds complex, and it is, but some guys did a lot of work so you don”t need to be concerned with that complexity. The complexity is all hidden from you. And, it all fits in 50 MB of disk space – plenty small for a common  jump dirve. And truth be told, this application can be any place on your hard drive.

How to do it in 3 steps

1. Get the DSL Linux distribution. You can get it from this site. The file you want is dsl-4.2.5-embedded.zip. This is the PC emulator with an embedded Linux operating system that runs under MS Windows as an application.  Here is the home site for DSL Linux

2. Unzip the file to the location of your choice.

3. Double click the batch file dsl-base.bat to start the PC emulator and run Linux.

a minute or so later…

Your Karma Tested

Now if your Karma is in good order, the emulator will start and Linux will boot with a Graphical User Interface. If your Karma is in the best order then you not only will have a running Lunix OS but you will find yourself connected to the internet through the LAN card in your PC. A home network with a router supporting DHCP contributes to the best Karma. We assume that all frrl.net readers have the best Karma.

Once you click on the Linux window the emulator will capture your keyboard presses and mouse clicks and send them to Linux. To get back to MS windows hold down the ctrl and alt keys. This releases the capture and sends user input back to MS Windows. Click in the Linux window to get back to Linux. You will get the hang of this.

Now What

There are plenty of “how to”s” on the Internet that talk about UNIX written for various levels of user expertise. So, its up to you to read up, play, and learn something. You are running Linux in a “rubber room” (virtual PC) and there is nothing you can do to really “break anything” on your real PC – yet. If you mess up your Linux then all you have to do is delete the folder you unzipped to and unzip the original again. Now you are back to the beginning with the original “factory” configuration.

For overachivers

Ok, so lets say that you are having fun but want to get to those files on your real PC, or maybe you want to put files on your PC from Linux. How could that happen?

The neat thing about this Linux is that it is easily extensible from automatic downloads from the Internet. So we”ll show you how to get a new application that allows you to share files among Linux in your virtual PC and the file system on your real PC. There are hundreds of other apps that you can ask this Linux to install for you from the internet. It”s all browser based and all you need to do is pick the application you want from a list. DSL knows what to do to install these apps.

For filesharing you will need a Linux application called Samba. Samba is an application that understands SMB protocol – the protocol that Microsoft uses for file sharing. So what you will be doing is installing software on your Linux system that will set up a network file share with your real PC. In this way, you can share files between Linux and Windows – between the virtual emulated PC and the real PC running MS Windows.

How to set up the Linux – Windows file share

Pretask – find the IP address of your windows machine. You can do this .. Start … Settings … Network connections … (choose) .. and then click the support tab. Write down the IP address. Another way to get the IP address of your PC is to open a command shell and type “ipconfig”.

On the Windows side… Create a file share
1. Chose a folder on Windows you want to share.
2. Right-click… sharing… radio button “Share this folder” – note the Share Name … click OK to exit
3. That folder should now have some hands on it showing that it is network shared

For this example we are sharing a folder called “sharelinux”
and our IP address is 192.168.1.4

On your DSL… Install the Samba software from the network

4. Double-click MyDSL (the DSL download extension tool)
5. Double-click on Net and scroll down to samba.dsl.info and double-click.
6. The info panel for Samba will appear. Chose download and take the default location of TMP
7. If all goes well you will see a new icon on the desktop – Samba. Close the MyDSL panel

8. Open a root shell and mount the share. Right-click on ATerminal icon on the desktop and open terminal window as a root shell
9. Type the following commands in the root command shell to create a mount point and mount the share using your PC”s IP address and the share name that you created. When it prompts you for the password then enter the administrators password.

mkdir /mnt/mywin
smbmount //192.168.1.4/sharelinux /mnt/mywin -o username=administrator

10. You should now be able to see the windows files (ls /mnt/mywin) that are on that share consistent with the sharing permissions that you set. From the MS Windows side drop files in that folder and you will see them in Linux. Copy files from Linux into /mnt/mywin and you will see them in MS Windows.

Exploring further…

This Linux is 50MB and that is small. But, the neat thing is that it is extensible on the fly via the myDSL control panel. This can download hundreds of apps to augment this basic linux just like you did with Samba. Remember that you are using an emulated PC to run Linux and once you shut this down Samba will be gone. To end the emulator just right click on the Linux desktop and choose shutdown… poweroff.

You will notice that Linux run in this way – under emulation – is a real CPU burner. But the point is to provide you with a Linux that you can play with under a no-brainer installation and removal process.

Remember that you have Linux running as an appliation on windows.  You can switch between Linux and any other windows applications.  Your linux should have full networking capability if you have a router that is capabily of answering DHCP.  So you can play with Linux as much as you like, its just an application, there is no damage you can do to your PC as this Linux is running inside an emulator.  When you want to get rid of DSL Linux just delete the zip file and the folder.  Your MS Windows operating system is clean and intact and not affected by your Linux “installation”.

Advertisements

Written by frrl

August 4, 2008 at 8:10 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: