Using Windows and Linux simultaneously

Discussion in 'Archives' started by The Fat Controller, Jun 29, 2008.

Using Windows and Linux simultaneously
  1. Unread #1 - Jun 29, 2008 at 3:25 PM
  2. The Fat Controller
    Joined:
    Aug 16, 2007
    Posts:
    1,003
    Referrals:
    0
    Sythe Gold:
    1

    The Fat Controller Guru

    Using Windows and Linux simultaneously

    This is a long guide because installing/configuring coLinux and a Linux distribution takes a long time, especially for a beginner! Remember that you don't have to do everything in one sitting. However, if you follow it then you'll be amazed at what you can do, here's a screenshot of me running Linux applications on Windows through use of coLinux:

    [​IMG]

    - Foreword -

    * Disclaimer: it is technically possible to damage your computer if you follow this guide incorrectly. This guide is written for use with Windows XP (I'm using SP3), so it may not work with older or more recent versions of Windows. If you have any queries or problems then just ask leaving as much detail as you can and I will do my best to try and help *

    If you don't know what Linux is, then this guide really isn't for you. If you want to try it out anyway, then read this first.

    If you're interested in using Linux at the same time as using Windows, but you're not very skilled with a computer, then I suggest you look at this: http://www.andlinux.org/. However I'm not covering this with my guide, because there are very straightforward instructions for installation etc on their site (note however that andLinux is still in beta and may be buggy).

    - [Guide begins] -

    coLinux allows you to use a full Linux distribution with Windows at near native speeds. Sounds good, right? So, here we go:

    1) Download the coLinux installer at SourceForge.

    [​IMG]

    2) Double click on the downloaded coLinux installer and run through it, don't download WinPCap, but do choose to download your preferred Linux distribution (root file system image). If you're new to this then I suggest you choose Ubuntu from the list of options. During installation you will get a warning saying that the TAP-Win32 adapter has not passed Windows Logo testing, click "continue anyway".

    3) Now, move the root file system image you have downloaded to the folder where you installed coLinux (it may be in there to begin with, I'm not sure where it normally downloads to). Next, decompress/extract the image to this same folder (you will need to use an application such as WinZip, Winrar or 7zip to do this, get 7zip here).

    4) Now you need to create a swap file for your Linux distribution under coLinux. To do this, open a command line in Windows (click your start button, go to run, and type in cmd.exe). Then type the following command:

    "fsutil file createnew swap_file 536870912" without the quotes.

    This will create an empty 512 megabyte file at the location indicated on the command line, so find and open the folder where you made the swap file. An example of what your command line should say and the file you get is here.

    Copy the swap file you made into the directory where you installed coLinux.

    5) Go to the directory where you installed coLinux and open up the file "example.conf" with a text editor such as notepad or wordpad (these are included with Windows). Edit the configuration file appropriately, see mine as an example:

    my coLinux configuration file

    6) Great! Now you should be able to run coLinux. Open notepad and type the following:

    colinux-daemon.exe -t nt @example.conf

    Go to "save as" and save this file in the coLinux folder as "start_coLinux.bat".
    Now, double click on this file and coLinux should load up along with the Linux distribution you chose! A command line with contents similar to this should pop up:

    [​IMG]

    7) You now should be able to login as "root" (similar to administrator on Windows) without a password or with "root" as the password. You now have a distribution of Linux installed and working together with Windows on your computer. You will now need to learn the basics of navigating in a Linux console, read some of this: http://www.tuxfiles.org/linuxhelp/cli.html

    - [Opening graphical applications and getting internet access] -

    Now you should have Linux up and running through coLinux. However, you won't be able to do a lot with it yet. You want to get it to open applications and connect to the Internet, right? Well, here's a guide to get it to do just that.

    8) You should have installed TAP during the original coLinux installation. Go to start-->settings-->network connections and right click on the new connection there (it will read 'TAP-Win32 Adapter' if you hover the mouse over it). Rename it to "CoLinux TAP" so you know what it is. Right click on it again and select 'properties'. Scroll down to the "Internet Protocol" option and select "properties". Check "use the following IP address" and:

    Enter in "10.0.3.17" for the IP address and "255.255.254.0" for the subnet mask. Press OK.

    9) Hopefully you will have learned the basics of using the Linux command line from point (7). You now need to navigate to /etc/network and open the "interfaces" file using a text editor. I used the text editor "nano" which was included in my distribution to edit the interfaces file. [example how-to is here].

    You need to make the contents of the interfaces file look like this:

    Code:
    auto lo
    # Loopback interface
    iface lo inet loopback
    
    # Network interface for internet access (slirp)
    auto eth0
    iface eth0 inet static
       address 10.0.2.15
       broadcast 10.0.2.255
       netmask 255.255.255.0
       gateway 10.0.2.2
    
    # Network interface for private connection to Host OS (tap-win32)
    auto eth1
    iface eth1 inet static
       address 10.0.3.16
       network 10.0.3.0
       netmask 255.255.254.0
       broadcast 10.0.3.255
    Save the file and shut coLinux down by typing "shutdown -h now" into the console.

    10) You should now have internet access on Linux. This means you can update your distribution by typing "apt-get update" into the console. Do that. Then type "apt-get upgrade". Answer yes to any prompts, hopefully it will all run smoothly.

    11) Before you can easily do anything else, you need to be able to open graphical applications. To do this, you need to install an X Server on Windows. I will explain how to install and configure the X Server Xming:

    Download Xming from here. Next, run the Xming installer, installing Xming into a folder called "Xming" within the coLinux directory. Don't change any of the standard options, just go through the install procedure. Once it is installed, open the folder you installed it into and open the "X0.hosts" file with a text editor like notepad and add the following line:

    "10.0.3.17:0" without the quotes.

    Save the file and exit.

    Now, double click on "XLaunch.exe" and select "multiple windows" and click next. Select "start no client" and click next again. Check the "no access control" box and select next again. Now choose "save configuration" and save the file in the Xming folder, calling it "Xming_Access_Control_off.xlaunch".

    Double click on the configuration you have just made, and a new icon should appear in your taskbar. Good.

    12) Start up coLinux and login. Type the following:

    "apt-get install synaptic" without the quotes.

    This will install the Synaptic Package Manager, a tool you can use to choose, download and install applications to work with your distribution of Linux.

    13) Type "export DISPLAY=10.0.3.17:0" into your command line without the quotes. Now type "synaptic" without the quotes.

    If all has gone to plan, then something similar to this should open up. Congratulations, you're pretty much set up.

    14) What to do next... Well, you can choose to install any of the useful applications using the package manager. I personally recommend "xfce4-panel", "thunar", "comix", "GIMP", "XMMS", "Iceweasel" and "openoffice" See what works best for you.

    - Additional notes -

    If you mess up your Linux distribution and want to start again, simply close coLinux, delete the root image file in your coLinux folder and simply decompress the compressed root image file (you downloaded this at the start of the tutorial along with coLinux) into the coLinux folder.
    Upon starting coLinux up in the future, remember you need to type "export DISPLAY=10.0.3.17:0" into the command line for graphical applications to work. Also note that Xming must be open and you must have access control switched off (simply launch the xconfig file you made where access control has been disabled).

    It is also possible to access the files you have on Windows using Samba. Furthermore, you won't have any sound from these Linux applications yet, but setting this up is quite simple. You can also resize your root partition as space may be limited if you want to install a lot of applications, however I will save guides to those for a later date.

    - Thanks -

    Thanks to the blogger Sofeng, as his own guide on setting up coLinux and Ubuntu Hardy was very helpful in setting up coLinux for myself originally.

    Thanks for reading/following this guide so far! I hope everything worked out fine. If I made any glaring omissions or mistakes, then please inform me!
     
< 91 Range; What to do? POLL/HELP | Look! My 116 Combat Account For Your Pure! >

Users viewing this thread
1 guest


 
 
Adblock breaks this site