Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
drive imaging on gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
niyogi
Apprentice
Apprentice


Joined: 10 Apr 2002
Posts: 199
Location: Austin, TX

PostPosted: Wed Apr 10, 2002 4:22 pm    Post subject: drive imaging on gentoo Reply with quote

I wanted to spark a discussion on drive imaging on Gentoo installations.

Here's the reason: It takes >=5 hours to install Gentoo. It could be the case that a sys admin either a)wants to install the same setup on dozens of identical machines or b)wants to be able to recover from a unrecoverable crash/setup. Having a image of the hard drive and slapping on there would be much faster and intuitive then reinstalling everything.

The thing is: I don't know how to do this or better yet what the best way would be. Any ideas?

-S
Back to top
View user's profile Send private message
Jamon
Guest





PostPosted: Wed Apr 10, 2002 6:48 pm    Post subject: Well... Reply with quote

Well.. you can try Partition Image for Linux! I have not tried it, but let me know what you think.

Jamon

http://www.partimage.org
Back to top
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Wed Apr 10, 2002 8:36 pm    Post subject: My 2 cents: Reply with quote

To create a real image one would use dd. To create an image of an entire drive you'd do something like:
Code:
dd if=/dev/hda of=/mnt/some/nfs/mount

Then to restore it try:
Code:
 dd if=/mnt/some/nfs/mount of=/dev/hda

That should copy everything including bootsector (I think, correct me if I'm wrong). I would imagine that you would only want to do this on a system running of a boot disk or boot cd so that when you make the image you don't copy session specific stuff like /etc/mtab, and you obviously can't apply an image to a drive that you have mounted.
_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.
Back to top
View user's profile Send private message
Jamon
Guest





PostPosted: Wed Apr 10, 2002 9:56 pm    Post subject: Well, Reply with quote

Of course that would work, but many would like to be able to use the image on a different size drive, and also compressing it would be nice! (though bzip could do that..)

Jamon
Back to top
Guest






PostPosted: Sat Apr 13, 2002 10:30 am    Post subject: Re: Well, Reply with quote

Jamon wrote:
Of course that would work, but many would like to be able to use the image on a different size drive, and also compressing it would be nice! (though bzip could do that..)

Jamon


Well, we usually install one reference machine including a very stripped down package set and a tailored kernel. After that, we put the drive(s) in a different machine, mount everything short of the virtual filesystems (/dev, /proc ...) below /mnt and create a tar.bz2 from that. That tarball in turn is put onto our install server.

Now when a new machien has to be installed, we boot off the net, mount the install servers NFS share (which includes all tarballs), partition the drives etc. and untar the tarball from the NFS share. After that, a quick edit of fstab, and the network conf, a chroot plus updates (in case of a debian: apt-get update, apt-get dist-upgrade, gentoo works similar with emerge) and a lilo (or grub-install). Voila, machine done. And even this could be further simplified by using scripts+dialog (but hey, gotta think of job security :wink:)
Back to top
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum