Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to run a virtual machine in my Ubuntu desktop that runs a Debian server.

The purpose of this is to generate Debian packages. I have some C++ applications that were originally developed on my Ubuntu machine, and I need to (re)compile them on a Debian server in order to:

  • build Deb packages for deployment on a Debian server
  • make sure that the applications will definitely work on a debian server

The idea is so that I can do 90% of my development on Ubuntu (where I am more comfortable), and deploy a binary package that definitely works on Debian.

BTW, I am developing on Karmic Kola (Ubuntu 9.10).

[Edit]

Following the advice I got so far, I have installed debootstrap and Debian 'Lenny' on /srv/chroot/debian_lenny on my machine. I am not sure this is the server version, but in any case I dont think that matters for my purposes (though it would be useful to know how to specifically install the server version).

At the moment though, I am like a fish out of water, since there is no GUI, and it is only a console that I have in the chroot jail. I had a look in the home folder (I cheated, by using the KNavigator in Ubuntu), and there are no folders there - which presumably mean that no users have been set up as yet in the Debian "system".

I would like to know how to do the following:

  1. Download and install the dev tools needed for (re)compiling my C++ apps
  2. Copy my projects from the Ubuntu "system" to the Debian "system"
  3. After building the binaries, I would like to create a debian binary package containing all of my binaries, so that I can install the package on a Debian server (my remote server)
share|improve this question

migrated from serverfault.com May 7 '10 at 6:47

This question came from our site for professional system and network administrators.

    
That's nice for you, do you have an actual question? –  Chopper3 May 5 '10 at 16:21
1  
You almost certainly don't need a full VM. A simple chroot is usually fine for building packages. The official buildd servers simply use this method. See: debian.org/devel/buildd/setting-up and help.ubuntu.com/community/DebootstrapChroot –  Zoredache May 5 '10 at 16:54
add comment

3 Answers

use virtualbox for this task

share|improve this answer
    
or KVM, it's already installed after all –  Chopper3 May 5 '10 at 16:44
add comment

Many Debian developers (and probably Ubuntu too) use chroots for a simpler way to get a separate filesystem for development. You use debrootstrap to create your Debian or Ubuntu filesystem then use schroot to help manage and enter the chroot.

https://help.ubuntu.com/community/DebootstrapChroot

If you save your filesystem in a LVM logical volume, you can save your original install as a read-only volume and then make writable snapshots to customize the install for specific projects. You could also check out the snapshot features of the new btrfs filesystem.

share|improve this answer
    
andmalc: thanks for the info. It sounds like what I need to do. Problem is I dont understand half of what you wrote (I am relatively new to Linux) - this is why I went the Ubuntu way, which was more GUI based. I will do some reading up on some of the terms you mentioned: chroot, debrootstrat, schroot, LVM etc. I will be grateful however, if you can explain some more, how to carry out your recommendations (i.e. the steps required). –  stickman May 5 '10 at 19:38
add comment

His link gives a pretty good rundown of debootstrap and chroot.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.