• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

cant boot linux after windows install

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

erusfatum

Member
Joined
Feb 28, 2006
hey guys! happy new year! :santa:
i know it have been said million of times, but i dont know how to search for it...
i had dual boot on my pc, on one partition windows xp pro and other for linux mandriva. then i had some trouble with windows and had to format and reinstall window'. but when i installed windows again, i couldnt boot to linux, it didnt load that screen where u select what to boot. how can i correct this and make the boot loader to work again? because i dont want to reinstall linux...
 
With a live cd, reinstall GRUB (or Lilo). It was most likely on the MBR of the windows partition, and got nuked with the reinstallation.
 
yeah but i didnt want to reinstall linux after i reinstalled windows. do i have to have the same disto live cd as the disto installed?
 
erusfatum said:
yeah but i didnt want to reinstall linux after i reinstalled windows. do i have to have the same disto live cd as the disto installed?

no, any live cd should be fine. I always use my gentoo minimal install cd because all I need is the CLI. Boot the cd, mount your linux partition, chroot into it, install grub again, exit the chroot, unmount the drive, reboot.

Code:
livecd ~ # mount /dev/sda3 /mnt/gentoo
livecd ~ # cd /
livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / # chroot /mnt/gentoo /bin/bash
livecd / # env-update && source /etc/profile
livecd ~ # grub
Probing devices to guess BIOS drives. This may take a long time.

grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/
grub/menu.lst"... succeeded
Done.

grub> quit
livecd ~ # exit
livecd / # umount /mnt/gentoo/proc /mnt/gentoo
livecd / # reboot
 
ok because im afraid that i will mess it up and both windows and linux wont work, can u tell me please step by step how to do it, i have a ubuntu 5.10 live cd, or some how with mandriva install cd? sorry for the trouble
 
Last edited:
if i'm not mistaken, in the live cd just type alt+f2 and type gnome-terminal then mount your mbr partiton and type sudo or su 'update-grub' and it should work no?
 
Back