LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2007, 05:57 AM   #1
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 945

Rep: Reputation: 297Reputation: 297Reputation: 297
Setup boot for Windows and 2 Linux distros


Hello all! I am kind of stuck and am trying to work through my dilemma. I have 2 sata drives. I have a 160 gig drive with windows xp on ~70 gigs of it, about 30 gigs of extra storage (formatted ntfs right now) and the remainder of that drive is for another Linux distro. On drive 2 (80 gig) is MEPIS alone.

I have had no issues with a dual boot setup; it is the multiple linux that has me confused. That, and how the heck I reinstall the modified menu.lst. I can't seem to get the right syntax to put grub back in the mbr after I modify something.

When I installed MEPIS I allowed it to place Grub on the MBR of the first sata drive (MEPIS calls it sda and grub calls it hd0). I tried installing Mandriva on the extra space on the first drive sda and all went well - to a point. I tried installing its bootloader to the mbr (the idea was to let it go there and add the MEPIS boot info to the new grub file). When I rebooted I could get into windows (yuck) or Mandriva. I tried to edit the menu.lst, which I was able to do, but I can't seem to get it to reinstall grub. I tried grub-install (hd0) and got an invalid sector error. I tried setup (hd0) from the grub prompt (I was root when I tried these). I checked the grub manual (too quickly for sure) but did not find the exact answer (yet) except for the stuff I tried above. I just know I have to do more than edit menu.lst. I just cannot figure out how to get it back where it belongs! (of course at this point I really hosed it all by putting back in the LiveCD from MEPIS and broke my boot altogether. So I reinstalled MEPIS and did not try any more until I thought about this some more and asked questions. I also realized my "plan" would not work as I had not installed grub to / for mepis when I first installed it <sigh>.)

After putting away my "toys" for the evening I naturally thought about it. I do love a good puzzle and do like learning. I have tried GAG the graphical bootloader and get errors there too. Now, when I installed linux to try GAG I put grub in the / directory. It hit me last night that I have not been toggling the / to be bootable. Is this, could this be my problem? And, if it is, can I tag the partition as bootable without reinstalling or reformatting?

Also, next question, when I use the live cd (MEPIS) to fix what I broke, should I chroot into my actual installation to repair my grub file? And when I do, how can I move/install it to where I want from the command line. I feel much more comfortable typing the commands - I just don't have all the syntax down quite right yet (I do tons of sql work and MS Access stuff on the job so I like the control heck, my first synaptic download was vim).

Thank you I did try but maybe I missed the right books.

Last edited by jkirchner; 04-13-2007 at 06:12 AM.
 
Old 04-13-2007, 06:13 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
The MBR is only 512 bytes in size (or something like that): just enough room to store info about 4 primary partitions and where the bootloader can find the rest of itself.

In the case of Mepis bootloader, grub has enough info in the MBR to point to the rest of grub in your Mebis /boot/grub/.

When you install multiple distros, make one the Master (as far as bootloader is concerned; it's the only one you write part of grub to the MBR). The rest, you install the bootloader to the root of the partition, not the MBR.

Any config you need to do is accomplished by editing the /boot/grub/menu.lst (grub.conf in some distros) of the master OS.

You installed Mepis with part of grub in the MBR, then you overwrote it with Mandriva's grub. Now Mandriva is the master.

To fix is so that you can boot all three OSs, boot Mandriva, then mount the Mepis partition. Open the Mepis /boot/grub/menu.lst, and copy the menu entry for Mepis. Then open the Mandriva /boot/grub/menu.lst and paste that info into it.

On reboot, you should see all three.

Last edited by bigrigdriver; 04-13-2007 at 06:14 AM.
 
Old 04-13-2007, 06:22 AM   #3
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 945

Original Poster
Rep: Reputation: 297Reputation: 297Reputation: 297
Oh! I thought that I would have to reinstall grub (kind of like you do when you have to run Lilo after modifying lilo.conf). I have been running around in circles for nothing it seems.

Thank you very much. I will try this when I get home. I am really enjoying the experience.

Last edited by jkirchner; 04-13-2007 at 06:25 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
boot after setup windows is fail osmancham Linux - General 4 09-20-2006 12:33 AM
Is there any linux distros out there that will setup a 536ep modem automatically? manhinli Linux - Newbie 10 05-15-2005 06:45 PM
Dual Boot <Two Linux Distros, no Windows> truthfatal Linux - Newbie 3 03-29-2005 09:20 AM
Triple Booting 2 Linux Distros and Windows kwosource Linux - Newbie 5 03-03-2005 12:16 PM
windows is superior to all linux distros..... tomthemcse Linux - General 1 06-06-2004 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration