Solved

making bootable linux drive

Posted on 2000-05-08
3
195 Views
Last Modified: 2010-04-20
I'm replacing my hard drive in my linux box - but i dont want to have to reinstall linux - is there a way of making it bootable so I can just copy my entire exiting drive over to it?  (i.e. mount new hard drive alongside existing one, copy stuff over, make new drive bootable, then reboot with only new drive in box)

i have a feeling this is going to be quite simple using lilo - but i can't find the right command line switches

(also, there is no CDROM or floppy drive in the machine so I can't boot except from a hard drive)
0
Comment
Question by:shivers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
kiffney earned 100 total points
ID: 2788538
Sure, we do this all the time here.  Install the new drive as the second drive, create all your partitions on the new drive with fdisk, mount the new drive (let's say it's on /mnt/hdb), copy things them over with something like
cd /usr
cp -ax * /mnt/hdb/usr/

then do

lilo -v -r /mnt/hdb

then shutdown, remove the old drive, put the new drive on the first channel, and reboot to test things.  The nice thing is you will have your old drive preserved in case things get biffed up.
0
 
LVL 2

Expert Comment

by:tzanger
ID: 2810789
kiffney's way looks good, I'm not certain if the -x option to cp will stay out of /proc or not (it *should*).  -x will definately stay out of the /mnt directory.

If -x doesn't stay out of /proc, you can umount /proc.
0
 
LVL 1

Author Comment

by:shivers
ID: 2811106
luvly!  I haven't had a chance to do it yet as ~I dont have the new drive yet, but that info was just what i was looking for :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Nagios 4.0.8 ack_no_sticky=1 not working 7 20
SMB share across internet 15 116
Looking for a program called HoneyMine. 3 118
Golang on CentOS / Fedora 2 12
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question