Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Messed up somehow. MBR problem.
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
neilcon
n00b
n00b


Joined: 19 Sep 2004
Posts: 3

PostPosted: Sun Sep 19, 2004 2:20 am    Post subject: Messed up somehow. MBR problem. Reply with quote

Ok well i installed everything fine. Followed every detail in the hand book and after i installed grub and rebooted i still got an old lilo boot screen from a previous version of slack i installed a while ago.

I have two HD's hda (windows) and hdb (linux). So i installed grub on hdb and wrote the mbr there also. I think my problem is that i have hda(lilo) booting instead of hdb (grub). Is this possible? can lilo be on hda even though it's an NTFS partition? I don't understand how lilo can still be there even after i formatted and installed gentoo on hdb. Lilo must reside on hda.

Im not an expert with all this so any help would be awesome.

Is there a way i can change the mbr to hdb instead of hda?
Back to top
View user's profile Send private message
inode77
Veteran
Veteran


Joined: 20 Jan 2004
Posts: 1303
Location: Heart of Europe

PostPosted: Sun Sep 19, 2004 2:28 am    Post subject: Reply with quote

Quote:
I have two HD's hda (windows) and hdb (linux). So i installed grub on hdb and wrote the mbr there also. I think my problem is that i have hda(lilo) booting instead of hdb (grub). Is this possible? can lilo be on hda even though it's an NTFS partition? I don't understand how lilo can still be there even after i formatted and installed gentoo on hdb. Lilo must reside on hda.

The MBR is just the 512 first byte of your harddisk, so no problem for lilo to survive a format of your partition.

The bios will always boot with the mbr on the first hdd. So either you swap the drives and use grub (linux hdd, to use the mbr on the second hdd swap them physically) or you install grub into the mbr of the first. To do so boot your livecd, mount the partitions, chroot and install grub into first mbr with setup (hd0)
Back to top
View user's profile Send private message
mbjr
Guru
Guru


Joined: 17 Jan 2004
Posts: 531
Location: Budapest/Hungary

PostPosted: Sun Sep 19, 2004 9:53 am    Post subject: Reply with quote

Also you can use a mutiboot system. Grub and Windows's boot.ini is able to handle such things (you know, the screen where you can select which os to boot when turning on your box) :-)

Please take a look at these:
Grub drive-swap: http://www.gnu.org/software/grub/grub-faq.html#q10
Grub multiboot (chain-loading): http://www.gnu.org/software/grub/manual/html_node/Chain-loading.html#Chain-loading
Windows's boot.ini: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ddtools/hh/ddtools/bootini_b6707f0b-f96b-48f1-a8ff-ce2d9675dc22.xml.asp

The way I use it:
/dev/hda1 <- ntfs partition with winxp installed, and grub sits in mbr
/dev/hdb1 <- linux boot part, no grub here :-)
_________________
mb
Back to top
View user's profile Send private message
rush_ad
l33t
l33t


Joined: 22 Jul 2004
Posts: 863
Location: New Jersey, USA

PostPosted: Sun Sep 19, 2004 12:00 pm    Post subject: Reply with quote

change boot order of disks.
Back to top
View user's profile Send private message
neilcon
n00b
n00b


Joined: 19 Sep 2004
Posts: 3

PostPosted: Sun Sep 19, 2004 1:51 pm    Post subject: Reply with quote

Thanks inode77, i did what you told me (mounted, chrooted and installed grub on hd0 and is works now.

BUT everytime i go to boot gentoo from grub is goes back to grub boot screen all the time. I think this is because i now have grub installed on hd0 and hd1 (which i originally installed it one).

How would i get grub removed from hd1?
Back to top
View user's profile Send private message
inode77
Veteran
Veteran


Joined: 20 Jan 2004
Posts: 1303
Location: Heart of Europe

PostPosted: Sun Sep 19, 2004 3:22 pm    Post subject: Reply with quote

Post grub.conf and fstab please.

Normally restoring a MBR is just possible if you have a backup. To do one and the restore command (save version that does not affect the partitioning of the disk in case you change between backup and restor)
Code:
dd if=/dev/hda of=mbr.backup bs=512 count=1
dd if=mbr.backup of=/dev/hda bs=446 count=1


DOS and windows bootdisk can overwrite a mbr with "fdisk /mbr".
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