coLinux
Advertisement


Q-1. What is the password for the 'root' user ?

Some images don't have one, others have 'root' and in some others is 'colinux'.



Q0. Do I need Administrator rights on my Windows computer ?

YES - coLinux tells Windows to use a fairly low level driver and it needs administrative rights to do that. Of course, if you run as "Administrator" all the time, you won't notice it. You can start coLinux as a service and connect to it as a normal user, though.



Q1. Could coLinux behave like another machine?

As you can see in the screenshots, a virtual network was implemented between the Linux and the Windows that runs it. If you run a MySQL database on the Linux, there's no problem accessing it via TCP/IP from the Windows. From the host's standpoint, coLinux can act just like another computer on the network.


Q2. Is it possible to run other Linux distributions under coLinux?

Yes, any distribution can run, although very slight modifications are needed to be made so it would properly configure and work with coLinux's provided virtual devices. For more information, see ConvertingDistributions:the Converting Distributions Wiki page. Also, Nir Perry has posted a distribution installation HOWTO on the developer's mailing list.


Q3. I have a dual boot system. Is it possible to run coLinux from the Linux partition when I'm in Windows?

Yes. (The needed steps are described in ConvertingDistributions)

Under Windows it is possible to read and write partitions like regular files when accessing them using this pathname \Device\HarddiskVolumeX, where 'X' needs to be replaced with a number. Basically, you can change coLinux's XML configuration to use \Device\Harddisk Volume X as block device instead of a regular file. More information will be added on the XML configuration format Real Soon Now ;)

In \Device\HarddiskVolumeX, X is the number of the partition. It starts counting from 1, so if the partition you want to use is the third one on your second hard drive, and your first hard drive has two partitions, then X is 5.

Another way to access the partitions is to use the pathnames \Device\HarddiskN\PartitionX where N is the number of the disk (starting from 0) and X is the number of the partition in this disk (starting from 1). Note that windows does not consider the extended partition space (in which logical partitions are allocated) to be a "partition" and thus does not give it a number. Linux partition numbers will then be off by one from windows partition numbers for all partitions greater than 3.

In this case the numbering is like the one in Linux fdisk (for primary partitions...). eg

  • hda1 => Harddisk0\Partition1
  • hdb1 => Harddisk1\Partition1
  • hda3 => Harddisk0\Partition3

If your fourth partition (hda4) were an extended space for logical partitions:

  • hda2 => Harddisk0\Partition2
  • hda3 => Harddisk0\Partition3
  • hda5 => Harddisk0\Partition4
  • hda6 => Harddisk0\Partition5

If your second partition (hda2) were an extended space for logical partitions, and your third and fourth partition table entries were unused:

  • hda1 => Harddisk0\Partition1
  • hda5 => Harddisk0\Partition2
  • hda6 => Harddisk0\Partition3

Note: if you only have 4 partitions on a drive, it is possible that they are all primary partitions, though this usually only happens if you do it on purpose. In that case, all 4 partitions would have the same number on Linux and Windows.

Note: it seems that the partition numbers reported by the windows diskpart.exe utility (C:\Windows\system32\diskpart.exe) are not consistent with the partition numbers used by the operating system itself, under circumstances of extended partitions or out-of-order partition table entries.

PeterMarquardt : If you use ext2fsd to mount your Linux partitions in Windows, be sure to unmount all partitions that are defined in your config before starting the colinux-daemon or you will get tons of I/O errors.

ErikDeBruijn: Please also look here if you can mount a Partition on colinux, but it gives I/O errors (see ErrorsWithRawPartition), while the disk is fine and not in use by windows:

end_request: I/O error, dev cobd2, sector 0
Buffer I/O error on device cobd2, logical block 0
lost page write due to I/O error on cobd2
(after this the disk will mount read only, for details see [[IOErrorsWithRawPartition]])

The following describes the sample data that let to the above information:


Peter Novak:

As I learned, exended and not created partitions are skipped ...
i.e. assume "fdisk -l /dev/sdb" shows this partition table
Device    Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1           7       56196   83  Linux
/dev/sdb2               8        1919    15358140    c  W95 FAT32 (LBA)
/dev/sdb3            1920       20023   145420380    5  Extended
/dev/sdb5            1920        4410    20008926   83  Linux
/dev/sdb6            4411        6901    20008926   83  Linux
/dev/sdb7            6902        9392    20008926   83  Linux

then proper names are:

sdb1 => \Harddisk1\Partition1
sdb2 => \Harddisk1\Partition2
sdb3 => extended PT is skipped
sdb4 => not existing PT is skipped
sdb5 => \Harddisk1\Partition3  !!!!!!!!!!!!!
sdb6 => \Harddisk1\Partition4  !!!!!!!!!!!!!
sdb7 => \Harddisk1\Partition5  !!!!!!!!!!!!!

UNIX systems (i think all, but at least most) use the following numbering :

 primary partitions are given numbers 1 to 4 (as a maximum of 4 is allowed)
 extended partitions are numbered 5 to 132 (not sure about the 132 but who wants to go that far anyway ?)

UNIX usually does not show the extended primary partition at all as it is a mere container for other partitions

MSwindows shows all partitions and tags them as follows

  primary -> regular partition
extended -> container for pseudo-partitions (there should ALWAYS be only one of these)
logical -> pseudo-partitions contained in the extended

TomasEbenlendr : You can use Explore2Fs to get possibly correct partition numbers.

<trohrer>It may be obvious to many, but you need to set the bootparams line of the XML file to boot to your "root" partition, not your "boot" partition (that's the part that COLinux replaces)... You will also likely need to match your colinux kernel to the dual boot kernel, and you may need to cp -r the /lib/modules/2.X.XX-colinux... directory from a "pre-formed" image onto the dual boot system


Karl Zollner notes that: (I am not sure how much of this due to possible differences between XP Pro and XP home or between single drive vs. multi-drive configurations)On my single-drive Windows XP Home laptop I found that I had to do things somewhat differently than described above:

since there is only one hard drive the reference in the default.colinux.xml file becomes:

<block_devices index="Y" path="\Device\Harddisk1\PartitionX" enabled="true"></block_devices>

What is strange is that where there is only one drive, the "Harddisk" number defaults to "1"

PeterMarquardt : I can not confirm this. I have just set up coLinux on my Notebook which has both just one drive and Win XP Home Edition (SP2). There must be some other reason, so be sure to first try the method mentioned above even if you have Win XP Home and only one drive.


Pipotron : I have a Win XP Pro SP1 and I've got a mix between the two convention :
when I launch fdisk -lu the result is :

Disk /dev/hda: 6448 MB, 6448619520 bytes 240 heads, 63 sectors/track, 833 cylinders, total 12594960 sectors Units = sectors of 1 * 512 = 512 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *      121023     6274799     3076888+   b  W95 FAT32
/dev/hda2              63      121022       60480   83  Linux

Partition 2 does not end on cylinder boundary.

/dev/hda3         6274800     7605359      665280    b  W95 FAT32
/dev/hda4         7605360    12594959     2494800    5  Extended
/dev/hda5         7605423    12201839     2298208+  83  Linux
/dev/hda6        12201903    12594959      196528+  82  Linux swap

Partition table entries are not in disk order

and with the diskpart the command list partition give :

Partition ## 1. Type              Taille     Decalage

Partition 1    Inconnu             59 MB    32 KB
Partition 2    Principale        3005 MB    59 MB
Partition 3    Principale         650 MB  3064 MB
Partition 4    Extended          2436 MB  3714 MB
Partition 5    Logique           2244 MB  3714 MB
Partition 6    Logique            192 MB  5958 MB

(sorry this is in French :-)

/dev/hda5 is my root partition (/) detect by windows as Partition 5 and /dev/hda2 is my boot partition (/boot) detect by windows as Partition 1

but in the default.colinux.xml file I must write : \Device\Harddisk0\Partition2 to reach my boot partition and \Device\Harddisk0\Partition4 to reach the root partition. To resume : hda2 =>\Device\Harddisk0\Partition2 hda5 =>\Device\Harddisk0\Partition4


ps : we can reach the whole disk at /dev/codb0 with the following string in your xml colinux config file !

<block_device index="0" path="\Device\Harddisk0\Partition0" enabled="true" />

TomasEbenlendr: Explore2Fs (1.00 pre6b) reports same partition numbers as should be used in this configuration. (E.g.:my disk hda1/ext2 hda2/NTFS hda3(hda5/ext3 hda6/VFAT hda7/VFAT) is reported by Explore2Fs like hda1/ext2 and hda3/ext3)


Q4. Why doesn't my X server work under coLinux?

coLinux currently doesn't support running an X server that requires a graphic adapter, because such virtual adapter doesn't exist at the moment. If you want to use X, you can run a Windows X server such as Cygwin/X, and launch an X session across the virtual network.

Bart Kerver took Cygwin/X and made a package untied from the Cygwin installer: http://speeldoos.showcase.surfnet.nl/startx.zip

You can find lots more information on using here: X with coLinux.


Q5. Why am I getting memory allocation errors from the Linux kernel when I try to run a number of heavy programs?

Add a swap device or swap file to your coLinux system.


Q6. Why is the amount of physical RAM (besides swap) available to coLinux on Windows only around 32MB?

The reason is that there are limitations enforced by Windows's non-cached memory allocator. This pool is hardcoded to a limit of 256MB and even 128MB on some systems. Allocating too much memory from that pool can destabilze Windows.

UPDATE: Due to a different way of using memory in recent releases of coLinux, this limitation is no longer present. Users have reportedly used 128 Mo and even 512 Mo without issues. Of course, you must leave some RAM to Windows and take the file cache into account.


Q7. Some pieces of functionality are still not working/implemented. Why?

coLinux is still in its early development stage. Although it is usable, we haven't yet implemented some parts of it. You can download the latest released version here or unannounced development snapshots here.


Q8. I need some help configuring networking with the coLinux machine.

Configuring the network is even very painful but you can try this. Check out the Wiki page on coLinuxNetworking for information on bridged and NAT setups. You can also browse the co Linux Help forum and the Developer's Mailing List archives for additional info or advanced config help.


Q9. Where can I see some example working config files?

Check out the UserConfigs page.


Q10. Why does my debian image have fsck problems after an apt-get update?

This has to do with the init script that checks filesystems updated.

Reported fixes:

Reported by Jonathan Ballard > In the /etc/fstab the entry for the /dev/cobd0 was > something like: > > /dev/cobd0 / ext2 defaults 0 1 > > Change the ext2 to ext3. > > /dev/cobd0 / ext3 defaults 0 1 > > A few more things should work fine.

Reported by Karol Bryd > This is because the initscripts package got updated and > /etc/init.d/checkroot.sh also, just edit it and change the line with > "rootcheck=yes" to "rootcheck=no".

(Mukesh Agrawal) I ran into this problem as well. But it turned out that I was giving my root partition the wrong alias. Fixing this made the problem go away. (The config.xml file specified the alias as hda5, but fstab wanted to mount hda6 onto root.)


Q11. Is it possible to run coLinux under 98/ME?

A limited port to Windows 98/ME is possible, but that would require lots of work. NT supports asynchronous operations and security attributes in many interfaces. 98 & ME do not have such options available if otherwise limited. New code would have to be written to simulate the asynchronous operations. The code could not be considered as secure for kernel level execution because of the absent security options. For any detailed differences, reference the manuals at the MSDN Library.


Q12. My coLinux installation doesn't boot, and I get a strange error in the Command Prompt window. What's wrong?

Sometimes this is caused by problems in the XML config file (default.colinux.xml). You might see errors like these:

VFS: Cannot open root device "cobd0" or 75:00)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 75:00
daemon: monitor terminated, reason 3

Unable to add value node of type 4 to parent <null>!
Error parsing config XML. Please check XML's validity
daemon: error loading configuration

Or these:

Daemon failed: -1

Error, unable to determine if driver is installed (rc -19)

Reported problems/solutions:

  1. When editing the XML config file with Notepad or WordPad on Windows, CR/LF line terminators (DOS format), instead of just LF (Unix), may cause problems. Re-edit the original file with Notepad and cut/copy/paste using only LF characters (look like narrow rectangles in Notepad). (You can get UDDU.ZIP to convert to/from DOS/Unix formats from this webpage.)
  2. block_device for a swap file is defined in the XML config file, but this file doesn't exist. Edit or remove this definition.
  3. You may have erased the 'DosDevices' that can be found in the 'path=' command : <block_device index="0" path="\Dos Devices\C:\yourcolinuxpath\root_fs"> provided you've installed your coLinux in C:\yourcolinuxpath, of course
  4. The file name of the root image file is incorrect. Edit the config file to fix this.
  5. One report of incorrect file permissions (no write access) on the root image file unzipped with Cygwin. This was fixed using Cygwin's chmod command.

Other reported problems/solutions:

  1. The performance options in WinXP Pro (other Windows versions as well?) may cause problems ("Daemon failed: -1" error message). The reported fix is to change the performance options to set memory usage and processor scheduling to programs. Access this via Start->Settings->Control Panel->System->Advanced tab->Performance Settings button->Advanced tab->Processor scheduling and Memory usage.
  2. If you get this message, you're not running coLinux with Administrator privileges:
Error, unable to determine if driver is installed (rc -19)

coLinux needs Administrator privileges to run under Windows. This is because (quoting from Dan's explaination on the main webpage under "How does it work") "special driver software on the host operating system is used to execute the coLinux kernel in a privileged mode (known as ring 0 or supervisor mode)." It is possible to start co Linux as a service under Windows using the Cygwin service tools. Please look at this thread on the developer's mailing list to learn the "formula."

  1. If you get a bunch of VFS: Can't find * filesystem errors, check if your root is unbzip2ed. The installer might have downloaded a .bz2 file for you. You need to bzip -d it and use that as a root image (without .bz2).

Q13. My coLinux installation seems to randomly and irregularly hang my PC. Sometimes it happens when the init scripts are running during bootup or shutdown, sometimes it happens while a program is executing on the co Linux VM, and sometimes coLinux runs just fine. What's going on and how do I fix it?

Most frequently, this is caused by minor problems coLinux has running on multi-processor systems. You probably have two or more CPUs and are running an SMP configuration under Windows, or have a recent Intel processor with Hyperthreading enabled in your BIOS settings.

If you have multiple logical or physical CPUs in your system, check to see if you are running coLinux version 0.6.1 or later. A fix was added to pin the coLinux process to one CPU.

If you still encounter problems (or if you are running an older version of coLinux), you can disable Hyperthreading in your system's BIOS, or you can edit your boot.ini file and add the '/ONECPU' switch to disable multiprocessor support in Windows. (See this webpage for more info.) (Additional info from Windows experts is welcome :^)

(Suggestion: Some software vendors, eg Cakewalk, have temporarily worked around this issue by "locking" their application into a single processor or one side of the hyperthreading. I don't know the details, but it might be worth finding out what they did and applying the same stopgap to coLinux. -- JosephKesselman)


Q14. I think I've configured my XML file correctly to access a partition on my hard drive as a block_device. But I can't mount the filesystem on the corresponding cobd device. It fails with an error like "Can't read superblock." What's wrong and how do I fix it?

If you're currently accessing a partition (that is, a drive) in Windows, you won't be able to mount it in coLinux because Windows locks the resource. Be sure to close any folder windows or instances of Explorer that are referencing that drive, and change drive letters away from that drive in any open Command Prompt windows. Then your mount command should succeed.

Also, in version 0.6.0 the raw partition size is sometimes incorrectly reported, which causes reiserfs partitions to fail to mount.


Q15. Can coLinux be used with multiple configuration files other than default.colinux.xml?

Yes you can start colinux with

colinux-daemon.exe -c c:\pathTo\other.colinux.config

substituting the name of your configfile for c:\pathTo\other.colinux.config . You can then create .bat files or shortcuts with this command for easy click and run starting of different setups.


Q16. I get memory allocation issues within coLinux when trying to use real-world software like KDE application.

(this is Q5, reformulated)

The current memory settings currently suggested for the coLinux virtual machine range from 64 Mb (Windows machines with 160 Mo and more) to 128 Mo (Windows machines with 256 Mo or more...) or more...

Demanding applications - like X and heavy-duty graphical applications, or the gcc compiler - can beg for much memory, causing the Linux system to run out of memory. As with real Linux systems, thats what the swap file is for, and coLinux will happily use it.

If it is there, and enabled, of course.

So, check it with the 'free' command, or use the 'top' command to see how much RAM is used, and by which process. You will also see if swap is enabled or not.


Q17. I see Cygwin mentioned every now and then. Do I need it to use coLinux?

Ok, Cygwin is indeed mentioned on several pages in this Wiki, and also often mentioned on the mailing lists and maybe even in the official documentation and web site. You can also notice it quite often in screenshots.

BUT you don't need it to install and use coLinux at all. There was a dependancy on cygwin.dll long ago, but it's gone by now.

Cygwin is like a Swiss-army knife, it really deserves its own page but in short, it provides you with :

  • bash and Unix-like file completion - a real shell you can use instead of good old cmd.exe
  • many handy Unix command-line tools (dd, tar, gzip, zip/unzip, bzip2/bunzip2, md5sum, whois...) but you can get the same functionality elsewhere too
  • an X Window server is available too, even if it is not the fastest X Window server you can find for Windows
  • the GNU C/C++ compiler suite, while not stricly needed either, allows you to build other packages like e2fsprogs to create, format, check, enlarge coLinux images...

so in short, it is very handy and indeed many coLinux users are also heavy Cygwin users.

oh, Cygwin is mostly GPL, with some parts with other rather similar licences (Apache, X11).


Q18. What about those 'modules' that are mentioned too ?

  • modules are bits of kernel code that can be dynamically loaded and unloaded on demand. You can think of them as kernel drivers or system DLLs, but anyway they are just files.
  • since coLinux works in an unusual way from a Linux point of view (the kernel is this file called vmlinux and is "outside" any Linux partition), coLinux modules currently have to be "injected" into your co Linux filesystem and stored into a directory named /lib/modules/ <kernel-version>-co-<coLinux-version>, for example : 2.6.7-co-0.6.2
  • coLinux usually ships with a vmlinux-modules.tar.gz file containing modules
  • as for snapshot 040622, they include :
  • support for some filesystems including NTFS, XFS, NFS and Minix (boot floppies)
  • various cryptography modules,
  • net drivers, some netfilter stuff...
  • to install them, copy the archive vmlinux-modules.tar.gz into coLinux and extract the files to the right location, similar to /lib/modules/2.6.7-co-0.6.2
  • if necessary, install module-init-tools (Debian could complain about modconf, ignore it)
  • reboot then do the usual administration with lsmod, modprobe, modinfo...

the good news is, you should not need them for a while, so forget about them for now :)


Q19. How do I build my own kernel for coLinux?

The kernel included with coLinux should work for most people, but some people might need to roll their own. Here is a quick overview of how to make a Linux-2.4.27 kernel that works with Co Linux. I'm running Gentoo, and I'm building from within my coLinux environment, but the general idea should work for everybody.

  1. Set up a development environment with GCC 3.3.3 (or earlier). The 2.4.27 and earlier kernel sources won't compile with GCC 3.4.1. Under Gentoo, you can install GCC 3.3.3 with "emerge '=gcc-3.3.3'", and then you can switch between GCC 3.4.1 and 3.3.3 with gcc-config.
  2. Get 2.4 kernel sources and extract them to /usr/src. coLinux 0.6.1 was released against 2.4.26, so that is the safest version, but I've been using 2.4.27 for a while now with no problems. Under Gentoo, use "emerge vanilla-sources".
  3. Get the coLinux-0.6.1 source tarball. Extract it on your development platform.
  4. Patch the kernel with the coLinux patch:
    • cd /usr/src/linux
    • patch -p1 < (extraction-point)/colinux-20040529/patch/linux
    • Fix anything that didn't patch correctly. On my machine, /Makefile didn't patch (just edit Makefile and add "-co-0.6.1" at the end of the "EXTRAVERSION = " line), and drivers/block/Makefile didn't patch (add "obj-$(CONFIG_BLK_DEV_PBD) += cobd.o" somewhere).
  5. Copy the default config from the coLinux sources:
    • cd /usr/src/linux
    • cp (extraction-point)/colinux-20040529/conf/linux-config .config
  6. Configure your kernel as needed with menuconfig ("make menuconfig").
    • You probably don't want to mess with Processor Type - coLinux can crash if the kernel tries to use processor features that coLinux isn't expecting the kernel to mess with. You can enable /dev/cpu/*/cpuid, but I suggest not messing with anything else. Make sure to leave COPIC Support enabled.
    • Under General Setup, don't enable PCI, ISA, EISA, MCA, etc., unless you want coLinux and Windows to fight over hardware. Do leave Cooperative Mode enabled.
    • Under Block Devices, leave coLinux block device support enabled.
    • Under Network Device Support, leave Coooperative Virtual Ethernet driver support enabled.
    • Under Console Drivers, leave coLinux Pseudo-VGA text console enabled.
    • For Gentoo, make sure to enable /proc, /dev, automatically mount /dev, and disable /dev/pts.
      • Apply any other patches as needed. I applied the CIFS VFS patch to replace the dated SMBFS module.
      • make dep && make vmlinux modules modules_install
      • Back up the vmlinux that was installed with coLinux.
      • Copy /usr/src/linux/vmlinux to your Windows coLinux directory (overwrite the original vmlinux that was installed with coLinux).
      • Restart coLinux.

Q20. Why do virtual harddisks have a special device name cobdX in coLinux instead of /dev/hdX used under standard installations or in vmware?

Because they were named so (as COoperative Block Device).

Note that you can create alias to hdX, by adding an alias="hda1" to the block device in the XML config file (it can be "sda1" or whatever). This is most usefull in multi-boot configurations.


Q21. Is it possible to run coLinux under Windows NT4.0?

no. some system calls are missing in NT 4 (even with SP6) and present only in 2000, XP and 2003.


Q22. Is it possible to run coLinux on older Hardware? ~450MHZ?

coLinux with (Apache, mySQL, PHP + Windowmaker) runs with a good performance on a Win2K Pentium 3 450MHZ 256MB machine. And it's very stable. It's ideal as separate webserver on a window machine.


Q23. How can I mount a CD/DVD-Drive to use apt Debian-DVDs (for example) ?

Add the DVD as drive to your command line:

   cobd4=\Device\Cdrom0 hdc=:cobd4

Or into your XML configuration file:

   <block_device index="4" path="\Device\Cdrom0" alias="hdc" enabled="true" />

Inside coLinux you can mount for sample as /dev/hdc or /dev/cobd4. On some distries use /media/dvd, on others is /media/cdrom, or /cdrom. On linux is this for sample:

   mount /dev/hdc /media/cdrom -o ro

Q24. Can I run coLinux natively from within an NTFS partition without creating a 'block device' or hard disk image ?

NO, if you mean in a subdirectory. Booting Linux needs a Linux filesystem with extended attributes for user permissions, special files such links and more. All of this can't be done on NTFS. Not in the current release anyway.

But you can connect a USB-Harddisk (or big USB-stick) and use coLinux on this in a partition.


Q25. Does the coLinux kernel support Unicode and UTF-8?

No, the default configuration has only enabled NLS for "iso8859-1". If you rebuild the kernel, you can enable the UTF8.

Note that this doesn't mean the GNU/Linux system doesn't support Unicode or UTF-8. This is only about the kernel.


Q26. Why does my network only work sometimes?

Check you are not running VPN software. Some VPN software is very intrusive with the windows network stack. Easy to check if that is the problem, because colinux will start work as soon as the VPN software is shutdown.


Q27. Does coLinux work under Windows XP 64?

The answer is: assuming you can find all the correct drivers, maybe. TAP Win32 won't work on XP64 - you need TAP Win64 (see http://openvpn.se/development.html) WinPCAP 3.1 won't work, but the 3.2Alpha1 will install correctly. I still havn't found an XP64 version of 'linux.sys', but assuming you could find it, that should satisfy the dependencies.


Q28. How can I increase the size of a coLinux block device image?

see also:ExpandingRoot

  1. From windows, create a blank file of the new size. For 5GB=5*1024*1024*1024Byte in cmd.exe: fsutil file createnew C:\??? 5368709120
  2. Edit the config.xml to add the blank file as a new device, and restart colinux.
  3. Format filesystem. mkfs.ext3 /dev/cobd1
  4. Mount it. mkdir /tmp/mnt; mount /dev/cobd1 /tmp/mnt
  5. Copy contents to new device. cp -ax / /tmp/mnt
  6. Only in udev systems: Copy device nodes. cp -a /dev/* /tmp/mnt/dev/
  7. Lets sync the data, a saver step for some systems.sync
  8. Unmount new device. umount /dev/cobd1
  9. Shuting down coLinux. shutdown -h now
  10. From windows, edit the config.xml again. Change the entry of the old device to use the newly created file. Then remove the entry created above.
  11. Restart coLinux.

Keep the old file until you are sure the new one works!!!!----

Q29. Debian apt-get problems with e2fsutils

When installing new packages you may get the following error. "This installation run will require temporarily removing the essential package e2fsprogs due to a Conflicts/Pre-Depends loop..."

  1. Run the following:

apt-get -o APT::Force-LoopBreak=yes install e2fsprogs

  1. After this completes, install the other packages you require.


Q30. compress image file smallest possible

(found at the mail list) When you want to compress an imagefile: for example you compress your fresh installed image file so you can decompress it and have a fresh installation. It can become big because the empty space is not really zero so your compressor makes the file big.

  • start with another image file and set the image you want to compress in the xml conf file in this example hda2
  • mount the image into /mnt
mount /dev/hda2 /mnt
  • remove colinux modules
rm -rf /mnt/lib/modules/*-co-*
  • remove wtmp
rm -f /mnt/var/log/wtmp
  • remove all from tmp
rm -rf /mnt/tmp/*
  • clean apt get
/mnt/src/var/state/apt/lists/ayo.freshrpms.*
/mnt/src/var/cache/apt/*.bin
  • or clean yum
chroot /mnt
yum clean all
exit
  • get the number of available space in mb
df -m
#Filesystem	1M-blocks	Used	Available	Use%	Mounted on
#/dev/hda2	1984		750	1132		40%	/mnt
  • make a file filled with zero which is almost as big as the empty space in hda2. For count do the available size of hda2 minus 2
dd if=/dev/zero of=/mnt/foobar bs=1M count=1130
  • remove the zero file
rm /mnt/foobar
  • clean /mnt/root/.bash_history
  • Unmount the image from /mnt
umount /mnt
  • change mountcount etc
tune2fs -c 0 /dev/hda2
tune2fs -T 20070101 /dev/hda2

If you compress it now, it will become much smaller.


ManuallyAdjusted on Sun Apr 23 22:20:12 UTC 2006

Advertisement