Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1 "Dedicated Server" 3000 miles away with 2 identical 80Gb drives!!!
Clone Drives?
It's a remote machine with two totally identical drives (/dev/hda & /dev/hdb) running Fedora Core 1.
/dev/hdb has been formatted - identical to /dev/hda, - but that's all... (I can now mount it, etc.)
Uptime and machine boots are currently using good ol' /dev/hda.
Now, I need to install a new, identical (backup) OS onto which I'll regularly mount and do 'in situ' backups so that if /dev/hda fails, the remote techs can swap out the drives and we'll keep moving.... (for our situation, this is more desirable than RAID).
Can someone propose the most desirable strategy (or better)?
1. I'm thinking that I'll create a directory under /dev/hda to hold the images, boot (somehow) into the installation choosing /dev/hdb2 as the install point (/dev/hdb1 as the boot partition) and go from there, installing grub in the same place (pointing to the image on /dev/hdb1).
At that point (I believe) I should still reboot into hda (because it's looked at first), but in the event of a drive failure and hda is removed (or replaced by a blank disk), hdb should boot and we'll do this all over again using the new drive once we've stopped our panicking.
Any other ideas?
2. How about just doing a straight copy of all files as they are now from both [hda1]/boot and [hda2]/ to [hdb1]/boot and [hdb2]/ ... If the [hda] fails, and the techs physically swap [hdb] into position [hda] and place a new hdb into that vacant spot, we're good to go, right?.
NOTE: I should mention that the #2 solution is less desirable because I'd really like to just do a clean install on drive 2 right now and do a full round robin now on both drives.. The dedicated servers these days are quite loaded with lots of C.R.A.P., control panels, etc... unnecessary trouble from where I sit, but I realize this project is probably just a twist on #1solution above..
I hope this thread will provide many years of enlightenment... I've searched for old threads but I probably not alone.
So basicly you want to make other bootable system from inside other.
One of the easiest ways to make other bootable system is to copy contents of
your / directory excluding /var, /usr /home, /mnt (and /opt and other custom-directories), chroot into new system(and mount new proc), edit new systems lilo.conf to match current situation(root will be /dev/hdaX, but lilo is going to be installed into /dev/hdb that is later going to be /dev/hda) and run lilo.
Alternatively if you dont want to take copy of your running system, you can install a clean gnu linux system into other partition by running installer to it. Don't know about fedora, but in debian it happens with command:'debootstrap woody /mnt/newroot http://http.us.debian.org/debian'
Then mount a proc filesystem. It doesn't care a name of a mountpoint, but
traditionally the command is writen as: 'mount -t proc proc /proc', or
'mount -t proc none /proc'; the second string is arbitrary.
Thanks so much for your help... this is working now.
After chroot-ing into the new mounted drive and mounting /proc, I did this:
>grub
grub> root (hd0,0)
grub> setup (hd0)
After swapping the drives and rebooting, I got mkrootdev: label / not found
So, after a little research, I realized that I needed to edit /etc/grub.conf and /etc/fstab to simply reflect the proper bootloader configurations that now used the device syntax (/dev/hda2).
When doing that research, I found another interesting, possibly simplier way to do the whole thing, but I don't believe the author attempted to do this without a boot disk (chroot, mount /proc)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.