Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
restoring from backup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Recruit0
n00b
n00b


Joined: 24 May 2008
Posts: 70

PostPosted: Wed May 28, 2008 2:32 am    Post subject: restoring from backup Reply with quote

I was installing gentoo and when I did the reboot it said something about not being able to create a console or something. Then it rebooted again and went into a kernel panic. It "seems" to have restored my data but the directories are screwed up. The root directory has 2x as many files and all of them are numbered instead of what their original name was.

Can I just reformat the root partition and extract the backup tar I created? I emerged some packages after the backup. Does emerge add anything to the root partition. Hopefully I won't have to redo everything again.

I have 7 (8) partitions: boot, usr, swap, extended = root, tmp, var, home. I think only the root partition got damaged because I was able to mount my home directory which still looked the same (and has the backup tar).
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Wed May 28, 2008 7:33 am    Post subject: Reply with quote

Does the backup contain all files of the root partition, including a static set of /dev nodes as well as directories that will be used for special mount points later (/sys, /proc, ...). You will have those only if you made a clean backup of the root partition (by mounting it somewhere exclusively, i.e. without having other mount points on it). If you don't have those files but only the important stuff (like /etc /var /usr /lib /boot) you should first extract a stage3 tarball to get the /dev etc. and then extract your own backup over it. This is not a very clean solution though.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Wed May 28, 2008 8:10 am    Post subject: Reply with quote

There is no need to extract /dev/ from a stage 3, instead use MAKEDEV to create the appropriate nodes.
Given a Gentoo system rooted at /mnt/gentoo/:
cd /mnt/gentoo/dev/
../sbin/MAKEDEV generic

Also bear in mind that mount points are simply directories, their special distinction is how they are used.
Back to top
View user's profile Send private message
Recruit0
n00b
n00b


Joined: 24 May 2008
Posts: 70

PostPosted: Thu May 29, 2008 2:05 am    Post subject: Reply with quote

I thought I could just mount the dev/ from the livecd? Then what's that part for?

I tarred my harddrive except proc, dev and home (while the other stuff was mounted). I figure I can just mount the partitions then untar to fix it. I already reformatted the partitions and started from the backup again. It seems to be working but not sure it's safe/stable because I used:

mkfs.xfs each partition (except home)
mount root
mkdir for mounts
mount other parts
mount -t proc none proc/
mount -o bind /dev/ dev/
extract tar from home into the root partition
continue installing from there (the backup was created after emerge --sync step in the handbook)

My devices seem to be working fine atm. I ran into some problems due to typos in config files (like mounting on usr 2x w/ dif sda in fstab). The partitions passed the boot fsck when I rebooted. Right now my wireless is detected but there's a weird error:

Starting wlan0...
SIOCSIFFLAGS: No such file or directory

And when I rm the wlan0 socket, it doesn't ask to remove the socket like it usually does. And when I try to manually wpa_supplicant after that it says the same "SIOCSIFFLAGS" error, network down, ap scan failing... Ima post in the network forum about this.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Thu May 29, 2008 5:07 am    Post subject: Reply with quote

Recruit0 wrote:
I thought I could just mount the dev/ from the livecd? Then what's that part for?


When you boot it standalone without livecd, before dynamic /dev nods can be created (by udev), some static /dev nodes may be required for things to work. Also it is nice to have a standard set of device nodes in case udev fails.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum