Monday, October 09, 2006

Making a Large Sparse coLinux Disk Image

The directions given for ExpandingRoot - coLinux are pretty good. Instead of fsutil I used:

dd if=/dev/zero of=colinux_new bs=1 seek=10737418240 count=0
in Cygwin to create a spase cygwin_new file. Then I started coLinux, logged in as root and zero'd out most of the freespace in cygwin_old so that mkSparse could reduce the size of cygwin_new


# e2fsck /dev/cobd4
# df
# dd if=/dev/zero of=/tmp/fill count=...
# rm /tmp/fill
This zero'd out most of the free space in cygwin_old. Then I did what ExpandingRoot - coLinux said to do:
# dd if=/dev/cobd4 of=/dev/cobd5
# resize2fs -p /dev/cobd5
# e2fsck /dev/cobd5
# shutdown now -h
After downloading mkSparse from the coLinux file-utils described on the NiceTools page of the coLinux Wiki, I ran:
C:\coLinux> mkSparse colinux_new
This turns colinux_new into a sparse file that takes up much less room on the drive. After this is done I finished up by continuing at step 7 on the ExpandingRoot page.

No comments: