hi guys
i need some serious help, i have dual os in my machine (win xp & gentoo). recently xp got crashed 4 some reason. so i reinstall it. but now i have lost grub boot loader. i have some critical data in my linux partition and i dont want to reinstall my linux and i dont have CD-writer :( .. actually its broken :( plzzz help me....................... how can i get my linux back ? :(

thanks

Boot off your Gentoo installation disk. Open a terminal, get root with su, then mount your root partition:

mount /dev/sd[B]Xn[/B] /mnt/gentoo

Replace 'sdXn' with the device that corresponds to your Linux root partition. If you're unsure about which device is your root partition, try running fdisk -l first.

Repeat the mounting process for any other partitions you may have, like this:

mount /dev/sdXn /mnt/gentoo/boot

Once you've mounted all your main partitions, mount a few virtual filesystems, chroot into your Linux environment, and make sure your mtab is up to date:

mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo
grep -v rootfs /proc/mounts > /etc/mtab

Now you can install grub (this is assuming you want an MBR install, which is most likely what you had previously).

grub-install /dev/sdX

Again, replace 'sdX' with the correct hard drive device.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.