LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 04-20-2004, 12:44 AM   #1
whohasit
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: Fedora Core 1
Posts: 34

Rep: Reputation: 15
Remote Installation Fun


Overview:

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.

- will
 
Old 04-20-2004, 02:07 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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'
 
Old 05-02-2004, 03:40 AM   #3
whohasit
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: Fedora Core 1
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks for responding!.. I've just now started this project.

Since I'm not running Debian (Fedora), I won't have the luxury of using debootstrap.

Can you describe "mount new proc" step below? At this point, will I create/mount an empty /proc? What will I be mounting?

Anyway, I've been using grub for the past couple years now so I'll be trying this in place of lilo first, as well.


Thanks again,
-will
 
Old 05-02-2004, 06:32 AM   #4
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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.
 
Old 05-02-2004, 04:14 PM   #5
whohasit
Member
 
Registered: Nov 2003
Location: Seattle
Distribution: Fedora Core 1
Posts: 34

Original Poster
Rep: Reputation: 15
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).

/etc/grub.conf
kernel /boot/vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/
-- changed to --
kernel /boot/vmlinuz-2.4.22-1.2174.nptl ro root=/dev/hda2 rhgb
and
/etc/fstab
/ / ext3 defaults 1 1
-- changed to --
/dev/hda2 / ext3 defaults 1 1


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)

<http://www.linuxmanagers.org/piperma...il/001552.html>


Thanks Again,
Will
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
remote installation jmgtan SUSE / openSUSE 2 11-18-2005 06:53 PM
Remote Installation bhaliyajalpesh Linux - Networking 1 08-13-2005 04:27 PM
Remote Installation - How to? Cinnom Linux - Newbie 1 05-31-2005 06:30 AM
Remote Installation Parksy Linux - Networking 2 08-13-2003 08:26 AM
Installation via remote CD davidrose Linux - Software 2 06-21-2003 08:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration