Is it possible / sensible to install FreeBSD in a laptop partition

Any comments / advice here? I've seen a couple of older posts, but I don't have that level of detailed knowledge, or the time.
All advice welcome. Thanks.
 
Wow, that was quick. Can you point me at howto? The (old) ones I managed to find look like you do it by hand. And it's bad enough having to deal with all the restrictions that ASUS put on how to configure the boot managment. I really should have got a laptop with two drives. But anyway. . .
 
Wow, that was quick. Can you point me at howto? The (old) ones I managed to find look like you do it by hand. And it's bad enough having to deal with all the restrictions that ASUS put on how to configure the boot managment. I really should have got a laptop with two drives. But anyway. . .
To be honest there isn't a simple guide. There numerous dependencies. I have an X1 Carbon which has 225GB hard drive and originally came with Windows installed. You need sufficient free disk space to create a usable FreeBSD partition, then go into
Windows -> Admin tools -> Computer management -> Storage (this is from memory so may not be accurate)
then pick your drive and attempt to shrink it. If successful you should have xGB of free space on which you can install FreeBSD from some install medium. If/when you have installed FreeBSD and rebooted you should be at the FreeBSD boot manager prompt.


One important point to bear in mind is that you must be using an MBR rather than GPT disk.

It's also worth knowing beforehand if your laptop's wifi is supported by FreeBSD unless you intend to have a LAN connection.
 
[...]
One important point to bear in mind is that you must be using an MBR rather than GPT disk.
That sounds a little bit to definitive to me. I think that the newer the laptop is, the bigger the chances are that a GPT partitioning scheme will work; as well as UEFI. Also, the newer the laptop, the bigger the chances are that that you run into driver issues (not available or not working 100% satisfactory), most notably graphics & WiFi drivers.

The older the laptop, the bigger the chances are that GPT will not work satisfactory or not at all; then MBR is the obvious choice. Over all MBR will work, so that is the safest(/safer) bet.

Depending on the age of your laptop (an exact model & type could be helpful) you can try if GPT works. If you want the greatest chance of immediate success, then, by all means use MBR.

If you think there is a mandatory reason for using MBR, I'd like to know why.
 
If you think there is a mandatory reason for using MBR, I'd like to know why.

FreeBSD's boot manager requires MBR


If you have GPT you would probably need to install your own bootloader such as GRUB, which simply adds a number of hurdles into the mix.
 
Here the actual situation is ahead of the documentation. The detailed documentation of the MBR process can easily lead to the impression that GPT is not the best choice. On the other hand the blue box above says:
Code:
FreeBSD provides for booting from both the older MBR standard, and the newer GUID Partition Table (GPT). 
GPT partitioning is often found on computers with the Unified Extensible Firmware Interface (UEFI). 
However, FreeBSD can boot from GPT partitions even on machines with only a legacy BIOS with gptboot(8).
Work is under way to provide direct UEFI booting.
 
Any comments / advice here? I've seen a couple of older posts, but I don't have that level of detailed knowledge, or the time.
All advice welcome. Thanks.

We need to know more about your laptop: its current OS - that you presumably want to keep(?), how much diskspace for it and FreeBSD and crucially whether MBR or GPT formatted?

I bought a refurbThinkpad T430s that came with Win10 on a 112GiB SSD, fortunately MBR partitioned (4 primary "slices" of which W10 took 2, leaving 2 for FreeBSD and a shared FAT32 slice)

balanga's description of shrinking Windows to free space for other partition/s describes what I did, so the guided UFS on BIOS MBR installation was smooth, after which it was only necessary to run boot0cfg to configure multibooting.

I don't know how to setup multibooting with GPT partitions, but hear it can be done using GNU GRUB; I was glad not to have to go there.
 
Here the actual situation is ahead of the documentation. The detailed documentation of the MBR process can easily lead to the impression that GPT is not the best choice. On the other hand the blue box above says:

True enough, but it comes down to using whatever it's already using, if keeping its existing OS matters.

If it doesn't matter and you're installing from scratch, use what suits the machine's era, BIOS and personal preference.
 
The older the laptop, the bigger the chances are that GPT will not work satisfactory or not at all
Hey, we're in 2023 now. Are you sure a notebook that would not support GPT (not talking about not supporting UEFI) would yet be able to run FreeBSD in any useful way (if at all)?
It seems to me, such hardware will typically be so old and have so little RAM available, that it can hardly run FreeBSD in any usable way. Of course, I can be mistaken here. Because I'm using GPT ever since it became available in Linux. Don't remember which hardware I was using then and what time it was.

NOTE: some ppl confuse not supporting UEFI with not supporting GPT. Which is not the same thing at all.
 
Hey, we're in 2023 now. Are you sure a notebook that would not support GPT (not talking about not supporting UEFI) would yet be able to run FreeBSD in any useful way (if at all)?
It seems to me, such hardware will typically be so old and have so little RAM available, that it can hardly run FreeBSD in any usable way. Of course, I can be mistaken here. Because I'm using GPT ever since it became available in Linux. Don't remember which hardware I was using then and what time it was.

NOTE: some ppl confuse not supporting UEFI with not supporting GPT. Which is not the same thing at all.
You could try replacing the storage medium in the laptop (unless its soldered on like brand new machines), take the existing windows one out and put in a new SATA or NVMe drive. That way, if it all goes wrong, you can just swap the drives back and continue with windows.

Or install FreeBSD on Virtualbox within windows or another virtualisation product.

I've got multiple laptops running FreeBSD. Some of the older ones have the drivers for the wifi, but its actually the wifi cards just being old and not that effective. For those, I have a TP-Link Nano USB Wifi card, which is supported out of the box on FreeBSD. Saves pfaffing about with trying to get connected.
 
I don't know how to setup multibooting with GPT partitions, but hear it can be done using GNU GRUB; I was glad not to have to go there.

If you want to multiboot with GPT partitions, I'd suggest looking at Ventoy.

Unfortunately the Windows installer gives you most options for installing, so you can set it up with a couple of partitions for Ventoy itself, and as many as you like for other OSes. The Windows installer gives you the option of installing on an exfat partition which I chose initially because FreeBSD is supposed to support exfat, but I found it to be unreliable and installed on NTFS.
 
If you have GPT you would probably need to install your own bootloader such as GRUB, which simply adds a number of hurdles into the mix.
Not true. FreeBSD can legacy boot off GPT partition without any problem. GPT itself has pMBR in LBA0 making this possible (lba0 can include bootcode to find boot partition and load it; in our case freebsd-boot). That means any HW capable booting off MBR can do so from GPT too if OS supports it. And FreeBSD supports it for some time.
 
I think OP would get best results if they keep it simple and allow the installer to just use the whole disk in the laptop. Dual boot and partitions are frankly big and time-consuming headaches that I left behind when I started using FreeBSD and ZFS. If OP has account details for first user and for root (admin) handy (Just come up with it yourself, OP), that's all really needed to have a bootable system in 10-15 minutes.

Choosing ZFS on whole disk (and forget the whole complicated partition mess) allows you adjust things post-install, something that other options just don't do. :P ?‍♂️
 
Not true. FreeBSD can legacy boot off GPT partition without any problem. GPT itself has pMBR in LBA0 making this possible (lba0 can include bootcode to find boot partition and load it; in our case freebsd-boot). That means any HW capable booting off MBR can do so from GPT too if OS supports it. And FreeBSD supports it for some time.
What I'm saying is that if you want to dual boot FreeBSD alongside Windows and you have a GPT system you will likely struggle without third party tools.

What do you expect to see when you switch on after installing FreeBSD on a GPT partition, if the system had been booting Windows previously?
 
What do you expect to see when you switch on after installing FreeBSD on a GPT partition, if the system had been booting Windows previously?
As FreeBSD was the 2nd installed OS I expect to
a) nothing, i.e. no bootcode in lba0 with mandatory magic and fake partition defined if UEFI boot was selected (and if Windows is UEFI booting)
b) FreeBSD's legacy bootcode in case of legacy boot was selected

While OP didn't specify the model of the Asus why would we fallback to legacy boot at all ? If that book is UEFI capable both Windows and FreeBSD can share uefi partition.

I will say I have one lab machine like this and because one of the partition is Linux I let grub take over the boot. Because, well, it's comfortable. If there's no Linux in equation freezr 's solution is neat.
Or, you can select the boot either from UEFI shell or overwrite it in fw ("bios" menu selection).

It's been some time since I legacy (chain)load Windows off the FreeBSD bootloader but this was a thing before too.

What I'm saying is that if you want to dual boot FreeBSD alongside Windows and you have a GPT system you will likely struggle without third party tools.
I asked this somewhere on this forums before. I'm really curious -- what issues did you run into? I've never run into any issues with GPT.
 
What do you expect to see when you switch on after installing FreeBSD on a GPT partition, if the system had been booting Windows previously?
If you just overwrite Windows (but leave bootcodes alone), I'd expect FreeBSD to be chain-loader booted.

If you boot side-by-side, that requires accessing the boot menu via the BIOS. And Windows likes to be the first (default) option to be booted. Newer BIOSes (like UEFI) do allow you to switch that default to the FreeBSD partition.

Played with that during my Linux days, but then I decided that this headache is not for me. So I switched to FreeBSD and ZFS, and never looked back. :P Friggin' convenient, I'd say. ?
 
My experience is to be careful because the FreeBSD installer ignores any Linux or NTFS partitions, when you install it then it will overwrite the EFI scheme and let you boot FreeBSD only, afterward you must install refind and you will be able to select your OS at the next boot.

REFInd (for me) is sit on top of the EFI partition and lets you decide which OS booting or to jump into the bios, then it triggers the real OS bootloader. I found it much more easier than trying to manually add an entry into GRUB, however I didn't test it with Windows so I do not guarantee for the outcome.

My suggestion is to clone the disco with Clonezilla in case of an unrecoverable disaster.
 
I think OP would get best results if they keep it simple and allow the installer to just use the whole disk in the laptop. Dual boot and partitions are frankly big and time-consuming headaches that I left behind when I started using FreeBSD and ZFS. If OP has account details for first user and for root (admin) handy (Just come up with it yourself, OP), that's all really needed to have a bootable system in 10-15 minutes.
OP wants to know if he can install FreeBSD in a laptop partition. By that I assume he wants the ability to run his existing OS (presumably Windows), so using the whole disk is a non-starter.

I disagree about creating a dual boot Windows/FreeBSD system is a time consuming, difficult process, as long as the disk is using MBR rather than GPT.
 
I disagree about creating a dual boot Windows/FreeBSD system is a time consuming, difficult process, as long as the disk is using MBR rather than GPT.
Yeah, try preparing the partition so that the FreeBSD installer finds it and offers it to you on a silver platter.

That's the hard part, it requires you to keep track of how many GB of disk space Windows has, dedicate the rest of the disk to FreeBSD, keep track of the offsets (that are relative to the Windows partition, BTW), and keep converting between bytes, sectors, and GB, because the installer doesn't always give you nice-looking, easy-to-use numbers. And if you mess up and lose track, you risk losing the Windows installation, in addition to not getting FreeBSD going. I've had that happen to me, so yes, I know about backups and everything else. Just getting the numbers right IS time consuming and difficult. It forced me to learn to plan things out and write my numbers out BEFORE I even get the installation going. That made a HUGE difference in the success of my dual-boot adventures.

Combine that with the risk of losing the Windows installation (and being forced to spend time recovering from THAT, even if you have decent backups), that amounts to a huge headache I'd rather not have.
 
OP wants to know if he can install FreeBSD in a laptop partition. By that I assume he wants the ability to run his existing OS (presumably Windows), so using the whole disk is a non-starter.

Yes. I'd made the same assumptions, independently having arrived at the same method: defrag then shrink Win10 to 'sufficient' size, nowadays straightforward; add a common FAT32 or NTFS partition from W10 if desired; install FreeBSD to a newly created slice as usual, reboot or from LiveCD mode on installer, run boot0cfg to set boot options. Done.

I disagree about creating a dual boot Windows/FreeBSD system is a time consuming, difficult process, as long as the disk is using MBR rather than GPT.

Agreed if it's already MBR, but we're all making perhaps sweeping assumptions until Zagzigger returns to let us know.

Not that exploring options meanwhile is a bad thing ...
 
Back
Top