Menu

coLinux on a USB flash drive

navaburo
2005-05-10
2013-05-09
  • navaburo

    navaburo - 2005-05-10

    It would be interesting to see coLinux on a USB flash drive. It would have all the advantages of other live-USB-linux distro's plus:
    *no need to reboot
    *can be run on any nt/2000/xp pc, even if you cant get to the bios, or the bios doesnt support usb booting.

    possible pitfalls as i can see:
    *hot install of software network interface
    *flash drive access is too slow for swap and /proc etc
    (and flash memory cells are only good for about a million writes)

    possibly /proc and swap could be mounted as a ram drive? or even the entire file system could be copied to ram on boot, and then rewritten to the flash disk at shutdown if desired.

    ideas, comments, existing attepts? let me know

     
    • Nuno Lucas

      Nuno Lucas - 2005-05-11

      Use slirp, devfs (or udev) and a simple batch-file to run colinux.
      Something like this:

      ======= run-colinux.bat =======
      colinux-daemon --install-driver
      colinux-daemon --status-driver
      colinux-daemon kernel=vmlinux mem=128 hda0=rootfs eth0=slirp root=/dev/hda0 defvs=mount
      colinux-daemon --remove-driver
      ======= run-colinux.bat =======

      No need to use swap if you have enough memory for console operation. 128MB is more than enough for the console.

      /proc is already a virtual dir. no need to make it to ram.
      You could mount /tmp as tmpfs (as long as you have enough memory).

      Slirp doesn't need any drivers, so it's ideal for this case, but you need a recent build, because there were bugs in the 0.6.2 version (only fixed recently).

      Regards,
      ~Nuno Lucas

       
      • navaburo

        navaburo - 2005-05-11

        thanks nunolucas.
        i am going to try this once i find the time to find a slimed down colinux iso, etc.

        i am just wondering how i could get the network driver to install... (or is that what --install-driver does?)

         
        • Nuno Lucas

          Nuno Lucas - 2005-05-11

          --install-driver installs the low-level colinux driver needed to run colinux. the network driver is not needed to run slirp, only the tap or winpcap driver.
          To install those some other utility is needed, and not easy to automate.

          Regards,
          ~Nuno Lucas

           
    • Nuno Lucas

      Nuno Lucas - 2005-05-11

      Btw, for testes you can use the supplied initrd.gz with the following:

      colinux-daemon kernel=vmlinux eth0=slirp initrd=initrd.gz root=/dev/ram0

      It will boot into a busybox system in ram, just enough to try it without much hassle.

      Regards,
      ~Nuno Lucas

       
    • Nuno Lucas

      Nuno Lucas - 2005-05-12

      Well, as I also have a USB flash drive lying around I decided to test what I was saying, so I can now confirm it works.

      There is one gotcha here. You must have some kind of check for the case the computer you decide to run already has colinux installed. Maybe some program that checks the result of "colinux-daemon --status-driver", so it doesn't mess with another local colinux instance.

      Regards,
      ~Nuno Lucas

       

Log in to post a comment.