View previous topic :: View next topic |
Author |
Message |
pfaut n00b
Joined: 16 Oct 2003 Posts: 13 Location: North Brunswick, NJ
|
Posted: Thu Nov 02, 2006 11:52 am Post subject: File system corruption after moving root partition |
|
|
What do I need to do in order to move my root partition to another partition? I had originally set up debian on this machine using hda1 as root. I later installed gentoo onto hda2. hda1 is blank so I thought I'd copy my root partition to it and run from it to do the modular X install. This way if something went wrong I'd be able to reboot from hda2 and be right where I was before. Unfortunately, the first attempt to reboot after running on hda1 leaves the file system corrupted. I need to run reiserfsck --rebuild-tree to fix it. I gave up and installed modular X to hda2.
Now I have other reasons to want to shuffle my partitions around and I'm getting random file system corruption every time I reboot while running on hda1. First, hdb1 got corrupted. Then hda5. I'm back running off hda2 and everything is running fine again.
Here's what I did:
I created a new file system on hda1. The first time I used reiser. Last night I used ext3.
I moved everything from hda2 to hda1 using either 'cp -a' or 'tar cflp - | tar xflpSC - /mnt/tmp'.
I ran grub and type 'root (hd0,0)', 'setup (hd0)'.
I modified fstab and grub.conf on hda1 to point to hda1 instead of hda2 for root.
Did I miss something? Any ideas what's causing the corruption? It appears the root directory gets wiped. After the fsck, there are a bunch of files in lost+found that I have to identify by content and move back to where they were. |
|
Back to top |
|
|
Keruskerfuerst Advocate
Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
Posted: Thu Nov 02, 2006 3:17 pm Post subject: |
|
|
Have you used a livecd or another Linux to copy by copy -ar ....? |
|
Back to top |
|
|
pfaut n00b
Joined: 16 Oct 2003 Posts: 13 Location: North Brunswick, NJ
|
Posted: Thu Nov 02, 2006 10:36 pm Post subject: |
|
|
I did the copy after booting single user. |
|
Back to top |
|
|
|