Restoring a destroyed /var partition
08/01/2018 15:30

Reformatted it (mkfs -t ext3 /dev/sda8) and then made a blunder : mv /backup/* /var Now /var was not mounted then. So, I guess the above just created adirectory named var under /, and then I rebooted. You can imagine whathappened next - /var ended up being empty. The boot would now hang atsyslogd. I then logged in the single user mode. Created /var/runand /var/log and then an empty file /var/run/utmp.
However, the machine is now practically useless - no network connection,many programs crash complaining of missing shared libraries, etc. How do Iget out of this mess short of reinstalling Debian ? Thanks.
Source is Usenet: alt.os.linux.debian
Sign in to add a comment
Answer score: 5
Source is Usenet: alt.os.linux.debian
Sign in to add a comment
Answer score: 5

First mount your new partition on /var, then *copy* your filesback to it, mount -t ext3 /dev/sda8 /var cp -a /backup/* /var Now you can go back to multi-user mode and all should be fine.
If it is, you can delete all of the files in /backup.
Source is Usenet: alt.os.linux.debian
Sign in to add a comment
Answer score: 5
Source is Usenet: alt.os.linux.debian
Sign in to add a comment