LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-14-2013, 08:00 AM   #1
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Rep: Reputation: 15
How to set the boot partition


Hi,

I'm not sure if I'm asking this question the right way, but here goes.

My machine has several versions of Linux (2 CentOS, and Ubuntu) on several different partitions. Each partition has it's own grub.conf file, but only one of them is used when the machine boots. How can I set which partition's grub.conf file will be used when the machine boots? For example, I would like the grub,conf in /dev/sdb1 partition to be used, but currently the /dev/sdb3 partition is used. The problem is that the linux distro in /dev/sdb3 is broken and so I can't boot any of them (other then with a rescue disk). So I want to somehow modify this. Any ideas?

Last edited by sysbox; 06-14-2013 at 11:35 AM. Reason: Change title
 
Old 06-14-2013, 08:46 AM   #2
shm0
Member
 
Registered: Aug 2012
Location: Bahrain
Distribution: Slackware
Posts: 58

Rep: Reputation: 16
Quote:
Originally Posted by sysbox View Post
Hi,

I'm not sure if I'm asking this question the right way, but here goes.

My machine has several versions of Linux (2 CentOS, and Ubuntu) on several different partitions. Each partition has it's own grub.conf file, but only one of them is used when the machine boots. How can I set which partition's grub.conf file will be used when the machine boots? For example, I would like the grub,conf in /dev/sdb1 partition to be used, but currently the /dev/sdb3 partition is used. The problem is that the linux distro in /dev/sdb3 is broken and so I can't boot any of them (other then with a rescue disk). So I want to somehow modify this. Any ideas?
I used grub (not grub2) so the following info is not related to grub2.

If you're using /dev/sdb1 as /boot partition then first you have to modify the file menu.lst to list all your boot options, then you should install it using grub-install.

Are you using the MBR to boot? then your command should be:

Code:
grub-install /dev/sdb
 
Old 06-14-2013, 11:07 AM   #3
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Original Poster
Rep: Reputation: 15
Yes, I have already modified menu/lst (which is link to grun.conf) to list the options for the various partitions.

I'm not sure what you mean by 'Are you using the MBR to boot?'. How would I know?

I was able to boot into the /dev/sdb1 partition, which is now /dev/sda1, for some reason. That's okay. I want the grub.conf in that partition to be the one that is booted from and where grub.conf comes from. But I ran the following and received errors:

Quote:
> grub-install /dev/sda
/dev/sda does not have any corresponding BIOS drive
The same happened if I run 'grub-install /dev/sda'. So, I'm still trying to make /dev/sda1 the main boot partition and for that to be where the grub.conf file comes from. Any ideas?
 
Old 06-14-2013, 11:35 AM   #4
sysbox
Member
 
Registered: Jul 2005
Posts: 117

Original Poster
Rep: Reputation: 15
Okay, I figured it out. I ran this and it solved the problem:
Quote:
> grub-install --recheck /dev/sda
Thanks!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Dual Boot System: What's the best way to partition the hard drives in my set-up? stowrag Linux - Newbie 15 01-06-2013 12:33 PM
Trying to set up LILO on /boot partition Rapalmer19 Linux - Newbie 2 03-08-2012 12:53 PM
How to set the grub to boot linux installed in directory an not in own partition nadavvin Linux - General 4 04-07-2011 05:55 AM
Dell custom partition useful for dual boot set-up? anax93 Linux - General 2 06-05-2007 09:52 AM
Partition problems, trying to set up dual boot, FC5/XP Soup Erman Linux - Newbie 4 05-29-2006 08:40 PM

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

All times are GMT -5. The time now is 05:26 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration