[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Upgrading - a little basic help please

Posted on 2005-05-10
4
Medium Priority
?
228 Views
Last Modified: 2013-12-15
Hello.

I have a server setup running RH8 and I want to upgrade to Fedora Core.  On a different computer, I installed the latest FC4 test and got everything working and the bugs out and its ready for my purposes.  So..

I want to do a fresh clean install on a new hard drive, then copy certain files and folders from the old hard drive onto the new one.

I'm not a native Linux user, so I have some questions:

1) How do I temporarily mount the 2nd (older) hard drive but be sure that the system doesn't boot from it - I want to then remove that hdd to use in a different machine. I want to mount it only to copy files from it.  Shouldn't be a problem, but I'm concerned that if it is there during install that the system will then complain that its not there later. So should I physically connect the drive only after intalling FC? Or does it not matter?  What commands do I use to mount it and access it? (sorry, I've never had a multi-drive setup in Linux before)

2) When I copy said files and folders, can I do it in such a way that timestamps, permissions, and ownership are NOT changed in any way?  Command please?

I know I can probably look this stuff up but its important that I avoid any pitfalls so I decided to ask here just to be sure.  Thanks.
0
Comment
Question by:s_mack
  • 2
  • 2
4 Comments
 
LVL 38

Accepted Solution

by:
wesly_chen earned 500 total points
ID: 13971620
> I physically connect the drive only after intalling FC?
If you are not very familiar with the install/boot process, then this is the better way for you.

If you have IDE HD, then put your new disk as primary master and
put the older disk as primary slave or secondary master.
After installation, as root:
mkdir /old_disk
fdisk -l /dev/hdb  (for primary slave)
fdisk -l /dev/hdc  (for secondary master)
mount /dev/hdb1 /old_disk    (assume you connect as primary slave and the / partition on fdisk is /dev/hdb1)

If you have multiple partitions on old disk, then you need to create multiple directories /old_disk2, /old_disk3....
and mount them separately.

> timestamps, permissions, and ownership are  NOT changed in any way?
Use
cp -pr
or
tar cf - /path-to-data | ( cd /path-to-destination-dir ; tar xf -)
0
 

Author Comment

by:s_mack
ID: 13971730
Excellent!  Thank you very much for the detailed response.
0
 

Author Comment

by:s_mack
ID: 13971760
Oh - and after I'm done copying, is there anything I have to do to prepare for physical removal of the second (old) hard disk?   ie. is there an opposite set of commands to:  

mkdir /old_disk
fdisk -l /dev/hdb  (for primary slave)
fdisk -l /dev/hdc  (for secondary master)
mount /dev/hdb1 /old_disk    (assume you connect as primary slave and the / partition on fdisk is /dev/hdb1)
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 13972328
> prepare for physical removal of the second (old) hard disk?
Just shutdown and power off the Linux box is enough.
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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.
Suggested Courses
Course of the Month20 days, 10 hours left to enroll

867 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