Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

making bootable linux drive

Posted on 2000-05-08
3
Medium Priority
?
197 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 400 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Fine Tune your automatic Updates for Ubuntu / Debian
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

715 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