Moving a dual boot system to coLinux

Help
Raa
2007-09-02
2013-05-09
  • Raa
    Raa
    2007-09-02

    Hi. I have a dual boot system with Windows XP and Ubuntu Linux:
    hda1 -ntfs (C:)
    hda2
        hda5 -fat32
        hda6 -fat32
        hda7 -linux swap
        hda8 -ext2 (/var)
    hda3 -ext2 (/home)
    hda4 -ext2 (/)

    Is there a way to move such system to coLinux without reinstalling some OS and creating virtual disks? Is there some tutorial?

     
    • Manuel Klimek
      Manuel Klimek
      2007-09-02

      Yes, it is possible:
      http://colinux.wikia.com/wiki/Partitions
      explains the basic access of windows partitions,

      http://colinux.wikia.com/wiki/Dual_boot_system
      explains some of the ins and outs, but I don't use
      special boot scripts - the latest colinux versions (I use 0.8.0)
      support "faking" the device nodes. If you combine this with
      some clever naming of your ethX devices, you can boot into
      the same system, without even changing the configuration :-)

      here's my own colinux configuration which uses a
      dual-boot ubuntu gutsy:
      http://klimek.box4.net/blog/2007/06/08/mobile-ubuntu-colinux-setup/

      hope I could help,
      Manuel

       
      • Raa
        Raa
        2007-09-03

        Thank you very much! I will try :)

         
      • Gary Pajer
        Gary Pajer
        2007-09-16

        Manuel,

        Thanks for posting your system...  I have Kubuntu 7.10 that I have been using in a dual-boot system, but coLinux would be much better, if I could get it to work.  It looks like my system is very much like yours.  So far, I've just copied exactly what you did without changes, and it's worked, up to a point.

        Things went just swell until I tried to scp my key over to the linux side.

        from cygwin:

        Admin@Thinkpad ~
        $ scp ./key.pub gap@192.168.42.2:~/.ssh/authorized_keys
        ssh: connect to host 192.168.42.2 port 22: Connection refused
        lost connection

        I can ping just fine.  Telnet is also refused.  There must be some kind of security on the linux side, but I must admit I've never dealt with linux firewalls, etc.

        I think I’ve turned off every Windows firewall I can find. Can you offer a hint??

        -gary

         
        • Manuel Klimek
          Manuel Klimek
          2007-09-16

          - try
          > ssh gap@localhost
          on the colinux side. This should work first ;-)

          - try
          > netcat -l -p 4242
          on the colinux side and
          > telnet 192.168.42.2 4242
          on the windows side.

          - post your ipconfig and ifconfig output

          Cheers,
          Manuel

           
          • Gary Pajer
            Gary Pajer
            2007-09-16

            >- try 
            >> ssh gap@localhost
            >on the colinux side. This should work first ;-)

            But alas, no.  Also refused.  I'll work on this while I'm waiting for advice.  :)

            >- try
            >> netcat -l -p 4242
            >on the colinux side and
            >> telnet 192.168.42.2 4242
            >on the windows side.

            netcat starts *something*; the command prompt is not returned.
            telnet causes the screen to go blank and unresponsive.
            when I ctrl-c out of netcat on colinux, my cygwin window awakens, and I get a cygwin prompt.

            >- post your ipconfig and ifconfig output

            ifconfig:
            --------------------------------------------------------------
            eth0      Link encap:Ethernet  HWaddr 00:FF:44:88:1A:60
                      inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
                      inet6 addr: fe80::2ff:44ff:fe88:1a60/64 Scope:Link
                      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                      RX packets:60 errors:0 dropped:0 overruns:0 frame:0
                      TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:1000
                      RX bytes:9099 (8.8 KiB)  TX bytes:10702 (10.4 KiB)
                      Interrupt:2

            eth2      Link encap:Ethernet  HWaddr 00:FF:77:9A:04:00
                      inet addr:192.168.42.2  Bcast:192.168.42.255  Mask:255.255.255.0
                      inet6 addr: fe80::2ff:77ff:fe9a:400/64 Scope:Link
                      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                      RX packets:50 errors:0 dropped:0 overruns:0 frame:0
                      TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:1000
                      RX bytes:5520 (5.3 KiB)  TX bytes:9693 (9.4 KiB)
                      Interrupt:2

            lo        Link encap:Local Loopback
                      inet addr:127.0.0.1  Mask:255.0.0.0
                      inet6 addr: ::1/128 Scope:Host
                      UP LOOPBACK RUNNING  MTU:16436  Metric:1
                      RX packets:2 errors:0 dropped:0 overruns:0 frame:0
                      TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
                      collisions:0 txqueuelen:0
                      RX bytes:100 (100.0 b)  TX bytes:100 (100.0 b)
            -----------------------------------------------------------------

            ipconfig:
            -----------------------------------------------------------------
            Windows IP Configuration

            Ethernet adapter VMware Network Adapter VMnet8:

                    Connection-specific DNS Suffix  . :
                    IP Address. . . . . . . . . . . . : 192.168.85.1
                    Subnet Mask . . . . . . . . . . . : 255.255.255.0
                    Default Gateway . . . . . . . . . :

            Ethernet adapter VMware Network Adapter VMnet1:

                    Connection-specific DNS Suffix  . :
                    IP Address. . . . . . . . . . . . : 192.168.17.1
                    Subnet Mask . . . . . . . . . . . : 255.255.255.0
                    Default Gateway . . . . . . . . . :

            Ethernet adapter Wireless Network Connection 5:

                    Connection-specific DNS Suffix  . : home
                    IP Address. . . . . . . . . . . . : 192.168.1.3
                    Subnet Mask . . . . . . . . . . . : 255.255.255.0
                    Default Gateway . . . . . . . . . : 192.168.1.1

            Ethernet adapter Local Area Connection:

                    Media State . . . . . . . . . . . : Media disconnected

            Ethernet adapter Local Area Connection 2:

                    Connection-specific DNS Suffix  . :
                    IP Address. . . . . . . . . . . . : 192.168.42.1
                    Subnet Mask . . . . . . . . . . . : 255.255.255.0
                    Default Gateway . . . . . . . . . :
            ----------------------------------------------------------------

            Thanks again,
            Gary

             
            • Gary Pajer
              Gary Pajer
              2007-09-16

              OK, I've moved forward.

              Short version:  openssh-server was not installed.

              <long version>
              Longer version:  I booted into Kubuntu (that is, from Grub as a dual-boot) and installed openssh-server.  I was then able to ssh to localhost.  However, when I went back to WinXP I noticed that I had not shut down colinux, rather I hibernated WinXP before booting into Kubuntu.  I think this was not such a great idea.  ssh didn't work.  I rebooted coLinux, and fsck was triggered.  There were a lot of problems.  Got through that, but now sshd did not start automatically (still doesn't btw) despite uninstalling and reinstalling openssh-server. I discovered that to start sshd by hand you must type out the entire path:

              sudo /usr/sbin/sshd

              But there was another problem:  no /var/run/sshd .    I created that directory, then was able to continue.  I rather suspect that I caused all this mayhem myself.
              </long version>

              So now I can ssh from cygwin to coLinux without password.  I created konsole.bat and ran it.  I run colinux as a service.  I turned the service on in the WinXP Services facility.

              I start Xming, and I get nothing but an icon in the taskbar.  If I run Xlaunch and ask it to start xterm locally, I get a window reporting an "xterm launch failure" (or something like that.)  Am I missing something else ... like how to connect Xming  or ??

              -gary

               
              • Gary Pajer
                Gary Pajer
                2007-09-17

                [sorry for the double post]

                Yikes, my /etc/init.d/ssh is mangled.
                removing and reinstalling openssh-client and openssh-server doesn't fix it.

                This is OT, but how can I repair it? Where can I find the source for that? (Kubunut 7.04)
                Or where should I ask?

                -gary

                 
                • Gary Pajer
                  Gary Pajer
                  2007-09-18

                  good progress

                  Fixed openssh-server.  I had to fool the package manager into fully re-installing it. I removed its entry in /var/lib/dpkg/status, update packages, and reinstall openssh-server.

                  Now I can ssh to the coLinux running as a service.  I can even use the ssh that comes with WinXP, so I have linux running in a DOS box.  Very cool!

                  But still no X.  Xlaunch and Xming do not open windows.  I get the toolbar icon, but that's all.  Cygwin/X:  I can launch a Cygwin/X xterm window, and ssh to coLinux.  But trying to run xterm results first in a warning that DISPLAY hasn't been set (I had previously run konsole.bat), and then after setting by hand (export DISPLAY=192.168.42.1:0)  I get this -

                  Xlib: connection to "192.168.42.1:0.0" refused by server
                  Xlib: No protocol specified

                  xterm Xt error: Can't open display: 192.168.42.1:0

                  So I'm getting so close I can almost smell it.  :)
                  Perhaps it's a simple Xming config issue, but what?
                  Now I think I need a suggestion.

                  thanks as always,
                  gary

                   
                  • Manuel Klimek
                    Manuel Klimek
                    2007-09-18

                    from http://klimek.box4.net/blog/2007/06/08/mobile-ubuntu-colinux-setup/
                    "Run XLaunch (from Xming) and configure an X Server without access control and save the configuration to your local documents directory."

                    The important part is /without access control/. When you click through the
                    wizard there is a checkbox "No Access Control". Check it. Save the xlaunch
                    configuration. Stop your X-server. Start it via clicking on the xlaunch file
                    you just saved.

                    Cheers,
                    Manuel

                     
                    • Gary Pajer
                      Gary Pajer
                      2007-09-18

                      I am just about there.  I can connect via Xming (and Cygwin/X) but not every time.  Sometimes it will not connect.    I believe that I start Xming without access control each time, but it's possible that I neglect it sometimes.  I'll try to figure out when it connects and when it doesn't.  At any rate, I think this thread is finished; thanks very much for your help.

                      I will say that if had followed your instructions exactly, I probably would have had no problems. And I will add this:  My Linux became fouled somehow.  I believe it happened when I hibernated out of WinXP while coLinux was running, and then booted directly into Linux and made some changes.  I'm not sure about that, but the fouling came right after I did that.

                      It might help the beginner to point out that the way to get an X-application running (once everything is in place) is to ssh from Windows to Linux using cygwin ssh (ssh can be run directly from a Windows command window, by the way.  One doesn't need to open a cygwin bash shell window)  and then simply typing "xterm" (for example).  The application will find the X server, open a window, and go.

                      Regards,
                      gary

                       
    • Gary Pajer
      Gary Pajer
      2007-09-17

      Yikes, my /etc/init.d/ssh is mangled.
      removing and reinstalling openssh-client and openssh-server doesn't fix it.

      This is OT, but how can I repair it?  Where can I find the source for that? (Kubunut 7.04)
      Or where should I ask?

      -gary