# Installing FreeBSD on a laptop is a PITA



## Ceegen (Nov 28, 2019)

Learning things takes time, and I had originally posted a generalized help request on information for how I should go about installing FreeBSD on a fairly new laptop. Since then, learned about how these things are directly related to specific architecture and communication protocols; how these things are manipulated through the boot sequence, and what code gets first loaded from the very first address in stored memory. May or may not be able to get access to my laptop's technical spec, and eventually figure it out. Probably not, though, because proprietary reasons.

A friend of mine recently gave me a Raspberry Pi 3 B+, and thought that perhaps it might be easier to learn how to install it on that... And maybe I'm just dumb (I know the RaspBSD project isn't managed here, but it is based on FreeBSD it is claimed), but the RaspBSD project doesn't have any download links on their page? Am I missing something? I had thought that maybe getting started there would be easier, but again, what bits get first loaded from where and why? There seems to be this recurring theme of having to know all the things, yet not having the things to know how to do the things. There is also the problem of differences in how older systems that have a BIOS first start up (still have a computer from pre-2010 that has a BIOS), compared to how something like the RasPi (an SoC) first starts up, and what initial settings (if any) are required to get it running. Can still be boiled down to reading 1s and 0s from memory, which flip switches in the processor registers, which make blinky lights do blinky light things.

It seems that even the boot sequence stuff the RasPis has proprietary barriers as well, and no one seems to know what really gets loaded from where and all the finer details (or maybe it is out there and I just haven't found it yet), but people have enough information to get things working on their hardware. Obviously. There seem to be quite a few OSs that work well on the RasPi hardware. But if I wanted to manipulate things on first boot with the RasPi, I can't because it is an SoC, and it has things that load before the things that load from the micro SD card. Correct? Again, these problems are directly related to hardware specific platforms it seems.

Should I start building my own transistors? At what point would one have enough knowledge to install BSD on _any_ system, themselves? Or should I just buy something that is known (https://www.freebsd.org/releases/12.0R/hardware.html) to work? Ideally, the quest is to have enough knowledge to install it myself on any system, but just getting a boot-able system on my specific hardware seems to require knowledge no one has access to? Am I doomed?


----------



## 20-100-2fe (Nov 28, 2019)

I have played for a while with some RPI 3 and ODROID C2 and the lesson they taught me is they only work correctly with the supported OS (Ubuntu or Raspbian). If you really want to get them to flawlessly run another OS, you will have to get involved in its development.

AMD64 architecture is the only way to go if you want to use an OS rather than develop it.


----------



## SirDice (Nov 28, 2019)

More information about Raspberry Pis specifically can be found here: https://wiki.freebsd.org/arm/Raspberry Pi

Keep in mind that ARM (both 32 and 64 bit) is still a Tier 2 platform. As such they don't have the same level of functionality and support as i386/AMD64.



Ceegen said:


> At what point would one have enough knowledge to install BSD on _any_ system, themselves?


Once you've gotten enough experience.



> Or should I just buy something that is known (https://www.freebsd.org/releases/12.0R/hardware.html) to work?


This should always be your starting point. Don't expect that brand new piece of kit to work, it takes time to develop drivers because we usually can't rely on manufactures to provide FreeBSD drivers. Most of time they only support Windows. 



> Ideally, the quest is to have enough knowledge to install it myself on any system, but just getting a boot-able system on my specific hardware seems to require knowledge no one has access to?


Well, the only way to get experience is to actually do it. Make mistakes, learn and try again. Nobody became an expert overnight. 



> Am I doomed?


Nope. You just need to stick to it and put in some elbow grease. Nobody is going to claim that setting up FreeBSD is easy. It's only easy when you know how it works. But that works for everything, nothing is easy at first, it becomes easy once you've done it enough times.


----------



## kpedersen (Nov 28, 2019)

The title of this thread is about FreeBSD on laptops?

The difficulty with laptops is mostly that the hardware list (https://www.freebsd.org/releases/12.0R/hardware.html) is not particularly useful because you do not have the option to mix and match correct hardware like this on a laptop. It more ends up that you are stuck with whatever junk the vendor pulled out of the bargain bucket at time of manufacture.

It would be nice if that list provided supported "whole systems" for x86 laptops, like it does with sparc64 (i.e Sun Ultra™ 450). However I imagine that list would pretty much result in a a list of slightly older Lenovo Thinkpads.
What I would suggest is have a read of the mailing lists and get a feel for which Thinkpad works best, and just get that. Choose the right hardware for the OS; not the other way round.

As a quick suggestion, a Thinkpad x240 is working well for me.


----------



## CraigHB (Nov 28, 2019)

Yeah that's a big bite to chew when first starting with FreeBSD.  I've been a Linux user for decades and now a FreeBSD user for a few years and I have yet to try FreeBSD on anything but a desktop system.  Starting with a laptop can be tough and an SBC (single board computer) is even more out there.

As mentioned makers can throw some pretty obscure chips on their boards, not a problem for Windows or even Linux, but FreeBSD gets left in the dust a lot with those proprietary components.  In any case there are some FreeBSD friendly laptops so you have to start with one of those if you want to avoid the frustration.

With a desktop system you have more flexibility.  They tend to use more mainstream components on motherboards and If an add-on board doesn't work right you can try a different one.


----------



## ralphbsz (Nov 28, 2019)

20-100-2fe said:


> AMD64 architecture is the only way to go if you want to use an OS rather than develop it.


That is an exaggeration. I've been using FreeBSD on i386 for many years and still do, and it is perfectly reliable and functional. And that's without doing any development ... matter-of-fact, I've never even compiled the kernel or base OS.

The rest of your post I agree with: When on something like an RPi, it's just easier and less work to use the OSes that are well supported.


----------



## Deleted member 30996 (Nov 28, 2019)

There is a screenshot thread going back to 2009 full of people who have FreeBSD installed on laptops. I don't find it to be a PITA but that's just me.


----------



## Ceegen (Nov 28, 2019)

Thanks for the replies everyone. I am interested in system development, and eventually in translating systems and apps to other hardware. Still learning, very new, not pretending to know it all, but... Many years ago I was an electrician, but I've always been a nerd. Started down this path after learning that the formula for finding power factor was simply Pythagoras' equation. I am *not* doing this because it is easy. I find balancing equations, and in turn the circuits they represent, pleasing. Soldering is fun. Reading technical manuals is not boring.

Thinking that the next step, for me, is to learn more about how hard drives work in relation to SPI or other system-bus protocols. Right now, having a hard time understanding how graphics really works. Been watching a lot of Ben Eater on YouTube (AWESOME source of info, goldmine even, if anyone wants to check that out), and writing out binaries using Python (a language I really know, just started learning C++ and Assembly) by hand, uphill in the snow both ways, looks fun. Just getting the things to communicate is the challenge. However, without some kind of graphical representation even if just a text console (via a physical UART port, even), going further would be pointless. So ultimately, knowing how to get a system to print text to screen at the very least, seems necessary.

This leads me to believe I should be learning more about how to print text to screen, to be able to poke and prod from within the system, and was wondering if anyone has reference material for that sort of mess?


----------



## Birdy (Nov 29, 2019)

Laptops running FreeBSD

EDIT: Video - 5 Mistakes New FreeBSD Users Make


----------



## Ceegen (Nov 30, 2019)

https://wiki.osdev.org/PC_Screen_Font

This is sort of the material I am looking for. Just found it, and foresee much reading. Be back some time next year, fam.


----------



## drhowarddrfine (Nov 30, 2019)

Just to ditto what ralphbsz said. I've had three laptops and never had any issues installing FreeBSD on them except for wifi on two. I have a feeling wifi will work on them now but I haven't tried. However, I have to admit they are several years old.


----------



## Ceegen (Nov 30, 2019)

drhowarddrfine said:


> Just to ditto what ralphbsz said. I've had three laptops and never had any issues installing FreeBSD on them ...



The two laptops I have don't even get to the command prompt. Well, one sorta boots to the command prompt, and by sorta I mean it takes a long long time to get there... And then if you press any keys it crashes, hangs and goes straight to a black screen. One features an i5 and the other an i7. I also have three devices (including the previously mentioned Raspberry Pi 3 B+) all of which features the same Arm v8 chip, which is prospectively very exciting. I am still in the "information gathering" stage of operations, because there is a crap-ton of information to gather.


----------



## scottro (Nov 30, 2019)

For what it's worth, not using EFI, and using UFS, with Intel 7260 wireless and something else on the Thinkpad, I've not had trouble, even sharing it with Linux installs. This is a Thinkpad L420, (fairly old) Lenovo Yoga2 probably 5-6 years old and a rather old generic Clevo laptop.  If FreeBSD is the only O/S on it, I have no trouble using ZFS either. So persevere (which it sounds like you're doing) there's always hope.   I don't get the wireless performance from wireless with the Intels that I get from Linux, which can do 802.11ac speeds. FreeBSD seems to only be able to do 802.11n, so far.


----------



## Deleted member 30996 (Dec 1, 2019)

I prefer vintage Thinkpads at or before the W520 series so they still have the good keyboard. My W520 has an Intel i7-2670QM @2.4GHz, 8GB RAM, Hitachi Travelstar 500GB HDD @7200RPM, Quadro 1000M with Optimus and is still comparable to a lot of newer machines. I'm using a T400 now and have a T61 running next to me.

I have an i386 Sony Vaio I used with FreeBSD for years and a Gateway NV53A/Acer clone running FreeBSD that is currently serving as my multimedia machine. All came with Vista or Win7 installed originally.

I had wi-fi running security/kismet on my Sony for a while to see what I could see, but consider wi-fi too risky for my own use living in a building with approx. 50 other apartments and run an Ethernet LAN.


----------



## Nicola Mingotti (Dec 1, 2019)

I skimmed over the discussion. Ceegen , if you are interested in RPI and other similia you should write in the forum Embedded. I am not much an admirer of the RPI, I use the BeagleBone, $10 more, but well worth it. You can install FreeBSD there, it works. There are other people like me who are really interested in FreeBSD in embedded, the first 2 names I can tell you are obsigna and aragats. Look for their old posts, you will find some very relevant stuff. 

You will encounter A LOT more problems running in the embedded, but it will be a LOT more fun then a pc. Also, if you use the BeagleBone, it is ALL open source/hardware AFAIK, unlike your laptop. The manual can be 4,000 pages, but that is another story. Controlling motors and sensors is superFun, doing it remotely from a ssh connexion its the topFun  

I reccomend 1 book: "Exploring beagle bone black", it is about Linux, but transporting the procedures to FreeBSD is part of the fun. You will see, there is a lot of things to do.


----------



## drhowarddrfine (Dec 1, 2019)

fwiw, mine are all Dell laptops.


----------



## ralphbsz (Dec 1, 2019)

Ceegen said:


> The two laptops I have don't even get to the command prompt. ...


That seems very implausible. I've only installed FreeBSD on one laptop (an old x86 Thinkpad T60), and it was completely unproblematic. Wired and wireless ethernet worked fine (but it was older hardware). But: that was in console mode only. Try setting up your laptop without GUI, with console only. I bet it will work just fine.

You have to rememnber the distinction between FreeBSD (the base operating system, which only offers console mode), and the ports and packages, which include all the GUIs. The support of the ports/packages is even more on a volunteer basis.



> One features an i5 and the other an i7.


The CPU probably makes no difference at all; if you have any problems, it is probably from the display, wireless, or NVMe subsystem.



> I also have three devices (including the previously mentioned Raspberry Pi 3 B+) all of which features the same Arm v8 chip, which is prospectively very exciting.


Remember that Arm support is second tier, meaning less likely to work out of the box, or at all. I spend a few weekends trying FreeBSD on a RPi3B, and found it to be not usable for my purposes, so I switched to Raspbian. YMMV.


----------



## aht0 (Dec 1, 2019)

drhowarddrfine said:


> fwiw, mine are all Dell laptops.


Gotta agree. One Dell Inspiron 17R and one Dell Latitude (cant recall model name), run both FreeBSD just fine. Inspiron had WiFi card replaced, original Broadcom did not work properly even on W7. Have had positive experience with Asus models as well.
Acers and HP's I'd avoid.


----------



## Ceegen (Dec 6, 2019)

Specifically:
Dell Inspiron 15 3000
Dell Inspiron 15 7000 Gaming

Don't seem to be supported, or it might be because I don't know how to configure things yet. At this point I may get some familiarity with FreeBSD on the RasPi, so at the very least, there is that. Dell is very friendly with a certain software licensing company, which run their OS on these machines almost exclusively. It might be beyond my pay-grade to fiddle with that sort of thing.

I'm not sure if this has been suggested or tried, but in my research of the Raspberry Pi 3 B+, you can boot over the GPIO pins which is neat. My idea being having a two-tier hardware physical layer between machines running all the same things, but communicating as one operating system, a tandem-operating system of sorts, where the one drives all the permissions of what can be accessed in the second. This way, machine 2 can only run code that machine 1 allows it to. Machine 1 sets permission bits over GPIO in a one-way fashion such that machine 2 is set up upon boot to have the "permission bits" transported over the GPIO pins read-only. Harder to compromise that which you physically can't write to, no?

I'm convincing my permanent live-in lady-friend (aka the wife) to not get mad at me for buying another RasPi to test this theory out (AFNP!). Is there such a way to configure a kernel to run in this way? As long as the hardware works, and it doesn't take so long to boot over GPIO that it times out, this should be feasible?


----------



## DesktopUser1 (Dec 8, 2019)

ARM? You might have some luck with NetBSD. They are a BSD flavor whose goal is to support as much hardware as possible. Their motto is “of course it runs NetBSD!”


----------



## neel (Dec 12, 2019)

I run FreeBSD on a HP Spectre x360 13-ap0053dx and I have to run CURRENT with a out of tree HID-over-I2C driver, a custom-compiled xorg-server, plus I have to worry about updating every few days. And really have to fix my system if a revision broke my system, or even reinstall if my OS is dysfunctional beyond repair. I'm forced to be a beta tester thanks to new hardware

If I went ThinkPad, I'd still have to do this, its not like the 7th Gen X1 Carbon is any better, and I don't even own a ThinkPad.

I had GNOME and drm-kmod crash, where Windows and Linux work well on the same laptop, but I just have to keep using FreeBSD.

Only a true fan knows.


----------



## Atarian (Dec 17, 2019)

I installed FreeBSD 12.1 on a 64bit Acer laptop at the weekend. Encrypted ZFS straight from the installer. Everything worked - video, sound, network (both wired and wireless). I've got one issue where the modern Intel graphics driver / ker el module panics on sleep sometimes, but aside from that it works perfectly.


----------



## KenGordon (Dec 17, 2019)

aht0 said:


> Acers and HP's I'd avoid.



I just installed, first, FreeBSD 12.0 RELEASE. then about a week later, FuryBSD, on an older Acer laptop for our local ham club: both worked just fine and immediately. Fetched and extracted the ports too.

My only problem with it was that the touchpad only worked once. Then I had to connect a USB mouse. Otherwise, no sweat.

Ken Gordon


----------



## neel (Dec 17, 2019)

I have a HP Spectre x360 (2018) 13-ap0053dx (also mistyped as other names by me) and installing/using FreeBSD is a real pain. I have to track CURRENT, have a custom-patched Xorg and a third-party HID-over-I2C mouse driver, and hope changes to the virtual memory subsystem didn't break anything. I had iichid, drm-kmod, and GNOME broken multiple times. And yet I have a four-hour battery life instead of 8-12 hours on Windows or Linux.

And FreeBSD is more sluggish UI-wise than Windows and Linux on my Spectre. Linux is super responsive, Windows is pretty good, FreeBSD is just okay.

(Although the ThinkPad X1C7 wouldn't be much better either, same hardware generation, same HID-over-I2C requirement, same Wi-Fi chip).

Only a dedicated BSD fan puts up with this. Beginners almost always pick up a refurbished T420 off eBay, its easier.


----------



## zader (Dec 17, 2019)

One thing you can also do when shopping for a BSD laptop..

download 12.1 and 13.. burn a live image onto a usb key.. then when you find one you want to try .. boot a live image up and run commands like:

dmesg | less
pciconf -lvc
usbdevs -v
atacontrol list

chances are if you cant detect it from a live cd .. its not going to work very well..   then try the 13 version.. if it still doesnt work.. you can assume it will be a while before it will.

In my case I got a hold of a DellXPS 15 .. tossed the junk wificard and replaced it with an intel card.. almost everything else worked with some tweeking and research .. but all in all the user experience wasn't great..  the other comment about getting a referb ibm is a great idea to .. you can install freebsd with a ui in a few hundred megs of ram and a gig or two of space ..   the silver lining is .. anything that freebsd runs on ..  it runs great!


----------



## neel (Dec 17, 2019)

UEFI Secure Boot is enabled on computers in stores, so you'd have to disable it. And the store manager probably won't let you.

Also, newer Windows PCs have BitLocker enabled by default, so if you disable Secure Boot, you'd have to unlock BitLocker as well.


----------



## zader (Dec 17, 2019)

good point, I forgot ms improved security with this thing called encryption


----------



## Birdy (Dec 18, 2019)

neel said:


> Also, newer Windows PCs have BitLocker enabled by default, so if you disable Secure Boot, you'd have to unlock BitLocker as well.


The Home version doesn't have BitLocker device encryption, see 'Compare Windows 10 Home vs. Pro'


----------

