Creating a Bootstrapped Debian Image

Create a 1 GB image file and 500 MB swap file, for larger images increase count.

dd if=/dev/zero of=debian-sarge.img bs=1024k count=1000 dd if=/dev/zero of=debian-sarge-swap.img bs=1024k count=500

Format them accordingly..

mkfs.ext3 debian-sarge.img mkswap debian-sarge-swap.img

Mount the guest image and bootstrap it. 

mount -o loop debian-sarge.img /mnt

Installl a Debian

debootstrap --arch i386 sarge /mnt http://ftp.us.debian.org/debian/

Create a fstab 
chroot /mnt mount /proc cd /dev && /sbin/MAKEDEV console && /sbin/MAKEDEV std && /sbin/MAKEDEV generic apt-get install udev locales

You’re set to go….

Related posts:

  1. Converting a VMWare image to a RAW (ISO) Image
  2. Upgrading from 2.4.27 to 2.6.11 on Debian
  3. Comprehensive Debian (unstable) /etc/apt/sources.list
  4. SiS + Debian
  5. DWL-122 + Debian HOWTO

2 comments

  1. peterschen says:

    Hey,

    maybe it should be clarified that you have to make up the fstab yourself and also should install a kernel if you consider booting the image.

    I used the method described here with knoppix in a VirtualBox VM. So I created a running system without needing an allready installed one…

    Groetjes

    Christoph

  2. e says:

    All good points. The reason they were overlooked in this illustration is that the derived image was used on Amazon EC2 where they provide the kernel for you and don't boot from the one in the image.

Leave a Reply

Your email address will not be published. Required fields are marked *

*