I have been running a virtual machine of Debian sarge under VMware at work. I have eventually convinced the geeks around here a Debian machine would make a nice addition to the network.
It took quite a lot of whining and fits over stupid RPM packages. It is such a nightmare to find packages for the things I need. There are several RH machines at work and they’re all horribly out of date because it is so difficult to upgrade them.
I had real difficulties building CVStrac on a RH9 machine (for the Joel test ) and in the end people went with the Debian server. I offered to get the network clients going properly with DHCP, instead of guessing a local address that might not be taken.
The Debian dnsmasq package did the trick here. It is so sweet and simple (without resolvconf), DNS and DHCPd in one. I put in the critical/server machine names in /etc/hosts whose IPs are between 192.168.0.1/50 and setup the rest of the network in /etc/dnsmasq.conf to get an IP over .50 from the dhcpd in dnsmasq. No more BIND on an ancient machine.
There were some strange problems when I /etc/init.d/networking restart the Debian machine to take over the DNS. The NFS mounts came up with permission denied errors, though their orginal exports were for the entire local network. A remount solved the problems. Since the cvstrac IP changed with Debian, the windows machines needed a ipconfig /flushdns. Pretty painless overall, considering it is afterall DNS.
Since I have Debian under WinXP in VMware becoming more and more important, I now have a physical machine to put it on. But, urm… I don’t want to install Debian all over again and copy the files. Is there some easier way from VMware to a live physical machine?
Here’s what I’d do (I’m not saying it’s the ideal solution, it’s just the one I think of first):
Take the hard drive from the real machine and put it into your WinXP+VMware box. Set up that drive to be a physical disk under VMware. Make a filesystem on the drive and mount it somewhere, say /target.
Now rsync everything over:
rsync -vSHaxP / /target
That command won’t cross filesystem boundaries, so if you have other filesystems, you’ll need to rsync those too, e.g.:
rsync -vSHaxP /var /target
(Make sure NOT to include the trailing slash on your other filesystems… e.g. ”/var”, NOT ”/var/” !!)
Now everything should be copied over. All that’s left is the master boot record. Put the drive back in your real machine, boot from a debian boot CD (“linux root=/dev/hda1”) and then reinstall lilo or grub on the drive.
Hopefully that should work!
If I am going to rsync it, I might as well boot the “real” machine with a Live-CD and rsync via the Gigabit ethernet.
Though I am not sure how to partition the hard drive on the real machine.
Hmmm, a sense a feature request for the debian-installer.
It seems to me that both bootcd and mondo would allow you to create a backup of your debian install that can be restored to your newly acquired server and will create bootable media to kick off the restore from on a bare machine.
Both are naturally apt-gettable on sarge, see:
http://packages.debian.org/testing/utils/bootcd
http://packages.debian.org/testing/utils/mondo
HTH
Regards,
Mamading
Thanks for the comments everyone.
bootcd says:
—- Sizes in KByte (du -klsc )—-
NOT_TO_CD = . . . . . . . . . . . . . . . . . . . . . . . . . . . 0
CD_ALL (SRCDISK v NOT_TO_CD) = . . . . . . . . . . . . . . . . . . 5931620
Needed = CD_ALL – NOT_TO_CD . . . . . . . . . . . . . . . . . . . 5931620
CD (650 MB) = . . . . . . . . . . . . . . . . . . . . . . . . . . 665600
—- WARNING—-
SRCDISK does not fit on CD (Needed > CD)
—- (e)xit (i)gnore—- e
So I am going to download the sarge netinst. Set up a base machine. And then rsync and get the selections of my vm Sarge.
ARGH!! In the end I did it by hand:
http://dabase.com/e/01122/