# FreeBSD 9.1 won't create extended partition



## iwowow (Apr 4, 2013)

A couple of years ago, I was using FreeBSD with Windows XP dual boot. Later I turned to Linux; during that time, I can partition my hard drive via the FreeBSD installer tool, it was a command line inputting thing, I can choose digits such like 60, 72... anything else, I can specify the FAT32, BSD or Linux partition, also I can create an extended partition, and install Free*BSD* into it. But now, wtf, the FreeBSD 9.1 has become stupid and worse, my story last night:

I have Windows 7 installed, the first partition is a 100 MB Windows boot, the second and third partition are for Windows. During installation, I choose to partition my drive with an extended partition. FreeBSD couldn't do it, then I try to add two parts, one for FreeBSD, one for swap. After the installation is complete, restart my PC, I found both of my FreeBSD and Windows7 won't boot, it gave me a message saying that no OS bootable things, now can't remember it clearly.

This morning, I use Fedora 18 liveCD to check the contents of my drive. Windows7 is still there, just the body, the boot loader seems gone, and I just reinstalled Windows7, and my data are saved now.
Also I found Fedora 18 too can't create an extended partition.

The world changed now.

I'm wondering, how to install FreeBSD without damaging my Windows7, can I still create an extended partition?

Hope anybody expert give me an advice to fix all things.


----------



## wblock@ (Apr 4, 2013)

Possibly your install uses GPT.  There is no need for the awful hack of extended partitions with GPT.


----------



## SirDice (Apr 4, 2013)

iwowow said:
			
		

> I have Windows 7 installed, first partition 100mb Windows boot, second & third partition for Windows.


With this layout it's very likely it's using the GPT scheme instead of MBR. As @wblock@ noted, there's no need for "extended" partitions with GPT.


----------



## kpa (Apr 4, 2013)

Actually it's very probably MBR. Windows 7 creates one 100MB MBR partition as the first partition for reasons unknown and then the real C: disk as the second MBR partition if you let it to use the defaults when installing it.

With MBR partitioning and extended partitions you're out of luck. FreeBSD can not be installed on extended partitions.


----------



## iwowow (Apr 4, 2013)

Oh?

If users no need minding things corcern MBR and extended partition, go to choose the whatever things of GPT method, seems freebsd FreeBSD become smarter or stranger.

The world's round, changed too much.

*A*nyway, thanks for the replies, and any further recommandations?

Also, I need to do some googling about the GPT.


----------



## SirDice (Apr 4, 2013)

kpa said:
			
		

> Actually it's very probably MBR. Windows 7 creates one 100MB MBR partition as the first partition for reasons unknown and then the real C: disk as the second MBR partition if you let it to use the defaults when installing it.


Yes, that's with 2 partitions. If you have an UEFI/GPT install you get another partition. A system partition (used for UEFI boot), an MSR; Microsoft Reserved partition and the primary partition that contains windows. MBR systems only have the MSR and primary windows partition.


----------



## wblock@ (Apr 4, 2013)

iwowow said:
			
		

> any further recommandations?



Boot the FreeBSD install CD into live CD mode, run [cmd=]gpart show[/cmd], and post the result.


----------



## iwowow (Apr 5, 2013)

Alright, I'm now home, weekend, and I put my [cmd=]gpart show[/cmd] here,


```
root@:/root # 
=>			63	1250263665	ada0	MBR	(596G)
			63		  1985			- free -	(992k)
		  2048		204800	   1	ntfs	[active]	(100M)
		206848	 327475200	   2	ntfs	(156G)
	 327682048	 409600000	   3	ntfs	(195G)
	 737282048	 512981680			- free -	(244G)
```


----------



## SirDice (Apr 5, 2013)

Ok, so it's an MBR scheme. That means there's only room for one more partition. FreeBSD has to be installed in a primary partition. It cannot be installed on an extended partition.


----------



## kpa (Apr 5, 2013)

That should work just fine, create a primary partition (a slice in FreeBSD terminology) as the 4th partition and then subdivide the slice in to partitions. The slice will be named ada0s4 and the partitions inside it ada0s4a, ada0s4b and so on.


----------



## wblock@ (Apr 5, 2013)

FreeBSD can run from an extended partition.  It's just the bootcode that does not like them, and if you're putting FreeBSD in an extended partition, odds are good that you're using some other boot loader like Grub.


----------



## iwowow (Apr 6, 2013)

Thanks for your hits, and I'm now understanding what GPT is, and my mainboard was produced in 2005, seems its BIOS doesn't know GPT and can't even select boot from USB, and so on.

Now I've divided my drive as below, try to create a primary partition with subdivisions

```
ada0		596 GB	MBR
  ada0s1	100 MB	ntfs
  ada0s2	156 GB	ntfs
  ada0s3	195 GB	ntfs
  ada0s4	244 GB	BSD
    ada0s4a	1.0 GB	freebsd-ufs	boot
    ada0s4b	235 GB	freebsd-ufs	/
    ada0s4d	8 GB	freebsd-ufs	swap
```

But until the installation finished, FreeBSD didn't prompt me to add any OS loader, so after rebooting it says:

```
No /boot/loader

FreeBSD/x86 boot
Default: 0:ad(0,a)/boot/kernel/kernel
boot:
No /boot/kernel/kernel
```

This time I really feel that I'm foolish ^^; did I do anything wrong?

Anyway, if I use a third party loader such like grub, what's the progress?

Thanks!


----------



## iwowow (Apr 6, 2013)

```
ada0s4a	1.0 GB	freebsd-ufs	boot
```

*W*hen I want choose it as freebsd-boot, it gave an error, says wrong argument, others were the same.


----------



## iwowow (Apr 6, 2013)

Found the solution: after finishing installation, when selecting exit, it will ask if I need to do final manually typing thing, select yes, then into root, type [cmd=]boot0cfg -B ada0[/cmd], press enter, all done!


----------

