copying files in RH9 from 1 harddisk to another in same system(internal)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
copying files in RH9 from 1 internal harddisk to another in same system
i have a problem with Red hat9(shrike).Few days back ,i got a power problem with my motherboard,so i replaced it.From then onwards ,my linux does not boot.It cant recognize my swap partition.So i got another hard disk and installed Red hat9 on it too.
Now can anyone tell me how can i mount my old hard disk partition booting with the new one and new HDD as master and old one as slave?
If you only want to mount it once too get your files and move them to the new harddisk, do as follows. I assume that your new and old harddisk are connected as master/slave on the same IDE channel (same cable). Then your new disk is called /dev/hda and the old one is /dev/hdb
First become root:
Take a look at what partitions are on your disks:
/sbin/fdisk -l (This is a lowercase L)
You will (hopefully) see a number of partitions on hda and hdb.
Make a mountpoint (an empty directory):
Now, you will have to guess which of the partitions on hdb to mount to find your files:
mount -t ext2 /dev/hdb1 /mnt/olddisk/
Look around at the files in /mnt/olddisk. If this was the right partition, copy the files you need. Otherwise unmount it and try another:
mount -t ext2 /dev/hdb2 /mnt/olddisk/
and so on.
h there below is an extract from a tutorial which i had written for my LUG hope it helps
Update /etc/fstab file
This file needs to be updated for if you do not want to mount other partions (e.g. windows partitions)
Every time you start up.
First of all you need to see which partition you want to mount
YOU can see that by running the following command at bash# prompt
If you use wrong device then you may get error message such as
"Cannot open device hdc"
If command is successful you get
[root@gaurav qmail]# fdisk /dev/hda
The number of cylinders for this disk is set to 4865.
There is nothing wrong with that, but this is larger than 1024,
And could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help):
At this prompt run ‘p’ single character to see your partition table
Here is the result of my partition table
Command (m for help): p
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 561 4506201 b Win95 FAT32
/dev/hda2 562 3939 27133785 f Win95 Ext'd (LBA)
/dev/hda3 3940 4385 3582495 a5 FreeBSD
/dev/hda4 4386 4865 3855600 83 Linux
/dev/hda5 562 1096 4297356 7 HPFS/NTFS
/dev/hda6 1097 1606 4096543+ b Win95 FAT32
/dev/hda7 1607 3008 11261533+ b Win95 FAT32
/dev/hda8 3009 3872 6940048+ b Win95 FAT32
/dev/hda9 3873 3939 538146 b Win95 FAT32
You can easily recognize which drive you want to mount
Here I have my windows partitions as
devices Windows Partitions
Do not confuse with /dev/hda2
It is my extended partition you cannot mount that whole partition but you can only mount the logical drives in this partition
Here say if I want mount my E drive in Linux
I need to have an empty folder somewhere to mount.
We can make a folder anywhere but as going by the convention we make all the folders and mount them in
So, go to the mnt folder under root directory
Make a new folder in mnt directory say win_e
If you want to mount it temporarily (till the system is running)
You can mount it by the following command