# Can't create new partition



## markconnors (Dec 30, 2012)

Hi, I'm trying to install FreeBSD 9.0 alongside with Windows and few Linux Distros with this guide => Dual boot Windows 7 and FreeBSD 9.0. I shrunk C: and made a 30GB unallocated space for FreeBSD, however something is stopping me to create a new partition, it says "*No space left on device. index '5'*" 

http://imageshack.us/a/img41/9356/img1403lm.jpg


and here are all my partition

http://imageshack.us/a/img29/9820/img1404us.jpg

I tried to search and read different articles regarding my problem, but I couldn't find anything related to this.

I have Windows 7, Back-Track Linux, Luninux and Fedora 17 currently installed on my system.

Cheers!


----------



## wblock@ (Dec 30, 2012)

If you must post pictures, please scale them down to something that will fit on a normal monitor.

Your second giant picture does not show 30G unallocated space anywhere.

Realize that multi-booting is a weak and archaic method of running multiple operating systems.  Consider using VM software like VirtualBox instead.


----------



## fonz (Dec 30, 2012)

As far as I can tell (your pictures are rather huge) your disk is partitioned using MBR. That's fine, but MBR allows only four primary partitions (or three, if using extended partitions, which you are). But when using MBR, FreeBSD requires a primary partition (or slice, in our terminology) for itself, which then has to be divided further using disklabel(8).

If you can somehow merge the two ntfs primary partitions or turn one of them into an extended partition, you should be able to create a primary partition for FreeBSD.

Fonz


----------



## wblock@ (Dec 30, 2012)

Actually, FreeBSD will run fine from an extended partition.  It's the FreeBSD MBR loader that doesn't like them.  In this situation, whatever is being used to multi-boot will work, since it already can deal with extended partitions.


----------



## fonz (Dec 30, 2012)

wblock@ said:
			
		

> Actually, FreeBSD will run fine from an extended partition.  It's the FreeBSD MBR loader that doesn't like them.


Ok, thanks for pointing that out. I no longer use MBR myself, but it's still good to know.

In any case, adding up the numbers there _should_ be room left for a small extended partition for FreeBSD.

@OP: I haven't used sysinstall/bsdinstall for a while (encryption requiring manual installs, different story, nevermind) but does it help if you first move the blue highlight thingy to ada0*s4* and then try to create a partition?

If all else fails you could try to create the partition with a Linux partitioner, but that's only a last-ditch approach that should not be necessary.

Fonz


----------



## markconnors (Dec 30, 2012)

wblock@ said:
			
		

> If you must post pictures, please scale them down to something that will fit on a normal monitor.
> 
> Your second giant picture does not show 30G unallocated space anywhere.
> 
> Realize that multi-booting is a weak and archaic method of running multiple operating systems.  Consider using VM software like VirtualBox instead.



I'm sorry about the pictures, I didn't have the chance to preview my post. anyway
well I used to use VMware but I'm finding it slow especially when I'm running huge programs on it.



			
				fonz said:
			
		

> As far as I can tell (your pictures are rather huge) your disk is partitioned using MBR. That's fine, but MBR allows only four primary partitions (or three, if using extended partitions, which you are). But when using MBR, FreeBSD requires a primary partition (or slice, in our terminology) for itself, which then has to be divided further using disklabel(8).
> 
> If you can somehow merge the two ntfs primary partitions or turn one of them into an extended partition, you should be able to create a primary partition for FreeBSD.
> 
> Fonz



Is that going to affect any of my partitions? I use the default Windows' partition program.



			
				fonz said:
			
		

> @OP: I haven't used sysinstall/bsdinstall for a while (encryption requiring manual installs, different story, nevermind) but does it help if you first move the blue highlight thingy to ada0*s4* and then try to create a partition?
> 
> If all else fails you could try to create the partition with a Linux partitioner, but that's only a last-ditch approach that should not be necessary.
> 
> Fonz



I haven't tried it yet, I'm afraid I might screw one of the partition (ada0s4).

I'm still a bit confused with partitions..


----------



## DutchDaemon (Dec 30, 2012)

You preview a post in 'Go Advanced' when editing.


----------



## wblock@ (Dec 30, 2012)

markconnors said:
			
		

> Is that going to affect any of my partitions? I use the default Windows' partition program.
> 
> I haven't tried it yet, I'm afraid I might screw one of the partition (ada0s4).
> 
> I'm still a bit confused with partitions..



If you change an existing partition, or install any operating system that modifies partitions, there is a chance everything on that disk will be destroyed.  Yet another reason multi-booting should be avoided, and the reason you should make a full backup first.


----------



## markconnors (Dec 30, 2012)

DutchDaemon said:
			
		

> You preview a post in 'Go Advanced' when editing.



I always use advance when posting, and I'm having hard time trying to find the edit button.



			
				wblock@ said:
			
		

> If you change an existing partition, or install any operating system that modifies partitions, there is a chance everything on that disk will be destroyed.  Yet another reason multi-booting should be avoided, and the reason you should make a full backup first.



hmmn... I think might need to delete one of the partition then install freebsd FreeBSD?
anyway is there any limit of how many partition does a hard drive can handle?

Sorry, I'm still quite new to this stuff..


----------



## wblock@ (Dec 30, 2012)

The traditional MBR can only have four primary partitions.  Because that sucked, they came up with the extended partition format, where one of the primary partitions is split up to provide more extended partitions.  That's what you have.  Wikipedia says that extended partitions are a linked list, and so there is no hard limit on how many are allowed.


----------



## markconnors (Dec 30, 2012)

If so, then why I couldn't make another one..  I don't actually want to touch any of those existing partitions if possible.


----------



## wblock@ (Dec 30, 2012)

bsdinstall(8) may not deal well with extended partitions.  They are not often used with FreeBSD due to the loader issue.


----------



## markconnors (Dec 30, 2012)

I tried to create a partition under ada0s4, but it is making a different type: freebsd-ufs instead of freebsd and it gives 95GB of size as a default value which certainly not the size I've allocated before which is 30GB. I believe freebsd automatically detects the unallocated space, so I have a doubt of screwing up.


----------



## markconnors (Dec 30, 2012)

wblock@ said:
			
		

> bsdinstall(8) may not deal well with extended partitions.  They are not often used with FreeBSD due to the loader issue.



Sorry, I didn't notice your latest post.

Ahm.. Am I suppose to execute those commands on the shell?


----------



## wblock@ (Dec 30, 2012)

Sorry, I have not tried extended partitions with bsdinstall(8) or gpart(8).  I can only guess what would be needed based on the gpart(8) man page.  Hope you have backups.


```
# gpart add -t freebsd-ufs -s26g ada0s4
# gpart add -t freebsd-swap -s4g ada0s4
```


----------

