Bootloader issues

Status
Not open for further replies.

Vivek788

In the zone
Hi all...I used to run my Ubuntu and Windows using my sata hard disk happily.

Recently I got my old IDE HD repaired..so I installed fedora on one of its partitions.
The bootloader of fedora was set to MBR ie. hd0..my sata.
But on loading,the bootloader showed only Windows and Fedora,my ubuntu was missing..I tried to repair from the fedora cd itself...which after scanning hte /dev/sda11 where my ubuntu was and said "no linux kernels found"

Then I thought if I install another Ubuntu I can get it all back and then remove fedora...but again tat ubuntu too was not detected..fedora bootloader persisted .

Recently,I decided to replace fedora and completely format the 2nd HD.I did tat and installed a gutsy on tat place...now....there is no bootloader..on booting i get the terminal of grub with the prompt being "grub>"

On trying to boot from there,they ask for loading kernel first.I am unable do anything...even on trying root(hd0) they say its a whole device...no idea whats happening...my windows and precious ubuntu all inaccessible...help please..


PS:I am posting from live cd of fiesty fawn...
 
The problem is when you installed fedora's boot loader in hd0, it has overwritten your original boot loader. Further this bootloader loads all its files from the /boot of your ide hdd. Thats why its not booting now. I am not a linux expert, but afaik you can boot into rescue mode of any linux ditro and run these command :
Code:
# chroot <your linux partition>
# grub-install <device>

to reinstall grub. Try it, if it doesn't works, try pming praka123, he is an expert on linux.
 

praka123

left this forum longback
first concentrate on 1 distro d00d!:p

What I understand is, you have currently Ubuntu gutsy installed on ide drive(2nd drive).windows is in sata harddisk?

go to bios and in boot device priority,make your Ubuntu ide harddisk as 1st priority followed by sata drive.
yes,make CD/DVD drive as 1st priority followed by ide PATA drive and then SATA drive.
boot with Ubuntu gutsy livecd,mount your Linux partition where you want to install grub.open terminal:
Code:
sudo /dev/hdx /mnt
where hdx is ur gutsy installed on ur ide harddisk which you want to use.
you can find ur ubuntu partition via "sudo fdisk -l" output.

now do as below:
Code:
mount -t proc proc /mnt/proc
Code:
mount --bind /dev  /mnt/dev
Code:
chroot  /mnt  /bin/bash
now you are chrooted to Ubuntu hdd install.

you should set grub natively now.
In the "#" prompt,run below commands:
Code:
grub
In the grub prompt,
Code:
grub>root (hd ...
^press TAB key to show the available options that include hd0 and hd1 partitions.
select the "partition number -1" of ur Ubuntu hdd install.ie;for eg; ubuntu is installed on /dev/hda1, then select as (hd0,0) similarly for /dev/hda5 it will be (hd0,4).
so,
Code:
grub>root (hd0,x)
^where "x" is the partition number
then,
Code:
setup (hd0)
now run,
Code:
grub-install '(hd0)'
now look the o/p and make sure /dev/hda and /dev/sda are listed.
OR
Code:
cat /boot/grub/device.map
^it should have something like below:
(hd0) /dev/hda
(hd1) /dev/sda
now:
Code:
umount /proc
Code:
umount /dev/
press CTRL+D to exit,then reboot and see whether grub is rescued.
Now once boot into ur hdd Ubuntu installation,edit ur /boot/grub/menu.lst inorder to boot from windows on ur sata hdd.
for that,first find ur windows partition in sata-which will be most probably (hd1,0)
Inside ur hdd installed Ubuntu:
so press ALT+F2 to get run dialogue and run:
Code:
gksudo gedit /boot/grub/menu.lst
and go to bottom of the file and add in a separate line:
Code:
[FONT=Arial][SIZE=3][COLOR=Black]title =  Windows XP
root = (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1[/COLOR][/SIZE][/FONT]
save and exit.Now Hopefully,ur problems are solved :)
 
OP
Vivek788

Vivek788

In the zone
well no ubuntu and windows both in sata..fedora in ide..now ubuntu in tat place...prob fixed by making ide as master..i thnk i was following the idea of hd0 wich i had wen i had only 1 HD.By the coming of the IDE..sata became hd1...tats wat happened..how silly of me not to notce tat...anyway nice info all have posted.thanks for hte quick response...
 
Status
Not open for further replies.
Top Bottom