Hi all,

Now that SerpentOS has a "usable" ISO available, I have created a guide on how to install it in a VM. With some knowledge and adaption you should also be able to install SerpentOS on bare metal although it is 100% not ready for production use. This guide is for virt-manager but users have been able to install in VirtualBox, Boxes & QEMU. I'm not sure on any other virtualisation software but I don't see any reason why with the same principles, you wouldn't be able to get it working.

Serpent OS Status: pre-alpha0 (technical preview)

@ermo asked me to put this here:

DISCLAIMER
Serpent OS is currently in heavy development. It is not feature complete, may contain known and unknown bugs and is supplied "as-is".
If it breaks your computer or your existing operating system install, you get to keep both pieces.
No warranty (express or implied) is offered, and we offer no guarantee of support for Serpent OS in its current state.
Serpent OS is currently targeted at developers who don't flinch at being very early adopters of emerging, pre-alpha technology, who are experienced enough with Linux to be able to help themselves, and who might enjoy contributing to Serpent OS.
We also do not take package requests at this early stage, as we're mainly in discovery mode for deciding where to put our development focus next.

Prep

Download the latest iso from click here. It's easiest to sort by most recent date.

Note on installs to bare iron

The only "supported" bare iron install method is to give Serpent OS a dedicated disk with its own:

  • EFI System Partition (ESP, >= 256 MiB) formatted as FAT32 (or FAT16 is your UEFI is old and weird)
  • Extended Boot Partition (XBOOTLDR, 4 GiB) also formatted as FAT32 for now as well
  • System root partition (>20 GiB), formatted as XFS (gives a better experience with moss than f2fs and ext4 both)

Every other combination of filesystems is unsupported.

For bare iron installs, you can follow the guide below from the header In Serpent Live Environment.

Install Serpent OS live ISO to a virt-manager VM

Prepare virt-manager


Open virt-manager, go to Edit, Preferences


New VM and for x86 Firmware select UEFI and then close.

Create Virtual Machine


Then select file, new virtual machine.


Go forward with Local install media


Browse and select the iso you've just downloaded and unselect "Automatically detect from the installation media / source


For the choice of operating system you are installing, I selected "Generic Linux 2020"


Select the amount of Memory and CPU cores you want to allocate to your Serpent VM. Don't select values too high as you need your main PC to still function. 4gb and 2 cores will be fine but the more you can allocate, the better the system will perform.


Similarly for storage, I selected 40gb to allow some space after the install for additional packages and files. This will depend on how much spare storage you have available in your system and how much you're willing to commit to this VM.


Name your VM and select Finish. It should boot up into the live gnome environment for SerpentOS.

Notes on required 3D acceleration

The Cosmic and GNOME editions both expect a working 3D accelerated OpenGL setup.

This is how you configure virt-manager to support 3D accelerated OpenGL. Note: This will likely only work on open source drivers provided by the Mesa 3D library.

In Serpent Live Environment

Open console:
sudo fdisk -l #My example would have "/dev/vda" as a 40gb drive

sudo fdisk /dev/vda

Inside fdisk:

g                 # Create a new GPT partition table
n                 # Add a new partition
1                 # Partition number 1
<Enter>           # Default - start at the beginning of the disk
+256M             # 256 MiB size
t                 # Change partition type
1                 # EFI System partition (ESP)
n                 # Add a new partition
2                 # Partition number 2
<Enter>           # Default - start at the beginning of the available space
+4G               # 4 GiB Size
t                 # Change partition type
2                 # Partition number 2
142               # Linux extended boot partition (XBOOTLDR)
n                 # Add a new partition
3                 # Partition number 3
<Enter>           # Default - start at the beginning of the available space
<Enter>           # Default - end at the end of the disk
w                 # write the changes
sudo mkfs.fat -F32 /dev/vda1
sudo mkfs.fat -F32 /dev/vda2
sudo mkfs.xfs /dev/vda3

sudo fdisk -l /dev/vda        # This will help you confirm that the changes have been made

You should now see

dev/vda1 (256M EFI System)
dev/vda2 (4G Linux extended boot)
dev/vda3 (35G Linux filesystem)

Now you are ready to install SerpentOS

Note: If you are NOT using a US English PC104 keyboard layout, it is important that you set your keyboard layout up in GNOME Settings before opening up the new terminal in which you will be starting the lichen text installer below.

If you do not do this, you will be typing in your passwords with an US English PC104 keyboard layout in the below the instructions.

sudo lichen

  • You will be given the initial option to select your ESP + XBOOTLDR partitions. You should only have the one combination that you just created, so you can select Enter
  • Same thing for installing your main disk. you should only have the 35GB Linux File system so just hit Enter
  • Select your preferred Desktop Environment (GNOME is the default)
  • Select your language of choice
  • Select your timezone # You can type your city and it should come up
  • Enter your new root password twice
  • Enter your preferred username
  • Enter your preferred user password twice
    You will be asked to check and confirm everything is correct and if it is, just type "Y" and it will start installing.

Once it's done, type reboot and the system should reboot into the main Serpent Gnome environment

Useful stuff to do when booting up Serpent OS for the first time

Once you're in Serpent, there's a few things to do:

Add the flathub flatpak repository

To keep the Serpent OS software repository manageable while we refine our tooling and workflows, we have decided that the best approach for us is to rely mainly on flatpak software for user-facing GUI applications for the time being.

Open up console and set up flathub:

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

Then relog (log out and log back into your session).

(optional) Install COSMIC Desktop

If you want to install the COSMIC Desktop Environment:

sudo moss install cosmic-desktop

then reboot your system.

From here on out, you can use moss or flathub (via the Gnome Softare application or the CLI) to install whatever you want.

  • ermo replied to this.

    rav101

    I have edited your post with some caveats to set expectations and added some suggested formatting.

    Thank you for taking the time to write this up.

    I tried to boot from the flash drive twice.. on H20 bios UEFI / Intel Lenovo yoga 900s-12isk ... So what I didn't try to do Efistub It gave two different errors and complained that it did not find the section. I understand that you excluded support from the kernel NTFS, exfat, support? πŸ€”
    EFI stub: Loaded Initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
    EFI stub: Heasured Initrd data into PCR 9

    Another version was been after playing with usb-drive

    EFI stub: Loaded Initrd from LINUX_EFI_INITRD_MEDIA_GUID device path

    Without PCR9
    JUST It's frozen.

    • ermo replied to this.

      As of the pre-alpha0 milestone, the current target for the Serpent OS boot management code is:

      • EFI system partion (ESP) as FAT12/16/32
      • (optional) XBOOTLDR partition as FAT32 (type 142 in fdisk)
      • root partition as ext4

      The lichen installer and the boot management code (blsforme) expects to have an entire disk for itself.

      This is to not have to support dual boot scenarios (yet).

      Note that some older UEFI implementations do not properly support booting from FAT32.

      From literally the first UEFI specification from 2006, section 12.2 "File System Format" states:

      EFI encompasses the use of FAT32 for a system partition, and FAT12 or FAT16 for removable
      media.

      In addition, section 12.2.1.1 "File System Format" states:

      The EFI firmware must support the FAT32, FAT16, and FAT12 variants of the EFI file system.

      Alex2022K I understand that you excluded support from the kernel NTFS, exfat, support? πŸ€”

      Correct. We are deliberately keeping the target lean and mean so we don't drown in requests for supporting esoteric configurations while we're still in heavy development.

      Alex2022K EFI stub: Loaded Initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
      EFI stub: Heasured Initrd data into PCR 9

      Another version was been after playing with usb-drive

      EFI stub: Loaded Initrd from LINUX_EFI_INITRD_MEDIA_GUID device path

      Without PCR9
      JUST It's frozen.

      I have seen the same thing on a couple of my PCs. I ended up having to install Serpent OS in a VM backed by a raw disk image. I then booted the live iso in that VM and formatted the virtual disk ESP and XBOOTLDR partitions as FAT16 (my UEFI couldn't boot from FAT32 partitions πŸ€·β€β™‚οΈ ) and the root partition as ext4.

      Then I shut down the freshly installed VM and used dd to write the raw VM backing disk image to an empty SATA disk, and then started up gparted to extend the root partition to fill the entire disk.

      After that, I could boot my new Serpent OS install just fine.

        ermo stickied the discussion .

        ermo You're getting too ahead ...
        https://app.degoo.com/share/CWlkHbyzKK1XMbMTXDqphg

        https://app.degoo.com/share/9kPcdpIIlsCp8ZdUzD5c7g

        The ISO image is absolutely not suitable for this type of installation from a pendrive. As you accurately mentioned, UEFI only searches for the FAT32 section, usually on a GPT partition. However, most laptops and PCs that are not brand new are unable to search directly through the UEFI boot manager from USB. Unfortunately, not a single installer from a phone could handle the preparation of a USB pendrive with GPT and FAT32. Besides, I don't see the point in diving into the details as to why that is the case. Experience has shown that the Ventoy tool is flexible and works perfectly. Also, deploying an image from a flash drive is much faster, more convenient, and easier, for example, through a function like disk recovery in the GNOME Disk Utility.

        As an example, the VHDx image file is also good, and here’s why: using an alternative *.IMG type or tools like YUMI Multiboot USB Creator can also work. In some cases, it's easy to run a basic kernel, connect to the internet with a PXE board or without it, and continue the installation online by deploying an image to a PC hard drive. In offline mode, an additional method is possible. I think forking Ventoy specifically for a GUI USB and PXE installer mode would make the process more comfortable and create a more portable rescue instrument with CLI, GUI, and web opportunities.

        Also this script might be useful:
        "This script builds single-file bootable EFI modules, which include the kernel, command line strings, initramfs, and microcode": https://github.com/RobertCsordas/arch-efiboot

        "Additionally, we can:Append the quiet vt.global_cursor_default=0 kernel parameters at the time of boot entry creation. Adjust mkinitcpio.conf to use the systemd hook instead of udev, and then run mkinitcpio -P to rebuild the initial ramdisk booted from EFISTUB. In theory, you could add an additional entry for another kernel if you've also got an LTS or Zen kernel installed " (from Reddit comments 😁☺️).

        Or we could totally switch away from the typical installation process concept: https://github.com/sysrich/tik

        • ermo replied to this.

          Not sure what Arch or exfat or any of those things have to do with it. We create a hybrid iso9660 image with eltorito alt boot containing an efi image capable of being mounted by most UEFI implementations.

          If it couldn't find it, you wouldn't be seeing the console output above, as the kernel and initrd are contained inside the efi image along with systemd-boot as EFI\BOOT\BOOTX64.EFI

          What actually appears to be happening is either the image is being written "weird" (not dd) or a lack of hardware support killing DRM early.

            Greetings, I'm new here (though I follow Serpent OS on Mastadon for awhile).

            When trying creating partitions the terminal keeps crashing for me, so I'm bit stuck in trying out Serpent OS. :/

            regards
            Storm

              7 days later

              Storm When trying creating partitions the terminal keeps crashing for me

              This typically happens when OpenGL acceleration on the host is not set up correctly for the guest to be able to use it.

              Alex2022K The ISO image is absolutely not suitable for this type of installation from a pendrive.

              For you. And, sadly, also for me (hence the semi-crazy workaround install I had to do) and a few other people.

              But others have written the .iso to USB pendrive and installed from it just fine it seems.

              It looks like you are out of luck for your particular UEFI implementation. Out of curiousity only, do you know who made the UEFI on your PC? AMI?

                ermo You are right about this. InsydeH20 UEFI from Lenovo. The worsest bios what able to be πŸ˜ΉπŸ™ˆ
                https://app.degoo.com/share/P5s2CATxJm1AyFZ-BmT8ig
                Usually it is guaranteed to cope with the help of Ventoy. But any options , etcher , Ventoy they usually use only got exfat... I have option Deploying an image to the entire flash drive from raw only ...
                https://app.degoo.com/share/eiX8FwNcIyeXCRpO6GAmQw
                Perhaps it makes sense to try experiments with a fat32 flash drive with something like that ?
                https://github.com/sysrich/tik
                Looks like a very handy tool.
                Or maybe SelfInstall ISO something like micrOS use in suse...πŸ€” But it seems to me the easiest way to make a working flash drive for any BIOS is raw snapshot....

                10 days later

                Hi! I tried creating a VM using the guide here and the iso doesn't boot. I tried on PopOS 22.04 and Ubuntu 24.04. The error is:
                BdsDxe: failed to load Boot0003 "UEFI Misc Device" from Pci Root (0x0) /Pci (0x2,0x3
                )/Pci (0x0, 0x0): Not Found
                BdsDxe: loading Boot0002 "EFI Internal Shell" from Fu (7CB8BDC9-F8EB-4F34-AAEA-3E
                E4AF6516A1)/FvFile (7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
                BdsDxe: starting Boot0002 "EFI Internal Shell" from Fu (7CB8BDC9-F8EB-4F34-AAEA-3
                EE4AF6516A1)/FvFile (7C04A583-9E3E-4F1C-AD65-E05268D0B4D1)
                BdsDxe: failed to start Boot0002 "EFI Internal Shell" from Fu (7CB8BDC9-F8EB-4F34
                -AAEA-3EE4AF6516A1)/FvFile (7C04A583-9E3E-4F1C-AD65-E05268D0B4D1): Security Viola
                tion
                BdsDxe: No bootable option or device was found.
                BdsDxe: Press any key to enter the Boot Manager Menu .
                TianoCore

                Any idea? Btw it boots in Virtualbox when I enable the EFI option

                • ermo replied to this.
                  7 days later

                  VasilisManol

                  Make sure you see something similar to <loader readonly="yes" type="pflash">/usr/share/edk2/ovmf/OVMF_CODE.fd</loader> in your virt-manager configuration when in XML mode.

                  The important bit is that you use the OVMF_CODE.fd UEFI firmware file from the edk2 package. Different distributions save this file in different places (and the package name may vary slightly).

                    7 days later

                    Thanks for the hint ermo !
                    For virt-manager PopOS I had to check "Customise configuration before install" and then in Overview->Hypervisor Details->Firmware select OVMF_CODE_4M.fd . The rest of the guide worked as described.
                    Two notes for those trying installing from the COSMIC iso.

                    • The live environment will not boot with the default video adapter. Selecting QXL instead for Virtio solved it.
                    • The sudo environment is missing some binary paths. Using the absolute to the commands in the guide ( like /usr/sbin/fdisk and /usr/bin/lichen ) worked.

                    Cool project, looking forward for stable releases!

                    Write a Reply...