Solved

making bootable linux drive

Posted on 2000-05-08
3
192 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
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 51
Linux Mint 18 31 79
cannot connect to openvpn server 9 60
Install Predefined Certificate on Ubunto 4 22
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now