# Does FreeBSD Bootmanager allow me to boot different disks/OS



## Chris_H (Jan 6, 2014)

Greetings all!

I'm reading the FreeBSD handbook on the subject of the boot manager and boot stages. It's not _quite_ clear to me as to whether or not it's able to boot two different systems, on two different disks. I initially installed FreeBSD (8.4) on the first platter (disk 1). I recently installed another BSD on the second platter. They both "own" the entire disks they're installed on. But now, of course. I can only boot to FreeBSD, on disk 1. It mentions other bootmanagers on /sysutils. But I'd _really_ rather allow FreeBSD to manage things (if possible). Does anyone know if FreeBSD's bootmanager can add another boot option to boot the copy on disk 2? If so, how do I do it?

Thank you for all your time, and consideration.

--Chris


----------



## wblock@ (Jan 6, 2014)

*Re: Does FreeBSD Bootmanager allow me to boot different disk*

boot0 can choose different disks and partitions.  But it only works for MBR disks.  See boot0cfg(8).


----------



## Chris_H (Jan 6, 2014)

*Re: Does FreeBSD Bootmanager allow me to boot different disk*

Greetings @wblock@, and thanks for the response.


			
				wblock@ said:
			
		

> boot0 can choose different disks and partitions.  But it only works for MBR disks.  See boot0cfg(8).


Yes, that was what I gathered from reading "boot manager and boot stages" in the handbook. I checked boot0cfg(). But, as you note, it only works for MBR's. How can I tell for sure the second disk is MBR (I don't recall what I chose during install)? Would it be reasonable to assume that starting sysinstall() from my main install of FreeBSD on disk one, would tell me, and offer to install boot0?

Thanks again for your taking the time to reply @wblock@.

--Chris


----------



## wblock@ (Jan 6, 2014)

*Re: Does FreeBSD Bootmanager allow me to boot different disk*

Use `gpart show` to see the the partitioning scheme.


----------



## Chris_H (Jan 6, 2014)

*Re: Does FreeBSD Bootmanager allow me to boot different disk*

LOL! I just came back here to update my post with that _exact_ information.  Here it is:

```
# gpart show
=>       1  80418239  ad0  MBR  (38G)
         1        62       - free -  (31k)
        63  80418177    1  freebsd  [active]  (38G)

=>       0  80418177  ad0s1  BSD  (38G)
         0   4194304      2  freebsd-swap  (2.0G)
   4194304   6291456      4  freebsd-ufs  (3.0G)
  10485760  69932417      1  freebsd-ufs  (33G)

=>      63  40020561  ad1  MBR  (19G)
        63      1953       - free -  (976k)
      2016  40018608    1  freebsd  (19G)

=>       0  40018608  ad1s1  BSD  (19G)
         0   4096000      1  freebsd-ufs  (2G)
   4096000   2093056      2  freebsd-swap  (1G)
   6189056   4194304      4  freebsd-ufs  (2.0G)
  10383360  29635248      5  freebsd-ufs  (14G)
```

They all sure look MBR. I tried sysinstall() but couldn't get it to write the boot manager to the disk (ad0). Or if I did, I didn't do it correctly. Because it boots straight to the copy on ad0.

Thanks for the reply, @wblock@.

--Chris


----------



## SirDice (Jan 6, 2014)

*Re: Does FreeBSD Bootmanager allow me to boot different disk*



			
				Chris_H said:
			
		

> I initially installed FreeBSD (8.4) on the first platter (disk 1). I recently installed another BSD on the second platter. They both "own" the entire disks they're installed on. But now, of course. I can only boot to FreeBSD, on disk 1.


FreeBSD 8 still installed with MBR with one slice and a few 'classic' partitions: /, /tmp/, /var/ and /usr/. From 9.0 on it used GPT and one partition for root. I'm not sure what the current status on MBR vs. GPT is with the other BSDs. The most likely candidate is MBR too.  

And it took me too long to type this. So I see you have two FreeBSD disks, the FreeBSD bootmanager should have no problems with that.


----------



## Chris_H (Jan 6, 2014)

*Re: Does FreeBSD Bootmanager allow me to boot different disk*

Thanks for your reply, @SirDice.



			
				SirDice said:
			
		

> Chris_H said:
> 
> 
> 
> ...


Yes, looking at the man page for boot0cfg(), and many of the posts here, it would seem so. The only concern I have now, is the _exact_ command I should use: `boot0cfg -B ada0` or `boot0cfg -B ad0`. Looking at the output of gpart() above, would anyone be brave enough to recommend which I should use?

Thanks again, @SirDice, for taking the time to respond.

--Chris


----------



## SirDice (Jan 6, 2014)

*Re: Does FreeBSD Bootmanager allow me to boot different disk*

That would be ad0


----------



## Chris_H (Jan 6, 2014)

*Re: Does FreeBSD Bootmanager allow me to boot different disk*



			
				SirDice said:
			
		

> That would be ad0


Thank you, @SirDice, for the quick reply, and all the help!

--Chris


----------

