Mounting old linux harddisk as slave under FC3?

Matt Considine matt at considine.net
Sun Feb 13 14:27:22 UTC 2005


Hi Michael,

When I did the initial installation, it was only with the
one physical harddrive in the system.  So it got the
label "/boot" by the installation process.

After I added the old harddrive back in (the one with the
mail and data files which I wanted to preserve, but
which also had the old RH 9.x installation), and
rebooted the system from the install CD so that I could
change from "Desktop" to a "Workstation" install, I got
an error message at the point it is examining/setting
up the filesystem.   (Note : I had set the jumpers on
this old drive to "slave" mode.)

Specifically, the message said that there were two
structures with the same label ("/boot"), so it couldn't
go any further.

What I did was reboot to the currently installed FC3
setup, logged in as root, opened a terminal window, and
ran "e2label" to change the label on /dev/hdb1 to be
"oldboot" (instead of "/boot").

I then created folders under "mnt" called "oldboot" and
"oldroot".  I changed /etc/fstab to boot associate
/dev/hdb1 with /mnt/oldboot and /dev/hdb2 with
/mnt/oldroot.

Upon rebooting, I now had the two physical disks happily
living with each other.  But I realized that I was more
concerned with saving my old files and reclaiming the
old harddisk (which is about 6G in size) than I was with
redoing the installation as "Workstation."  So now I turned to the issue 
of getting my old Evolution mail imported into Thunderbird.

I searched around the 'net and found instructions, which
basically boiled down to this :
   - In Thunderbird, set up a new folder (so you don't
screw up a known good working one ;) )  For the sake
of argument, let's call the folder "NewStuff".
   - Find out where on the disks "NewStuff" lives.  I
think it would live in a folder called "NewStuff.sdb"
and would be an mbox-format file called - predictably -
"NewStuff".
   - Find out where you old Evolution mailfolder lives.
It will be called "mbox" and there will be one for each
Evolution mail folder.
   - Select one of these "mbox" files and copy to
"NewStuff.sdb", renaming it to be "NewStuff" and
overwriting the old one.
   - Start Thunderbird.  The old messages should show
up and then they can be moved to whereever you want
into other Thunderbird folders.
   - Repeat the above for each Evolution folder you
want to keep.

Once this was done, I then turned to the issue of copying
over old datafiles.  The problem here was that I was
doing this as "root" while the files had been created
under my "normal user" name.  So once they were copied
over to the primary harddisk, they would have permission
errors if I tried to do anything with them under my
new "normal user" account.  Using "chown", "chgrp" and
"chmod" as root took care of that problem.

So at this point I had moved the material over that I
wanted to save.  Since I only had 2 or 3 apps installed
on the old disk, I didn't worry about migrating those.  I
figure I'll just reinstall them.

Now I needed to reclaim the old drive.  I used the
"parted" utility to first check what I had - 2
partitions.  I removed this and then made one big
partition.  Unlike the default filetype of "ext3" that
seems to get implemented with FC3, "parted" doesn't
seem able to handle that.  So I chose "ext2" for this
new big partition.

Upon rebooting, I now have 2 physical drives with a
total of about 14G available.  The current setup takes
up probably 3G on the first drive, so I have about 11G
to play with.

I recognize that those more adept at Linux could point
to easier/better ways to accomplish the above.  But I'm
not much of a technie and "know just enough to be
dangerous".  Also, I didn't want to bombard the list
here with a ton of questions.  So this seems to have
worked for me.  Maybe someone can post a streamlined
set of steps to show what I *should* have done :)

(Michael - Greetings from the US! Sorry for such a
long answer to a short question!)

Matt
M.Clasen wrote:

> im sorry, i dont understand this:
> "I got the label switch figured out but not these steps"
> witch steps are "these steps" ?
> 
> 
> Am Samstag, den 12.02.2005, 08:42 -0500 schrieb Matt Considine:
> 
>>Outstanding!  Thank you very much.  I am embarrassed that
>>I got the label switch figured out but not these steps.  So
>>I apologize for taking up the bandwidth.
>>
>>Regards,
>>Matt
>>
>>M.Clasen wrote:
>>
>>>hi there,
>>>
>>>from your message i understand, that u like to get a new HD with a new
>>>FC3 installation and like to get the old data accessed, i.e. for
>>>mailimport or other things...
>>>
>>>If so, its easy to mount the old as passive slave drive. Do this:
>>>
>>>- mkdir i.e. /oldhd or better /mnt/oldhd
>>>-mkdir /mnt/oldhd/boot and /mnt/oldhd/root
>>>- set the jumper of the old HD to slave
>>>- plug the old HD to Primary or Secondary Slave IDE port
>>>
>>>after a new start you can mount the hd (wich should have at least 3
>>>partitions on it) in the appropriate directories as
>>>mount /dev/hdb1 /mnt/boot, mount /dev/hdb2 /mnt/root
>>>
>>>for permanent usage, you can add the mount-entries to /etc/fstab, so the
>>>disc is mountet at startup.
>>>
>>>now you can use it as passive datastorage, not bound to your system.
>>>
>>>It is a nice way, to backup the old data to the new HD, format the old
>>>HD as 1 patition only and mount the old HD as a new partition of your
>>>new HD, i.e. /usr2 or /home or /tmp, anything, what makes sense :) with
>>>this way, you got the unused swapspace and /boot-space of the old HD
>>>back for your usage.
>>>
>>>
>>>Am Samstag, den 12.02.2005, 04:48 -0500 schrieb Matt Considine:
>>>
>>>
>>>>Hi,
>>>>I've got FC3 running (relatively) smoothly on an 8G
>>>>harddisk.  I would like to take the harddisk it replaced
>>>>and set it up as the slave, with the idea of trying to
>>>>retrieve old email, etc.
>>>>
>>>
>>>retrieving old email - this sounds a bit hard for me, you mean, dont
>>>loose the old mails already received in the past and be possible, to
>>>import it in your new installed emailprogramm ?
>>>
>>>
>>>
>>>>The correct jumpers have been set and I used "e2label" to
>>>>change the old label of "/boot" to "/oldboot" to avoid
>>>>a conflict with FC3.
>>>>
>>>
>>>you want active use the new and old Hd in your System ?
>>>im sorry, i do not know enought about this disk labeling, but what i
>>>know, tells me, i do not really need it, if i know my HDs and slots they
>>>are connected.
>>>Disk labeling (correct me if im fail) is very nice for Systems with i.e.
>>>SCSI-Raid or many HDs with many partitions or hardly distributet
>>>Filesystems, so you can easy mount a Label instead of a device.
>>>Btw. a quickshot to goolge about Disklabeling was not so really
>>>informational, so i like to ask for the pool with proper information on
>>>that topic ?!
>>>
>>>
>>>
>>>>While it shows up under the Hardware Browser as /hdb1 and
>>>>/hdb2, it does not show up under the Disk Management
>>>>applet for mounting.
>>>>
>>>
>>>i think you got no entries in /etc/fstab 
>>>
>>>
>>>
>>>>Can someone describe or point me to a description of what
>>>>I need to do to try to get my old partitions automatically
>>>>mounted?  I checked the archives and Google, but most of
>>>>what I find relates to setting up a new disk and using
>>>>fdisk/DiskDruid/etc.
>>>>
>>>
>>>your disk is already setup, as you said, as a nice runnin FC3 on a 8 MB,
>>>with i think a hda1, hda2, hda3, ya ?
>>>If you plug the HD to the Primary Slave IDE port, the partitiones become
>>>hdb1, hdb2, hdb3 
>>>
>>>so fstab entries go from 
>>>
>>>LABEL=/	    	/	ext3	defaults	1 1
>>>LABEL=/boot	/boot	ext3	defaults    1 2
>>>...
>>>
>>>to
>>>
>>>#new HD
>>>/dev/hda1	/boot	ext3	defaults	1 1
>>>/dev/hda2	/	ext3	defaults	1 2
>>>...
>>>#old HD
>>>/dev/hdb1	/mnt/oldhd/boot	  ext3   defaults 0 0
>>>/dev/hdb2	/mnt/oldhd/root   ext3   defaults 0 0 	
>>>...
>>>
>>>hope this helps =)
>>>
>>>Michael
>>>
>>>
>>>
>>>
>>>>Thanks in advance,
>>>>Matt
>>>>
>>




More information about the fedora-list mailing list