Date: Thu, 27 Sep 2007 12:31:10 +0200 From: Erik Cederstrand <erik@cederstrand.dk> To: freebsd-questions@freebsd.org Subject: gzip compression problems Message-ID: <46FB866E.5040900@cederstrand.dk>
next in thread | raw e-mail | index | archive | help
Hi! I'm trying to create a custom disk image for installing on a server. The plan is to PXE boot the server and dd the image to the hard-disk of the server. The gzipped files I need for the server are 45MB. However, when I create a 4GB image, stick the same files in there and gzip the image, the resulting file is 251MB. Most of the image is just empty space, so I was expecting the gzipped image to be roughly 45MB. What's going on? I used the following commands to create the image: # dd if=/dev/zero of=/path/to/diskimg bs=1k count=4m # mdconfig -a -t vnode -f /path/to/diskimg -u 4 # fdisk -BI -b /boot/mbr md4 # bsdlabel -B -b /boot/boot -R md4s1 /path/to/disklayout # newfs /dev/md4s1a # mount /dev/md4s1a /mnt/ # make installworld DESTDIR=/mnt # make distribution DESTDIR=/mnt # make installkernel DESTDIR=/mnt # umount /mnt # fsck -t ufs /dev/md4s1a # mdconfig -d -u 4 The contents of /path/to/disklayout: # /dev/md4s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 3G 16 4.2BSD 2048 16384 8 b: 500M * swap c: * * unused 0 0 Thanks, Erik
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46FB866E.5040900>