# Partition Layout Scheme - Please Help



## tcoffeep (Sep 20, 2009)

Hi, all! I've come across a little problem, and I'm hoping you lot might be able to assist me. I've recently become interested in trying out FreeBSD. On the same computer, I also use Gentoo and Windows XP, and this is where I'm having trouble.
I'm planning on allocating 100GB to each OS ( I have a 300GB hard-drive ), but I'm not sure how to set up the partitions. Here's what I'm thinking would work :

sda1 : windows xp (100gb)
sda2 : swap (4gb)  -- Does swap work for bsd and linux?
sda3 : {freebsd} / (10gb)
sda4 : extended partition ( everything else )
____sda5 : {linux} /boot (125mb)
____sda6 : {linux} /     (5gb)
____sda7 : {linux} /usr  (50gb)
____sda8 : {linux} /home (20gb)
____sda9 : {linux} /var  (10gb)
____sda10: {freebsd} /usr (50gb)
____sda11: {freebsd} /home (5gb)
____sda12: {freebsd} /var (10gb)

Am i missing anything? I really want my first time using a BSD to be pleasant (and I want my first time to be with FreeBSD. Isn't that romantic?).


----------



## SirDice (Sep 20, 2009)

Freebsd uses slices and partitions. A slice is more or less the same as a DOS/PC partition. A FreeBSD slice can contain multiple partitions. This can be somewhat confusing for newbies


----------



## Andrius (Sep 20, 2009)

You're missing the fact, that you don't know how BSD partitions/slices work. Read http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install.html and other relevant info in the handbook, it will make your first time a lot more pleasant.

FreeBSD doesn't care much about what to use as a swap device, as long as it can write to it, while Linux will complain about broken swap after FreeBSD uses it. Google something like "freebsd linux share swap" for more info, I don't really know how Linux swap works, so someone may explain it better.


----------



## tcoffeep (Sep 20, 2009)

Sorry, I'm reading the Handbook while trying to make plans. Guess it didn't go over well. My apologies!


----------



## aragon (Sep 20, 2009)

Here we go, in FreeBSD terms.


```
ad0s1 : windows xp (100gb)
ad0s2 : shared swap (4gb)
ad0s3 : {freebsd} (10gb)
__ad0s3a : /     (384mb)
__ad0s3d : /var  (1gb)
__ad0s3e : /usr  (8.6gb)
  (etc)
ad0s4 : extended partition ( everything else )
____ad0s5 : {linux} /boot (125mb)
____ad0s6 : {linux} /     (5gb)
____ad0s7 : {linux} /usr  (50gb)
____ad0s8 : {linux} /home (20gb)
____ad0s9 : {linux} /var  (10gb)
```


----------



## SirDice (Sep 21, 2009)

You're missing /tmp. Unless you plan on running some service that logs a lot /var doesn't need to be that big. IIRC if you press A during partitioning it will pick 512MB for /var.

Depending on what you want to run /usr might be a tad on the small side. If you plan on building ports /usr is definitely too small.


----------



## tcoffeep (Oct 6, 2009)

Well, I've read a little deeper now, and I'm a little more well-read in the entire thing. After my attempts from above, I have made a successful install, though am now converting solely to FreeBSD. I really like it. I'm just not sure what the optimal size of each slice should be. I have 200gb to spare (100gb left for windows for my girlfriend).

( Note : I didn't make a new thread because my question is still relevant to the original topic title, although it's a different question from the OP )


----------



## aragon (Oct 6, 2009)

tcoffeep said:
			
		

> I'm just not sure what the optimal size of each slice should be.


Disk allocation layout is fairly subjective, so as you use it more you will probably find your own preference.  For me, I like setting up my desktops something like this:


```
/           384 MB
/usr        10+ GB
/usr/local  4+ GB
/usr/ports  5+ GB
/export/var 2 GB
/tmp        none - use 1 GB malloc disk
/var        none - use 2 GB malloc disk
```

For /var I create symlinks for some subdirectories to their equivalent in /export/var where data needs to be non-volatile.

/usr stores home directories, so any excess free space should probably go there, but I usually have a /data filesystem too where I keep most of my data (movies, music, etc.) so I usually keep /usr around 10 gig.  Sometimes /data is a FAT32 or ext2 filesystem shared between FreeBSD and Windows.

As for Windows, it never gets more than 8 GB.


----------

