How to get Linux onto a non-approved laptop

Dell certifies certain models for Linux, but if yours isn't, all is not lost

Some of the changes in modern kit, especially portables, seem to be intentionally obstructive to Linux users however you can mostly work around them.

The Reg FOSS desk recently reported on this year's Ubuntu laptop from Dell. It's a good thing to have major vendors shipping kit that is approved and certified for Linux, but it doesn't help if you have a non-approved model. We recently battled with such a machine – this is the report from the front line. For reference, it's a Dell Latitude 5420, UEFI, Core i5, SSD only, USB-C, and USB-3.

We are going to assume that your laptop comes with Windows pre-installed, simply because most of them do. Apple laptops are a whole other world of suffering, and since the Intel ones are on the way out and the sole distro for Arm-powered kit isn't quite there yet, we'll leave that for another day.

The first few things you should do are easier under Windows, though, so don't wipe it just yet. In fact, we suggest that you don't wipe it at all. As a general principle, unless you're very short of space, we recommend dual-booting. You can shrink a Windows C drive down quite a lot, and having a fallback OS to hand can be handy in emergencies.

Secondly, if it's a company machine, check with the IT department that you're allowed to do this. Many won't let you, and it's not worth losing your job.

Before you touch anything, we suggest preparing a Ventoy USB key with the ISO file of your Linux distro of choice, and also a copy of the ISO installer for your version of Windows from the Microsoft downloads page. The oft-handy SystemRescue wouldn't go amiss, either.

Step 1: Update your firmware

For convenience, we'll call this the BIOS, even though on a new box, it's almost certainly UEFI. Determine the exact model number. A very easy way to do this that a surprising number of people overlook is just to turn the thing upside-down and look for a sticker on the base. Then look on the maker's website for the latest BIOS, and compare that to the current one. If you boot Linux off a USB key, the command dmidecode -s bios-version will usually tell you.

How to update it varies wildly from one brand to another. You might be able to download and run a Windows app, or download a file and write it to a blank USB key then boot from it, or just copy a file onto USB and read it from within the BIOS itself. It varies. Google for that machine's BIOS hotkeys, because they vary a lot: it might be Esc, Del, F1, F2, F10, F12 or even a combination. Ideally, the two you need are the key combo to enter the BIOS setup, and if possible, the one to pick a boot device.

Step 2: Make sure Linux can see, and read, your disks

As The Reg FOSS desk favors old ThinkPads with full-travel keyboards, this 2021 model came as a bit of a shock. For instance, it has a power button where the Delete key should be, because apparently product designers don't type.

What was more of a surprise was that Linux couldn't read its hard disk. It didn't even know that there was one.

We found that the machine shipped with an encrypted hard disk, using Windows 10's Bitlocker, even though we'd never set a password. Your vendor might publish instructions on how to disable this. If not, Microsoft does. Disable it and wait for the job to finish.

Even so, Linux couldn't see the disk. Although this is a slimline laptop with a single SSD slot, Dell ships it configured for RAID with Intel's "Rapid Storage Technology" driver. This means third-party OSes can't see the drive. While it is easy to change this in the BIOS, the snag is that Windows then will not boot.

So don't change the BIOS setting yet. First, boot Windows and set it to start in Safe Mode. Open an Admin-mode command prompt, and enter this command:

bcdedit /set {current} safeboot minimal

Then you can go into the BIOS and change the setting to normal AHCI mode. Windows will load in Safe Mode, and detect and install the new storage driver. Reboot to check it works, then disable Safe Mode again from an Admin command prompt:

bcdedit /deletevalue {current} safeboot

Kudos to "LinuxSecurityFreak" for the second answer to this issue on StackExchange.

After this, Windows should boot normally.

Step 3: Shrink Windows

Now you can do a little housekeeping in Windows to make some space. A hibernation file in an OS you don't use is a waste of disk space, and disabling it also disables Windows' "Fast Boot" mode which stops Linux mounting the disk. Again, open an Admin command prompt and type:

powercfg /h off

If the machine has been used for a while, it's a good plan to run a disk check. Open an Admin command prompt again, and type:

chkdsk c: /f

Answer yes with a Y, and then reboot.

We also recommend running Disk Cleanup twice. First time, run it in normal mode, tick all the boxes, and let it do its job. Then run it again, click "Clean up system files" and run it again. Second time typically takes a lot longer, but cleans up more stuff, including hard-to-remove stubborn stains such as Windows Update backups.

The rest is somewhat at your discretion. If you don't expect to ever need Windows much, you can do an extra-thorough job. For instance, use Control Panel to uninstall every optional extra in sight, then PowerShell to remove all the "modern" apps.

Step 4: Remove any surplus partitions

Windows usually tends to come with a "recovery partition", but since you can reinstall using the ISO file from Microsoft, you don't really need it. Just make sure that you know which is your UEFI System Partition (or ESP for short), and your main Windows partition (the C: drive). You need to keep the ESP, and we recommend keeping your C: drive.

Top tip: Make a note on paper of what's where, the order and the sizes, and volume labels, if any. You might not need it, but if you do, it can be a life-saver.

You can use Windows' Disk Management to check and to shrink the C drive. We just press the Windows key and R, type diskmgmt.msc and then hit Return, but whatever way suits you.

If any partitions don't have drive letters, now is a good time to assign letters to them, then quit Disk Management and use Explorer to see what's on them. Go through all your drives, check there's nothing on them, and if there is, move it to your C drive or to a backup disk.

Right-click the main Windows partition and choose "Shrink". The function is very conservative, and often won't shrink the drive much, but if you have a big disk that may not matter.

Or, of course, you can do this in Linux itself. Boot your preferred distro and run the GParted tool that every live medium has pre-installed. Remove all partitions except the C drive and the ESP.

Step 5: Make your Linux partitions

Any distro's installation program will make partitions for you, but we recommend making them in advance using GParted. It's easier and more flexible.

UEFI machines usually have the hard disk partitioned using GPT. BIOS-based systems, even 64-bit ones, usually used MBR, which can only handle a maximum of four primary partitions per drive – but one (and only one) of them could be an extended partition, containing secondary partitions or, as DOS called them, "logical drives". GPT eliminates this: there are no extended or secondary partitions any more, and you can have up to 128 partitions per disk. (Hint: don't.)

The minimal setup for most Linux distros is one big partition. If you want to be able to hibernate under Linux, you will also need a swap partition at least as big as your computer's RAM.

We recommend a separate partition for /home, but that's getting fancy. In the old days, 16GB for the root partition (where the OS lives) was plenty, but now, with bloated Snap and Flatpak packages closing in on all sides, 64GB is more reasonable.

If you make your partitions with GParted, again, make a note of what is going where. We format them as ext4 as a general rule, except any swap partition which has its own option for that role.

If you're using a fancy distro with Btrfs and snapshots, such as openSUSE, Gecko Linux or Spiral Linux, at least quadruple that allowance – but to be honest, in that case you're better off using the distro's own partitioning function.

Step 6: Install and go

Once you have made your destination partition or partitions, and you have a note of which ones they are, run your installation program. When you get to the partitioning screen, pick "something else" or whatever your installer calls the custom-partitioning option.

Pick your ESP and tell the installer to mount it in the right place: that's usually /boot/efi. Pick the root partition and mount it at /. If you made them, pick the home partition and mount it at /home, and choose the swap partition and select "use as swap" or words to that effect.

That should be it. Install, update, enjoy. ®


Over a decade ago, this still-damp hatchling freelance vulture wrote the Reg Guide to Linux, which is still there: parts one, two, and three. You might find it useful, or at least amusing, to read that too, especially if you're using an older machine. Much has changed in the interim, but the guidance on cleaning up Windows cruft still has something to offer.

Other stories you might like

Biting the hand that feeds IT © 1998–2022