[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Transfering my system to a new disk (was: Root partition stuck in read-only mode.)



Quoting Nathan E Norman <nnorman@incanus.net>:

> On Fri, Jan 31, 2003 at 11:59:28PM -0500, Lloyd Zusman wrote:
> >
> > [ ... ]
> >
> > So ... now that things are sort of back to normal, my question
> > is this:  what caused the filesystem to become read-only to
> > begin with?  Could it be hardware errors?  The fact that the
> > fsck found no errors seems to point to this as a possible cause,
> > correct?
> 
> No, hardware errors would cause fs corruption I think.  Probably the
> fact that the options field was blank caused the problem.  In the
> future, make sure that field says "defaults" if you have nothing else
> to put in there :-)

Well, it does say "defaults" now, and I rebooted with it set that
way.  But a few minutes ago I started getting disk error after disk
error.  So I think that I do indeed have some hardware problems, 
after all [sigh].

So now, I have a completely new question:

I belive that the error is on my first drive, the /dev/sda drive
on SCSI channel 0.  My second drive (/dev/sdb, SCSI channel 1)
seems fine.  Assuming I can boot up and run reliably for a while,
I want to copy everything from /dev/sda to the top level of
/dev/sdb.  Then, I'd like to reset my system to boot off of
the second drive (which has plenty of empty space).

I think I should do something like this (but I'm not sure if this
is correct):

1.  My /dev/sdb only has one partition, and I have mounted it as
    /opt.  So what I'll do is create an /opt subdirectory on that
    drive and move everything from /dev/sdb1 there.

2.  I should use tar to copy all the filesystems under root,
    except for /opt, over to the /dev/sdb1 partition.  This should
    copy links and permissions correctly.  [Is that true?]

3.  I should change /etc/fstab on the second partition to only
    have one huge partition (i.e., get rid of the /usr, /home,
    and other mount points).

4.  ????????   I need to create a proper boot sector on the
    /dev/sdb1 partition.  How do I do that?

5.  ????????   I configure my system to boot off of /dev/sdb1
    instead of off the faulty drive.

Does this sound reasonable?  If not, can anyone suggest what I'm
missing?  And I'd be grateful if someone could explain how to do
steps 4 and 5.

Thanks again for the earlier help, and thanks in advance for any
help you might be able to offer for this new system-copy task.


> > At any rate, thanks again!
> 
> Glad it worked for you.  Random fs weirdness sucks.
> 
> --
> Nathan Norman - Incanus Networking mailto:nnorman@incanus.net
>   Profanity is the one language all programmers know best.

-- 
 Lloyd Zusman
 ljz@asfast.com
 God bless you.



Reply to: