LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 12-21-2011, 04:34 PM   #1
Oapples
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Rep: Reputation: Disabled
Moved /etc/ Debian squeeze won't boot up now


I have a server that I updated to Debian squeeze. I had backed up all my data to an external usb drive.

After updating it I was trying to transfer everything from my backups of /var/ and /etc/ back to Debian.

I was successful in doing that for var.

For etc, I don't know what I did but somehow I deleted the local /etc on my computer.

Then I made a etc directory and moved everything from /media/usbdisk/etc-copy/* to /etc/

This my first mistake using mv. I did that for both var and etc and now I don't have backups anymore.

Anyway after doing this I rebooted my computer. The grep boot menu came up. I started like normal but then it gave me some error.

After that I manually turned the computer off. At the boot menu I pressed e on the recovery version. At the end of the linux kernel I typed init=/bin/bash and rebooted. It then came up on a terminal after a bunch of errors with

I have no name! @(none)
None of my logins or root logins worked.
I used ls and saw all my files and folders there as normal including the etc file and everything in it.

I tried moving everything in /etc/ and /var/ back to my external drive so I had backups but it said that my external drive was read only. I also could not see anything inside my external drive when I did a ls.

Please help me.
 
Old 12-21-2011, 05:06 PM   #2
Oapples
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
If I'm somehow able to back up certain files in /var to my external usb drive then I'll happily do a reinstall.
 
Old 12-21-2011, 05:28 PM   #3
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Ouch...
Bah we learn by doing mistakes

Do you have a live cd, or install cd from which you could boot and use a workable linux system ?
 
1 members found this post helpful.
Old 12-21-2011, 05:39 PM   #4
Oapples
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Yes I have a live CD. Do you think I could boot up using the live CD and copy var and etc back to my usb drive?
 
Old 12-21-2011, 05:48 PM   #5
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
From the live system, you could mount your / partition where you installed Debian Squeeze or /var partition (if you use a separate var partition), then mount usb drive and backup whatever you want from your mounted partition to your usb drive.

After that, I don't know Debian so could not really help to recover /etc dir.
 
1 members found this post helpful.
Old 12-21-2011, 05:53 PM   #6
Oapples
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Cool. Thanks for your help.
Also, once I backup everything to my usb drive and then reinstall the OS.
What would be the correct way to move certain files/folders from my backup /etc and /var back to my OS? Because obviously the way I did it wasn't right.

These files contain info regarding passwords, logins, mail etc.

Thanks once again.
 
Old 12-21-2011, 07:28 PM   #7
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
I suggest to not restore files from backup'd /var, files in this dir are mainly logs and runtime files that will be created and updated on the fly with your new system

For files in /etc, I suggest to restore only config files, don't mess with passwd and shadow, better to create user with same uid as you old user using system commands like useradd and passwd

edit:
If you had mysql databases in /var/lib/mysql or web sites in /var/www of course you want to restore them

Last edited by Cedrik; 12-21-2011 at 07:42 PM.
 
1 members found this post helpful.
Old 12-21-2011, 07:48 PM   #8
Oapples
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
ok. i will give it a try and let you know how it goes!

Thanks a lot!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The flashplugin-nonfree package won't update itself in Debian Squeeze -- here's how to do it LXer Syndicated Linux News 0 12-15-2011 09:20 PM
Asus eee pc 1101ha, dual boot, debian-squeeze/xp, won't start xp,"reboot and select p mfan Linux - Laptop and Netbook 2 12-04-2010 04:19 PM
Debian Squeeze Udev not working - won't boot spoovy Linux - General 2 11-12-2010 07:16 AM
Help: Moved ide hard drive to different computer and now it won't complete boot rbonafied Mandriva 1 09-25-2008 09:03 AM
Grub won't boot windows after it has been moved stevesutt89 Linux - General 6 11-22-2007 12:32 AM


All times are GMT -5. The time now is 04:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration