LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Transferring OS to new Hard Drive (https://www.linuxquestions.org/questions/linux-newbie-8/transferring-os-to-new-hard-drive-172469/)

thenebula 04-20-2004 08:34 AM

Transferring OS to new Hard Drive
 
Greetings,

I have a Toshiba Magnia Server running RH7.x on a 20GB hard drive.

I am getting several more of these without hard drives.

I want to transfer (copy) the existing OS to new hard drives (probably 40 or 60GB capacity) and install them in the new servers. The image includes a lot of other data files and the server setup.

The server is already set up to create an "image" of one hard disk to another in a separate slot provided. But because of the way it creates a "snapshot," the hard disk will then be a 20 GB partition, wasting the rest of the space.

I also have Red Hat 9.0 running on another computer on the network. I have plenty of space to back up the entire system on that computer...and then copy it on to a blank HD connected via USB 2.0

I am not all that familiar with Linux...but I would appreciate any guidance anyone can offer about the best way to get the OS off a 20GB drive onto a larger drive intact...with more space available for files.

Thanks!

jcookeman 04-20-2004 09:21 AM

The easiest way would be to install the new hard drive, boot up from a live cd, copy the entire contents over to the new partition/drive, chroot the partition and reinstall the boot loader.

Assuming /dev/sdb is the new drive and /dev/sda is existing:

1. fdisk /dev/sdb

2. mkfs.xfs /dev/sdb1

3. mkdir /newdrv /olddrv

4. mount -t xfs /dev/sdb1 /newdrv

5. mount -t xfs /dev/sda1 /olddrv

6. cp -Rp /olddrv/ /newdrv/

7. chroot /newdrv /bin/bash

8. Write lilo or grub to mbr

thenebula 04-20-2004 10:27 AM

Thanks, I really appreciate it but it's WAY OVER MY HEAD in Linux right now.

Add to that, the server has no CD/disk, so you have to boot from the harddisk...no keyboard, monitor, etc.; it has to be accessed via the web or telnet.

Maybe I can install the RH9 system via the network, and start over configuring the servers.

I DO APPRECIATE the reply!

jcookeman 04-20-2004 10:37 AM

Then create a tar archive of the drive and copy it across the network:
Code:

tar -cvjpf /path/to/archive.bz2 /
Then extract it to the new partition:
Code:

tar -xvjpf /path/to/archive.bz2 -C /path/to/partition

thenebula 04-20-2004 11:21 AM

OK...that makes sense...and I can make THAT WORK!

Thank You!

dayala 10-29-2004 11:00 AM

Clean Linux Install
 
Hi, I have a Magnia SG10 server. I would like to know if someone knows if is possible to make a clear install of any standard linux distribution (particulary Red Hat 9 or Fedora) on this server and if a standard linux distribution has all the drivers needed to make the server work?

Thanks.

jcookeman 10-29-2004 09:06 PM

Welcome to LQ. Please create a new thread when posting a new question. Mods...


All times are GMT -5. The time now is 06:51 AM.