Re: Please help to fix the ext2 system.

Richard B. Johnson (root@chaos.analogic.com)
Fri, 17 Jul 1998 08:32:12 -0400 (EDT)


On Thu, 16 Jul 1998, Frank Peng wrote:

> When I upgraded my libc, I got a redefined variable. I guess some old lib
> file did not replace. So I mv lib templib. This screwed up the filesystem.
> I can not boot from disk and from hard drive. It stuck to the partition
> check. The thing is: after I mv lib templib, I can not do anything like
> mv templib lib.
>

If you did `mv /lib /templib`, i.e., these directory files, you are
in a world of hurt. You will have to boot and mount a different file-
system as your root file system (your distribution CDROM / RAM-Disk /
rescue disk combination), mount the file-system you modified, then
modify it back. Like:

/sbin/mount /dev/hda1 /mnt
cd /mnt
mv templib lib
cd /
/sbin/umount /mnt

If you only modified a library file within the /lib directories, you
can do this to repair:

If you use lilo, after "LILO", hit the [Alt] key, type:
linux init=/bin/bash

The machine should boot up to the shell prompt.
Execute:
/sbin/mount -n -o remount /

Then perform your rename operation.

Then execute:

/bin/sync
/sbin/umount /
/sbin/e2fsck -f /

After that is done, wait a few seconds and hit [Ctrl]-[Alt]-[Del] to
reboot.

Cheers,
Dick Johnson
***** FILE SYSTEM MODIFIED *****
Penguin : Linux version 2.1.108 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html