How to use a USB stick from inside colinux

  • River~~

    River~~ - 2012-03-02

    Hey everyone, what is this I hear that USB does not work?

    If it is a normal filesystem device (a USB memory stick or a hard drive) then it works just fine.

    This is what you do.

    If you have N hard disks in your computer, not couting any USB sticks, then the stick will be HarddiskN (on account of windows counting from zero for disks). If it has only one partition, then you just set up a cobd22 or something like this


    noting that windows counts from 1 with partitions. Also take care that you get the capitalisation right, this is one place where windoze is case specific.

    Run colinux, with or without the USB drive in the machine.

    When you want to use the USB drive, in Linux (terminal or console) type

    mkdir /mnt/usb
    mnt /dev/cobd22 /mnt/usb

    If you want to remove the USB drive while colinux is still running, unmount it in colinux

    umount /mnt/usb

    and then do the usual Windows thing to "safely remove" it. Windows will not give you the "safe to remove" message while colinux has it mounted - you'd get the usual message that the device is in use.

    OK, so you can't get the Linux GUI to put an icon on the desktop, but you can find the stick from clicking downwards from "File System" in any of the GUI file handlers I have tried. You  can use it from the GUI or from the command line.

    It is not perfect, but I reckon that letting windows do 95% or the work and you doing the other 5% manuallyis a good work around till the USB handling becomes official.

    But don't pull the stick out while colinux has it mounted - I black screened Vista with that one, didn't even get a blue screen, straight to power off with no dump, no tidy up.

    You can also do more:

    I have also partitioned a 500Gb USB drive with a separate 2Gb partition for swap, using the standard Vista Disk Manager to shrink the huge NTFS down and make a 2Gp gap at the ar end. Told Vista to make a new volume but not format it nor give it a drive letter, etc. Over to colinux, add cobd23 to the conf, boot,

    mkswap /dev/cobd23
    swapon /dev/cobd23

    and second and subsequent times you only need the second line.

    It will mount my phone as a usb drive, so I can copy across the pictures. I bet it would do the same from a camera. If windows thinks it is a drive, it will quite happily pass it to colinux as a drive, whether it was plugged in when colinux booted or whther you plugged it in later.

    As we say around where I live,


  • Henry N.

    Henry N. - 2012-03-04


    the problem is, that you should do it carefully.

    If you have mounted the USB stick under coLinux and written some bytes, then you should never touch (no read and never write) the same stick under Windows. The problem is the read/write cache of filesystem meta data on both sides.

    There is no problem, if you unmounted the stick under Windows by removing the drive letter in the disk manager.
    It is low risk, if you never do any file action on the stick on Windows side, at the time coLinux has mounted it.
    It is no problem, if Windows does not know the filesystem on the stick, f.e. ext3.

    Better you should use "cofs" and the drive letter.



Log in to post a comment.