LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to utilize Clonezila (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-utilize-clonezila-4175416466/)

Elv13 07-15-2012 02:57 PM

I suggest installing the DRBL version of Clonezilla on a CentOS 5 server (because it work). Then you can enable "network boot" in your clients and have a centralized clonezilla install. You can then use the clonezilla server UI to select a computer to backup then apply that image to any given number of other clients at once by selecting their MAC address. Once it is setup, it work really fine.

As usual, Fedora 14 is past end of life, please consider using a newer version such as Fedora 17. Fedora 14 wont get security updates anymore.

uk.engr 07-16-2012 02:20 AM

Thank you so much DaneM for your this research work and giving me your time. I am now going deep to your above posts and follow your new instructions and then will come back to you soon, Thanks!

DaneM 07-16-2012 11:12 AM

The Last Instructions
 
Excellent suggestions, Elv13; all very good ideas. I had trouble getting drbl installed-and-working, last I tried, but it's possible that I just didn't "dig into it" enough, or that the version/distribution was having problems.

I definitely recommend upgrading to FC17.

uk.engr, I'm glad you seem to be doing well with these instructions. :-)

Without further adieu...

Here's the last part in the instruction set: how to resize the /home partition on the new Fedora machine!

Before starting, make sure you know the size that you made the /home partition on the "template" machine. We'll be resizing that partition on the "target" (production) machine. You will need an Internet connection and probably 1GB or more RAM.

Quick note volume names: your logical volume group's name is derived from the name of the machine from which you created it. Mine was named, "SmallFedoraTest," so my LVG's name was truncated to, "vg_smallfedorate"--which is annoying to type. I suggest that your production images be made from a machine named something like "core," so that your LVG is called, "/dev/vg_core/", and all your partitions for the system are storeed in that directory (such as, "/dev/vg_core/lv00). Of course, it's not really important, but it might be more convenient.

Much of the following comes from here:
http://home.roadrunner.com/~computertaijutsu/lvm.html

Boot Fedora "target" machine (the one you've installed the "base" Fedora image onto with CloneZilla) using Fedora Live CD. Note: Failure to use a Live CD will result in errors and/or an utterly "dead" Fedora installation.

Choose, "Try Fedora"

Go to Activities > Terminal (use search bar to find it)

Do this:
Code:

su
lvdisplay | less

Look for an LVM partition of the size that you made the /home partition when you installed Fedora on the "template" machine. Make sure that the other partitions aren't the same size, just to be sure that you have the right one. Use PgUp and PgDn or arrow keys to scroll, and make a note of the /dev path to the right partition. You may want to highlight the appropriate "/dev/blah/blah" entry and click "Copy." Press "q" to quit the text output view.

Now, type this into the terminal (as root):

Code:

print
[note the largest number for "end," as well as the size of the drive]
mkpart

choose any filesystem type; ext2 is OK

For "Start" enter the "end" value, above--such as, "16.1G" for 16.1 gigabytes, as reported by the "print" command.

For "End" enter the total size of the drive, as reported by "print"--such as, "107G" for 107 gigabytes.
(This may be different from the "actual" size of the hard drive, depending on how you calculate 1MB and 1GB.)

Type, "print" and verify that you now have another partition that starts and ends at the places you specified.

Now, exit Parted with the "quit" command.

Now, we're going to use the /dev name of the entire volume group to add the new partition to it as additional space. The immediately-relevant part for the first step is directory before the filename, such as the "vg_smallfedorate" in "/dev/vg_smallfedorate/lv00". Later, we'll use the full path. The partition number you just discovered, above, such as "/dev/sda3" will be added to the LVM with the vgextend command. Back in the terminal, type the following (as root):

Code:

ls /dev/sda*
[Note the /dev/sdaX entry of the new partition.  It should be the one with the largest number.]
vgextend vg_smallfedorate /dev/sda3
[Change the above names/values to match your configuration.]
lvextend -l 100%FREE /dev/vg_smallfedorate/lv00
[/dev/vg_smallfedorate/lv00 is the name of my /home LVM partition.  Change this to match yours.]

Now, we need to resize the filesystem to fit the new partition. Because the Fedora 17 Live CD lacks e2fsprogs, we must first install that package. (If your version of Fedora uses a different name for this package, do, "yum provides resize2fs" to discover the package name.)

Code:

yum install e2fsprogs
[Follow the prompts.]
e2fsck -kDfpv -C 0 -E fragcheck /dev/sdc1
[You can look up the options with "man e2fsck".]
resize2fs /dev/vg_smallfedorate/lv00
[By default, this uses all available free space.]
e2fsck -kDfpv -C 0 -E fragcheck /dev/sdc1
[Running it again, just to make sure the filesystem is still OK.]

The e2fsck commands fixed some errors in the filesystem when I ran them, so I strongly encourage you to do so as noted.

Now, we'll make sure that the partition really is as big as it should be. Remember to replace the path and partition name with your own. (Still using root.)

Code:

mkdir /mnt/test
mount /dev/vg_smallfedorate/lv00 /mnt/test
df -h | grep lv00

This gives me the following:

/dev/mapper/vg_smallfedorate-lv00 86G 1.3G 81G 2% /mnt/test

...which means that my newly-expanded LVM partion and filesystem is 86GiB in size (note that parted, fdisk, nautilus, df, etc. all report this using different math, so the number will change--which is annoying), it has 1.3GiB in-use (partly by filesystem data, partly by user-accessible data), and 81GiB free--which comprises 2% of the total space on the volume. The last bit is just where we've mounted it so that we can get this info.

Now, unmount the partition with, "umount /mnt/test" and reboot. (Remove the CD as appropriate.) If all went according to plan, you now have a shiny new Fedora desktop system that's exactly like the one you cloned, but with a bigger hard drive and /home partition. Don't forget to change the hostname! :-)

Let me know if any of this is unclear; I realize it's a bit complicated. Also, I didn't do much "proof reading" of this last bit--though I did the commands as I wrote them--so please inform me if there are any important typos or such.

Have a good one!

--Dane

DaneM 07-23-2012 10:46 AM

Is it solved?
 
uk.engr,

I just wanted to follow-up and see if this thread's question is "solved." If everything is working well for you, please click the "mark as solved" link at the top of the thread.

Have a good day.

--Dane

uk.engr 07-24-2012 12:04 AM

DaneM thanks for your guidance. Actually I was assigned some other tasks in office so I was concentrating there. Thank you so much for such kind of help.

DaneM 07-25-2012 01:42 PM

You're very welcome--and there's no rush; I was only curious to know if you were "all set." Good luck in all your work.

--Dane


All times are GMT -5. The time now is 03:38 AM.