Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

VanLUG Email Archive

Re: Making the Win95->Linux transition

Vlad Petersen
Sat, 03 Oct 1998 00:53:54 +0000

Geoff Smith wrote:
.........
> changed fstab so I mounted the new partition as "/usr2." I used the line:
>
> /dev/hda4 /usr ext2 defaults 0 1
>
> Is that right? What does it mean when I set <dump> to 0 instead of 1?

Make it 1 2, not 0 1.

> Then I typed:
>
> cd /usr
> cp -R * /usr2
>
> What I was trying to do is copy everything from /usr to /usr2. After
> comparing the two, I think some things were not copied, especially files
> that begin with "@". Am I doing something wrong?

Yes. Without special arguments, cp will skip copying special
files and symlinks or copy them incorrectly. If you want to make
a proper copy of a directory, do this:

1) Go to single user mode by typing

init 1

2) Only / will be mounted in single user mode. You will have to
mount your /usr and /usr2 manually.

3) cp -af /usr/* /usr2/ # copy all the stuff over after
/usr2 is mounted

# Here you may want check that everything's copied properly

du -s /usr

du -s /usr2

# should both report the same size

4) rm -rf /usr # remove old /usr
5) cd /usr2; mklost+found # make new lost inode recovery
directory - it's special
6) umount /usr2
7) mv /usr2 /usr

8) If not done yet, edit your /etc/fstab accordingly.
9) Reboot or go to multiuser mode by typing

init 3

I think I didn't miss anything (not that anything else comes to
mind). I did that procedure several times and it worked for me.
There are other ways to accomplish the above but that method
just seemed simplest to me.

> Also, I got the
> following warning:
>
> cp: lib/perl5/i386-linux/5.00307/asm-i386/asm-i386 : Too many levels of
> symbolic links

That's because you did not add '-a' to 'cp'. '-a' is equivalent
to '-dpR'

> What should I do about that? (and what does it mean)
>
> Final question: once I have copied everything from /usr2 to /usr, how do I
> rename the folders so that /usr2 becomes /usr, so I can then delete the
> original /usr. (yes, this is a very newbie-esque question, I don't know how
> to rename a folder...)

"folder" is a MS-Windows speak. It should be called "directory".
Unix man pages use the latter term.

- Vlad