a big mistake-deleted etc

ajtiM lumiwa at gmail.com
Sat Mar 1 11:06:20 UTC 2014


The problem is because I cannot boot in single mode. I use
mountroot>ufs:/dev/my disk and it mounted read only

If I boot Live CD and run:
mount -t ufs -o rw /dev/my disk it cannot find it.

If I use

mountroot>ufs:/dev/my disk o rw 
than I got error 22.

Thank you.


On Feb 28, 2014, at 10:14 PM, Polytropon <freebsd at edvax.de> wrote:

> On Fri, 28 Feb 2014 12:56:31 -0500, ajtiM wrote:
>> Hi!
>> 
>> I have a big problem.
>> I did accidental deleted /etc… and I cannot start a system.
>> Is it a way that I get /etc back without lost everything, please? 
> 
> Usually not. Files deleted from UFS are typically gone.
> You can try to use a tool like photorec (install the
> "testdisk" port) to try to get the _data_ back, but
> the file names will be lost.
> 
> Another option is to boot from a USB or CD live system
> and to to /usr/src/etc and run "make install". This
> should install the required files into /etc, but you'll
> have to manually adjust some of them, most importantly
> the /etc/fstab file, but also probably the passwd user
> databases (both text and binary).
> 
> If you're like me, you could have a CVS repository with
> your changes to /etc where you can checkout the lasted
> versions of modified files. :-)
> 
> 
> 
> 
> 
> 
> -- 
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...

Mitja
----
http://www.redbubble.com/people/lumiwa



More information about the freebsd-questions mailing list