Overclock.net banner

1 - 6 of 6 Posts

·
Linux Lobbyist
Joined
·
3,745 Posts
Discussion Starter · #1 ·
I asked this question over in the Servers section, but I was advised to ask it here also.
Quote:
I'm thinking of renting a server in a remote datacentre for a project or two. However, I would like to be able to create a "golden image" Linux installation at my desktop using VirtualBox or VMware, convert the disk image to raw and then image the remote server's hard disk with it.

Is this possible?
I also asked the question over at [H], where I was advised that such a thing is possible with IPMI. If anyone else has experience of doing this and is willing to offer advice, it will be appreciated.
smile.gif
 

·
Linux Lobbyist
Joined
·
2,040 Posts
It is actually quite possible, there are several ways to approach this type of tasking, and depending on the amount of ram you have available and how confident you are in your skills, and the total size of the current system image, you can do things pretty easily.

For example, recently I helped someone over VNC setting up a Linux installation - however their install media was way out of date, and their system was very new. Couple this with the lack of any bare metal OS (wiped disks) and we had no real way to get the new install media onto the flash drive (since the live disk was running from the flash drive and not all ram)

Basically, copy the contents of various mountpoints to /tmp
Then, umount and simultaneously mount -o bind those mountpoints. (Any submounts can then be mount -o remount)

Here's how I did it:

Code:

Code:
sudo cp -R /mount/iso /tmp/iso
sudo umount /mount/iso && sudo mount -o bind /tmp/iso /mount/iso
sudo mount -o remount /path/to/submounts
Afterwards you can then freely write to the now unused disk:

Code:

Code:
sudo dd if=/path/to/img of=/dev/sda
Obviously this is using only what was available to me at the time, there are probably much better (and safer) ways to do this remotely. I had a low-risk opportunity to try this since it wasn't a production environment, and if it broke stuff he could simply reboot to a working live install.
 

·
Linux Lobbyist
Joined
·
3,745 Posts
Discussion Starter · #3 ·
@Xaero

Many thanks for your reply, it was very helpful.
smile.gif
I'll probably also have to look more deeply into IPMI to see what it can do, then set up an infrastructure to support what I need.
smile.gif
 

·
Registered
Joined
·
2,232 Posts
Kind of a tangent from your question as Xae has already given you a great answer ^,^ So you may find useful (you probably wont!)

You may also want to look into kickstart scripts https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/ch-kickstart2.html, they allow you to standardize how the install happens, so you can have a always upto date iso which makes your golden image for you. You can then add this to the disk ala https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/s1-kickstart2-putkickstarthere.html and have the data center install your iso.

Another side note, you looking at a VPS are physical? If you went down the VPS route there may be providers willing to just boot your image so no messing around
biggrin.gif
 

·
Linux Lobbyist
Joined
·
3,745 Posts
Discussion Starter · #5 ·
@Ulquiorra

Many thanks for the tip.
biggrin.gif
The target machine is a dedicated piece of server hardware; VPSes are nice and flexible, but this project has a security requirement which precludes a VPS.
 
1 - 6 of 6 Posts
Top