Would like to setup a Dual Boot with pfsense on a Lap top.



  • Would like to setup a Dual Boot with pfsense on a Lap top.

    Boot Option

    • Windows 7

    • Pfsense 2.01

    Is this possible?


  • Rebel Alliance

    http://www.pfsense.org/index.php?option=com_content&task=view&id=43&Itemid=44

    Hard drive installation
    The Live CD includes an installer option to install pfSense to the hard drive on your system. This is the preferred means of running pfSense. The entire hard drive must be overwritten, dual booting with another OS is not supported.


  • Netgate Administrator

    As quoted above it is not supported and the installer will not do it.
    I'm fairly certain it could be done if you're familiar with the FreeBSD boot loader and install process. I'm not though.
    Please correct me if there's some fundamental reason it can't be done.

    Steve



  • I haven't done it myself but from what I've gathered from other people dual booting FreeBSD and Windows7 believe you would want to install FreeBSD first anyway, then Windows, and use a 3rd party boot loader like Grub2 or GAG to boot them. If pfSense demands use of the whole HD it may not be possible.



  • If the CPU is suitable run pfSense in a Virtual Machine.



  • @stephenw10:

    Please correct me if there's some fundamental reason it can't be done.

    I suspect if you have sufficient knowledge, cunning and persistence it can be done.

    How about installing to a USB stick or CF card or other "additional" drive and dual booting by changing the boot device from the BIOS?

    My ranking in expected "ease" (easiest fist):
    1. Install pfSense to an additional drive.
    2. Install pfSense to a Virtual Machine on the laptop.
    3. create single combo drive with Windows and pfSense



  • Before creating the post I did run across the note as ptt quoted, but I continued my search assuming it can be done.
    Googling around a bit I ran across different methods which the Freebsd community are using to create dual boot systems.

    I do realize that pfsense is a custom build based on Freebsd and may have some slightly different menu install options etc?
    I have not studied the various methods yet listed in the links above. Maybe someone out there has already jumped though
    the hoops and found which method or methods works best?

    The laptop is the HP Elite 8530p which is outfitted with the Intel T9400 and 4GB Ram. It is overkill for pf + add-ons but running
    a VM I think it only opens up additional points of attack to potentially bypass pfsense.

    I will be running (Single GB Nic) vlans with a 3 layer Cisco switch which I hope doesn't open the door to unnecessary vulnerabilities/Hacks/attacks?



  • While it might not help you, I have to ask: why?

    Maybe there's another option to this scenario.


  • Netgate Administrator

    I have a laptop that dual boots Win XP and FreeBSD. That's no problem the FreeBSD installer takes care of it for you. The pfSense installer does not. You would most likely have to do it manually.
    If I were trying to do this I would boot the Nano+VGA image from a USB stick as Wallabybob suggested.

    Steve



  • While it might not help you, I have to ask: why?
    

    Call it being frugal…

    This is for my home office and I can remove the firewall temporally if needed. A emergency and need a laptop on the road, it would be setup for a dual boot to windows 7.



  • @wallabybob:

    @stephenw10:

    Please correct me if there's some fundamental reason it can't be done.

    I suspect if you have sufficient knowledge, cunning and persistence it can be done.

    How about installing to a USB stick or CF card or other "additional" drive and dual booting by changing the boot device from the BIOS?

    My ranking in expected "ease" (easiest fist):
    1. Install pfSense to an additional drive.
    2. Install pfSense to a Virtual Machine on the laptop.
    3. create single combo drive with Windows and pfSense

    I have no knowledge abot linux whatsoever and have done it. I have if I remember correctly 10 partitions or so on my HD. I have XP, ubuntu, some other linux distribution which is for a usb stick normally installed, and pfsense.
    It let me install it onto a partition, I didn't have to delete the entire hard drive.
    It wipes out the boot loader and nothing will start anymore but I just started from the ubuntu CD and did the grub2 auto fix option.
    it won't find pfsense but it can just be added manually and then be started just like any other operating system.
    and i have never dealt with linux in dept. i just read dummy guidance notes and had them guiding me and it worked.

    1. partition your HD
    2. format your pfsense partition with ubuntu or anything that boots
    (I had XP and ubuntu installed before I installed  pfsense and it only kills the grub2 bootloader. You will find the pfsense bootloader only booting pfsense. but after fixing grub2 and entering manually the pfsense partition you can have as many operating systems beside pfsense as you want)
    3. install pfsense into this partition
    4. install windows (not sure that windows 7 & 8 works like that)
    5. install ubuntu or anything else you want, if you don't want anything else then just install grub2
    6. manually configure grub 2 for the pfsense partition
    7. i read grub2 can boot into other bootloaders in a chain, so anything is possible i guess



  • I know this is very old, but it came up first when I searched so maybe others will benefit.

    THIS APPLIES TO UEFI AND GPT ONLY - I HAVE NOT TRIED BIOS AND MBR

    Getting multi boot with pfSense.

    First: Install Ubuntu. Either create a partition and install other if you're adding to a windows installation, or install erasing whole disk, if there's no Windows to bother about, or you're on a VM. Some key things for Ubuntu.
    gksu. Just try to run it, you'll be told how to install. This lets you run Nautilus (file manager) as root, AND any gedit instances invoked from it. (gksu nautilus & in terminal. '&' leaves a working terminal open.)
    chromium. Brings all your bookmarks etc into ubuntu. Install from Ubuntu software launcher.
    vm tools. (If you're using VM-Ware) Install from management menu; extract to desktop; move to the extracted folder on desktop with root nautilus (see above) and install by ./vm-install.pl from a root terminal invoked from nautilus. Do not follow suggestion to use open source version it seems not to work. Accept all other suggestions. This allows you to cut and paste from Windows e.g. the file in the fourth section.
    GParted. Install from ubuntu software launcher. Note this is available on the 'live CD' option of ubuntu installer, but the installed version does not. You will need a live CD version to edit the partitions of the OS you are using.

    Second: Use gparted to trim the ubuntu ext4 partition and move the swap next to this trimmed partition leaving an empty space. To follow instructions below you'll need around 15GB free, though you could probably get away with less.

    Third: Install pfSense. The iso file, or CDROM are easy, just set your machine to boot from them. If you use a USB stick you must download the right version, then extract it and load it to a USB using rufus. NOTE, the USB will NOT be recognised by windows, but your UEFI BIOS will boot from it. pfSense docs say that you must use the whole disk, and the standard FreeBSD install question about using the whole disk or a partion is not present in pfSense (and their FAQ says you can't multiboot), HOWEVER there is still the option of manually setting up the partions. Use it, and select 'CREATE'. This will put the partions you next set up in the empty space set up in step 2 above. For the first 'create' you define the partion as 'FreeBSD-ufs', set the size as '10GB', and mountpoint is '/'. You can give it a name if you wish, naming helps identify the partition in GParted. NOTE: NO spaces in the size: 10GB. Hit 'OK'. You'll be asked if you want a boot partion - of course you do! Now use 'create' again, define the final partition as 'FreeBSD-swap', mountpoint is blank, and size '4GB'. Again you can name it if you wish. Hit OK, then carry on installing. You'll be asked to reboot, and here's a problem. The grub bootloader from your Ubuntu install has no idea about your new pfSense installation.

    Fourth: Open Ubuntu. root run Nautilus. Move to and open /etc/grub.d/40_custom. Do not overwrite anything and add the section below: -

    menuentry "pfSense" {
        set root=(hd0,gpt4)
        chainloader /efi/BOOT/BOOTX64.efi
    }

    Save, then from terminal sudo update-grub. DON'T FORGET.  Note that 'hd0' above is the FIRST hard disk, 'gpt4' is the 4th gpt partition (after EFi System partition, ext4, linux-swap if you just have ubuntu on the disk). If you have windows it will use at least 4 additional partitions. Check where the FreeBSD efi partition is using gparted, it's the second EFI and 200 MB. The path after 'chainloader' can be verified if you mount the fourth partition (or whichever one it is). Use sudo mount /dev/sda4 /mnt. Drill into the mounted partition to find the .efi file, ignore the 'mnt' part of the path. If you go looking to customize how grub appears you'll come across 'grub-customizer'. Don't use it. It changes stuff that's hard for a noob to fix. You may want to edit /etc/default/grub instead to ensure the grub menu displays. Do this by changing this line '#GRUB_HIDDEN_TIMEOUT=5' (the '#' is new, and the 5 was 0)

    Some useful web-sites: -

    https://forum.pfsense.org/index.php?topic=56033.0 questions about dual booting with pfSense
    https://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html FreeBSD partitions
    http://www.rodsbooks.com/refind/installing.html Info about installing refind, an alterative boot manager which finds FreeBSD and pfSense but is a a bit ugly.
    https://www.gnu.org/software/grub/manual/legacy/Command_002dline-and-menu-entry-commands.html#Command_002dline-and-menu-entry-commands grub commands
    https://www.howtogeek.com/196655/how-to-configure-the-grub2-boot-loaders-settings/ editing /etc/default/grub
    https://forums.freebsd.org/threads/dual-booting-of-ubuntu-10-10-and-freebsd.23101/ First pointer about dual booting FreeBSD
    https://askubuntu.com/questions/666631/how-can-i-dual-boot-windows-10-and-ubuntu-on-a-uefi-hp-notebook Dual boot windows 10 and Ubuntu.


Log in to reply