[SOLVED] How to install Clear Linux to separate partition without installing the boot loader?

Can I install Clear Linux to a separate free partition?
Can I not install grub from Clear Linux?
If this can’t be done from the Installer, can I install Clear Linux through chroot to a free partition?

This is what the how-to says,

Clear Linux OS allows installation alongside another OS. Typically, when you boot your system, you can press an F key to view and select a bootable device or partition during the BIOS POST stage. Some BIOSes present the Clear Linux OS partition, and you can select and boot it. However, other BIOSes may only show the primary partition, in which case you will not be able boot Clear Linux OS. Be aware of this possible limitation.

but, it is not clear, what the installer would do.

After reading through the https://docs.01.org/clearlinux/latest/get-started/bare-metal-install-desktop.html, I don’t want the Clear Linux Installer to touch the boot partition at all. Looks pretty menacing. Is there a way to disable that?

It needs unpartitioned space, not “an empty partition”, currently.

Yes, read man swupd and pay attention to the os-install section. Note: you will manually need to setup bootloader and kernel this way.

OK. Thanks. Will do tomorrow. Good night!

Couldn’t fathom how to install Clear Linux to sda7 (for example) through swupd from the live-desktop. What might be the full command in swupd to do that?

I also read the bare-metal-install-server. Can I bypass the ef00 - EFI System and
8200 - Linux swap in that and install only to 8300 - Linux filesystem? Would the clr-installer allow me to do that? In both ways of installing, it appears that installing CLR_Boot is destructive. Why can’t the installer write the EFI boot file alongside the others?

The clr-installer doesn’t see a usb stick, so it can’t be installed to a usb stick. It only sees sda. Won’t allow to be installed without CLR-BOOT and CLR-SWAP.
Can anyone give me any answer, please?

I was having a similar issue with the installer not recognizing an M2 ssd. What eventually worked for me was to completely clear the ssd including the boot table, then make a small (4 gb) fat32 partition with GPT and leave the rest unformatted. The disk had been GPT and most of the disk had been unformatted before, so I have no idea what really changed to allow the installer to see the disk, but might be worth trying.

I am not going to discard already working distros to try another distro. If there’s no installer that can’t install Clear Linux alongside others, including Windows 10, there’s no use installing it. There should be an option not to install any boot loader, at least. Then, we can use Grub that’s already there. Or the installer should add the Clear Linux boot loader folder in the existing boot partition. Many would try the live iso, and never install it. I’ll wait, until Clear Linux finds a better installer to install it to a computer, but try your method on a usb stick, that is, if it works.

I don’t follow the feature development for clr-installer. This is certainly on the feature request list, but as features go, they are implemented on a priority basis and you’d have to follow the https://github.com/clearlinux/clr-installer repo or file an issue there to track it.

The method I proposed (using swupd directly) bypasses the installer entirely and would allow you to do exactly what you are asking for.

Sometimes, I enjoy my weekends and spend it outside. If you do ask questions on a Sunday, you might find that we’re not actually working. I was actually in my chicken coop yesterday, for instance.

1 Like

Can you give me the swupd command?


First, become root and create your partition and format it appropriately (e.g. mkfs.ext4) first.

Second, mount the partition. mount /dev/sdq32 /mnt

Third, run: swupd os-install /mnt --bundles=os-core,os-core-update,kernel-native

You can change the list of bundles, but, this is a good start. You can find the kernel image under /mnt/usr/lib/kernel - you can use this to use the bootloader from another OS, for instance.

1 Like

Thank you! :smile:
Will try this out.

Well, can’t be done from live usb,

Warning: Write failed
Warning: No space left on device
Error: Curl - Error downloading to local file - ‘https://cdn.download.clearlinux.org/update/31230/pack-libglib-from-0.tar
Error: Curl - Check free space for /var/lib/swupd?

Try setting the statedir inside of the target partition:

swupd os-install /mnt --bundles=os-core,os-core-update,kernel-native --statedir=/mnt/var/lib/swupd

Would swupd os-install create that /var/lib/swupd folder, or do I have to create it manually there?

Swupd will create the /var/lib/swupd directory for you. This directory will hold the downloaded content for swupd to perform the os-install.

@chdsl - regarding “I don’t want the Clear Linux Installer to touch the boot partition at all. Looks pretty menacing. Is there a way to disable that?”

Please allow me clarify how the Clear Linux installer works. There are 3 modes:

  1. Safe Installation
  2. Destructive Installation
  3. Advanced Installation

“Safe Installation” works by installing Clear Linux to any free space left (a minimum of 21GB is needed for the Desktop and 4GB for the Server version) on a drive. If the installer does not detect adequate / any free space, this mode will not be available. When installing using this mode, the installer will create 3 partitions (boot, swap, and root). It will install “alongside” an existing OS, but it will NOT touch the boot partition of an existing OS.

“Destructive Installation” wipes the entire drive and installs Clear Linux.

“Advanced Installation” allows you to manually create the 3 min. required partitions (boot, swap, root). You have to label the partitions as follows:

  • boot partition as “CLR_BOOT” (fat32)
  • swap partition as “CLR_SWAP” (linux-swap)
  • root partition as “CLR_ROOT” (ext4, or xfs, etc.)
    The Installer looks for these labels before it will proceed.
    This mode allows you to install Clear Linux alongside an existing OS as well. You can create and assign a new boot partition for Clear Linux OR you can re-label an existing boot partition as “CLR_BOOT” if you want to share a single boot partition for the existing OS and Clear Linux.
    You have total control.

Regarding your question “Can I not install grub from Clear Linux?” - Clear Linux uses systemd-boot. If you already have a GRUB-based Linux distro installed and want to install Clear and have GRUB boot it, it’s possible but it’s not our recommended method for booting Clear Linux. Basically, you’d have to use the “Advanced Installation” mode and share the existing boot partition, create a new swap partition if one doesn’t always exist, and then create the CLR_ROOT partition. Once installation is complete, you’d have to create a boot entry in grub.cfg to point to the Clear Linux root partition.

1 Like

That is what looks menacing, for it is “either our way, or no way.”
I read through the whole installation process. Tried it half way and stopped. CLR_BOOT would overwrite the already existing boot partition, which is not good for us. Consider us as not-that-geeky users. Can the installer be more friendly?

Can you provide an example of this? Perhaps the log file or images?
If you use CLR_BOOT on an existing file system, it will use that file system, but not format it.
What makes you believe that it would be overwritten?