Restoring a destroyed /var partition
08/01/2018 15:30
Hi I needed to reformat my /var partition from reiserfs to ext3 on a workingDebian system. So, I copied the contents of /var over to anotherpartition /backup. Went down to run level 1 (telinit 1). Unmounted /var.

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
08/01/2018 15:30 - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Not true.


Source is Usenet: alt.os.linux.debian
Sign in to add a comment

Answer score: 5
08/01/2018 15:30 - All you need to do is go back and *finish* what you started! Goto runlevel 1 again, umount /var, and mv /var/* /backup andyou will be right where you left off.

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
08/01/2018 15:30 - That will not work. I used the mv command. Which means that /backup is nowempty.


Source is Usenet: alt.os.linux.debian
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below