FreeOS.com logo

FreeOS Most Popular
* Most Read stories
* Commented Stories
* Active Categories
* Non Linux Section
* User Submitters
* Top Polls
* Top Authors
* Top Reviews
* Top Rated
* Top Search Terms

Top Articles
* Writing a Linux device driver
* The Linux filesystem explained
* Samba NT Domain Controller
* Setting up Squid as your caching HTTP/FTP proxy
* Web server tutorial - Part 1

FreeOS Highlights
* Howtos (72)
* Reviews (20)
* Opinions (18)
* Interviews (8)
* News (3)

My FreeOS

Nick:
Pass:
Register

Forgot your password?

Contact Us
Contact Us

       

Project: FreeBSD triangle Howtos triangle

Fast & dirty way for dualbooting FreeBSD & Linux

By Saju <unreal@ufie.org>
Posted: ( 2002-02-11 12:50:05 EST by prakash )

You like Linux, you love freeBSD. Now you want to have both on your new ix86 box. If you are not a purist and you can spare a little MB on your disk, read on.

We will start by installing FreeBSD first. Boot into freeBSD installer via the boot floopies / cdrom etc. FreeBSD installer (sysinstall) will run fdisk on your hard disk. This is where you need to split your hard disk into different sections on which you can install different operating systems. These sections are called slices in freeBSD terminology and partitions in DOS/Linux terminology.

Suppose you have a single IDE HDD, freeBSD will call this disk \"ad0\". Think of ad0 as a pizza. Now you need to mark out the slices which freeBSD will have and which Linux will have. The trick here is to create a Linux slice(s) just before you create a freeBSD slice. Just select \"c\" for creating a slice and mark it as a linux slice by entering the proper sysid when prompted by the installer.

Note: The linux slice you created should be atleast 25MB in size and should be the first slice. You can optionally create other mount points ( /home, /usr, /var etc now. ... this is not recommended though.) The linux slice ofcourse will be empty and of no use to you as of now. Then go ahead and create a freeBSD slice as normal. Make sure that you install the FreeBSD boot manager on the MBR.

After you finish, the freeBSD fdisk should look something like:

ad0s1 : Linux
ad0s2 : FreeBSD
ad0s3 : Linux --- optional if you created other slices
ad0s4 : Linux --- optional if you created other slices

The order of slices s2, s3, s4 do not matter.

Now reboot your machine with Linux installation CD / floopy. The Linux fdisk should show:

/hda1 --- Linux partition
/hda2 --- freeBSD
/hda3 --- Linux /* if you had created them initially */
/hda4 --- Linux /* if you had created them initially */

While installing Linux make sure that you install your /boot (for Red Hat) or your bootfile (kernel image) on the first Linux slice/partition (/hda1) you created using freeBSD. Do not install lilo. You can go ahead and create other linux mount points if you had not created them earlier. Now boot your machine without any installation media. You will see the freeBSD loader \"BT\" booting with the options :

 F1 Linux
 F2 FreeBSD
 
Default : F2
Pressing F1 should boot Linux, F2 should boot FreeBSD.

This has been tested with Linux 2.4 and FreeBSD 4.2.

Other articles by Saju

Current Rating: [ 6.3 / 10 ] Number of Times Rated: [ 30 ]

More Howtos
* Fast & dirty way for dualbooting FreeBSD & Linux
* Getting started with FreeBSD
* Compiling the FreeBSD kernel
* Configure a NIS and NFS client on a FreeBSD box

Contents
  Howtos
Links
  Articles
  Howtos
  Interviews
  Reviews
  Websites
News

FreeBSD
About FreeBSD

Print It!
Printer Friendly Version