Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Erase my boot partition, how I can recover my gentoo?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
victorh
n00b
n00b


Joined: 10 Aug 2005
Posts: 6
Location: La Paz, Bolivia

PostPosted: Sun Oct 23, 2005 2:42 am    Post subject: Erase my boot partition, how I can recover my gentoo? Reply with quote

Hi I made a serious mistake, I accidentally format my boot partition, (really stupid mistake) and I'm trying to recover my Gentoo system.

The problem arised when I was upgrading a Debian system that I have in separate partitions, unfortunately I get confused and I formatted my
Gentoo boot partition, I couldn't believe it, but that's the fact.

I was thinking in installing again the whole system, but as you can imagine it'll take me some days, since I had a lot of packages compiled (including open office, etc). Besides I have a kernel running perfectly... :(

Since the image of my kernel is still in my root partition, I could copy again this one, but the other files that were in my boot partition I don't know how to recover them. I hope you have some advices. I'm so sad, I guess this is the hard way of learning to be more careful...

If there's no other way I'll have to install again, any advice will be helpul. Thanks
Back to top
View user's profile Send private message
Xaid
Guru
Guru


Joined: 30 Oct 2004
Posts: 474
Location: Edmonton / Alberta

PostPosted: Sun Oct 23, 2005 2:48 am    Post subject: Reply with quote

Hi Victorh,

If you only lost the boot partition, then I doubt you need to reinstall your whole system, here's what in my boot parition:
Code:

boot                        kernel-2.6.11-hardened-r15      lost+found
grub                        kernel-2.6.11-hardened-r11      System.map


To recover it, just try re-emerging grub and copy the kernel image from /usr/src/linux/ to your boot parition, adjust grub's config file and you should be fine I think.
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Sun Oct 23, 2005 3:31 am    Post subject: Reply with quote

If you've already turned off your GENTOO system and can't boot back in (because of the lack of boot partition) you can start up with a livecd and chroot into your system (just like you did when you first installed gentoo) then follow Xaid's instructions to recreate the files in your boot partition. No need to reinstall the whole system.
Back to top
View user's profile Send private message
victorh
n00b
n00b


Joined: 10 Aug 2005
Posts: 6
Location: La Paz, Bolivia

PostPosted: Sun Oct 23, 2005 4:11 am    Post subject: Reply with quote

Thanks Xaid and sindilznik

I did what you suggested and yep I could recover my system. I copy the bzImage, the System.map and the .config file to the boot directory again.. I emerge again grub and made some corrections.

I crossed my fingers, and yes! It boot normally and right now I'm typing from my Gentoo system...

Again thanks for your help, next time I'll be more carefull, I was already missing my Gentoo box...
Back to top
View user's profile Send private message
sirdilznik
l33t
l33t


Joined: 28 Apr 2005
Posts: 731

PostPosted: Sun Oct 23, 2005 5:35 am    Post subject: Reply with quote

Glad everything worked out for you, victorh.
I made MUCH worse mistakes when I was first trying out Linux, it's all part of the learning process :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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