Created
February 7, 2013 10:34
-
-
Save InformatiQ/4730143 to your computer and use it in GitHub Desktop.
creating a debian VM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* qemu-img create -f raw debian-disk.raw 8G | |
* fdisk debian-disk.raw | |
** create 1 primary partition | |
* kpartx -av debian-diak.raw | |
* mkfs.ext3 /dev/mapper/$disk | |
* mount /dev/mapper/$disk /mnt/debian | |
* debootstrap wheezy /mnt/debian | |
* chroot /mnt/debian | |
* apt-get install grub2 vim linux-image-amd64 udev openssh-server | |
* create fstab | |
* create /etc/network/interfaces | |
* edit hostname hosts | |
* exit | |
* grub2-install --boot-directory=/mnt/debian/boot /dev/loop0 | |
* create grub.cfg | |
* sync | |
* umount /mnt/debian | |
* kaprtx -d debian-diak.raw | |
start the vm and check it | |
references: | |
* https://wiki.archlinux.org/index.php/Creating_Arch_Linux_disk_image#Install_bootloader_on_the_guest | |
* https://gitorious.org/vmdebootstrap/vmdebootstrap/blobs/raw/master/vmdebootstrap | |
* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment