# WinXP&FreeBSD dual boot



## dima338 (Jan 14, 2009)

Hello everyone, I just downloaded the FreeBSD DVD and am planning on installing it on my desktop. I used Ubuntu before so I'm okayish with everything except setting up the partitions. My hard drive is split into two partitions (both 40GB) and I was thinking of giving FreeBSD about 20GB. How would I go about doing this using GParted? 

Thanks in advance,
Dima


----------



## randux (Jan 14, 2009)

Are you saying your drive is already split into two partitions and you are only using one of them? Are you planning to reuse your Ubuntu partition?

*BSD partitions are not the same as DOS partitions. For *BSD you have one physical DOS partition ("slice" in BSD-speak) and you use BSD disklabel to define BSD partitions inside that slice.

The easiest way to get started installing BSD if you can't use a whole drive is to create a DOS partition with the right type for whatever BSD you are installing. You can change the type if you want to reuse one of your existing DOS partitions.

If you can still boot into your Ubuntu then use fdisk to change the partition type to A5 (FreeBSD). Then when you boot the FreeBSD installer, it will be smart enough to suggest that partition in the fdisk step. Just type 'q' to exit partitioning and proceed to the disklabel step, where you will define the FreeBSD partitions inside your slice.


----------



## dima338 (Jan 14, 2009)

Yes my hard drive is split into two partitions (C and D drives in XP), as for Ubuntu it's not on my desktop. I was thinking of using GParted from a LiveCD that's what I meant.

So as I understand it for example my D drive or partition is what you call a physical DOS partition? If so then do I simply have to format this partition to A6 and then use that during the FreeBSD install? Finally if I leave the C partition as it is will my XP still work?

As for the BSD disk label, that is I suppose dividing my existing BSD slice into more partitions?


----------



## randux (Jan 14, 2009)

dima338 said:
			
		

> Yes my hard drive is split into two partitions (C and D drives in XP), as for Ubuntu it's not on my desktop. I was thinking of using GParted from a LiveCD that's what I meant.



If Windows can see both the C and D drives then I can't remember if it's ok to take away his D drive or whether that will break Windows. Take backups and proceed at your own risk!



			
				dima338 said:
			
		

> So as I understand it for example my D drive or partition is what you call a physical DOS partition?



The C drive is certainly a physical DOS partition, the D partition is _most likely_ a DOS physical partition but it _might be_ an extended DOS partition.

*BSD does not like to be (will refuse to be) installed in a logical DOS partition.

GParted is probably overkill, I personally would use a live CD like Slax and boot into text mode and then run fdisk. First thing to do, either way, is to see what kind of partition the "D" drive is. It will be the 2nd one in your table. If it's a physical partition, change the type to FreeBSD and it's party time. If it's inside a logical partition then you will have to delete it and the partition before it (in this case there should be 3 all together, not 2) and create partition #2 as a physical partition with type FreeBSD. It sounds like a PITA but it's actually a 2 second job and it takes alot longer to explain it than do it.



			
				dima338 said:
			
		

> If so then do I simply have to format this partition to A6 and then use that during the FreeBSD install?



First of all, I remembered wrong- A5 is FreeBSD, A6 is OpenBSD. I will edit my previous post to correct this.

Well fdisk isn't going to format it, BSD will format each partition it uses. fdisk will just set the type in the partition table to designate the space for use by FreeBSD.



			
				dima338 said:
			
		

> Finally if I leave the C partition as it is will my XP still work?



I sure hope so! In 4 or 5 years of multibooting up to 8 or more OS on one box, I have never lost a winbloze installation. But there's always a first time for everything and I always hope it happens to somebody else instead of me 

You are going to have some choices to make. When you install FreeBSD it will give you a choice of whether to install a boot loader or not. Actually I think it gives you three choices but I can't remember what they all are. If you let it install a bootloader in the MBR you will _probably not_ be able to boot your Windows installation. If this happens, *do not panic!* You have not lost anything, it's all still there but you just can't boot it. If this happens you will need to install LILO or GRUB from FreeBSD ports and learn how to write a lilo.conf or GRUB menu.lst. Not rocket surgery but something you don't want to be jacking around with while you need something badly from your unbootable Windows system. Think ahead and do some planning.

If you don't install the FreeBSD boot loader, you will _probably_ be able to use a Linux live CD to toggle the bootable flag on either partition so that your BIOS and MBR boot record will work together to pick the right system. However, this is a PITA and not a way to live.

You can also modify Window's bootloader to load additional OSs. I really, really, *REALLY* don't recommend this because it creates an additional dependency on Windows. I presume you're sick of being Redmondnized and this is your way out. So the best bet is to learn how to use LILO or GRUB and start your career in multibooting. It's a lot to think about at one time but it's nice once you get it.



			
				dima338 said:
			
		

> As for the BSD disk label, that is I suppose dividing my existing BSD slice into more partitions?



Exactly correct.


----------



## dima338 (Jan 14, 2009)

Thanks a lot for such a detailed reply, I will try this all tomorrow and report how it goes


----------



## randux (Jan 14, 2009)

Good luck my friend! Multibooting is a lot of fun!


----------

