How to install CoreOS on bare metal

Hi everybody,

I’m just a home user, coming from Atomic to run some home services in containers like transmission, serviio, nextcloud, nginx, redis, mariadb, …

I’d like to move to CoreOS, for testing purpose for the moment but of course I’d like to go in ‘production’ env as soon as possible …

My biggest concern is about ignition file ! I don’t understand anything !

I just want to install CoreOS on a Raid 1 bare-metal but absolutely don’t know how to do that …

hey @nemric - sorry about the delay here. We just revamped our installer and our documentation. If you grab a newly ISO from https://getfedora.org/en/coreos/download/ and try with the steps from the documentation can you get it to work?

Please allow me to hijack this thread, as I think it’s relevant. I downloaded the latest stable VMware image from the download site and then booted it up to a console. At no time during the boot process did it prompt me for an ignition file. Now I am at the console and I don’t know the username and password. How do I login?

Please start new threads for new topics.

We don’t have good VMware documentation at the moment, unfortunately. On VMware you need to pass an Ignition config via a guestinfo property; there’s no other way to configure the machine. See the old Container Linux documentation for more info.

Updated the Title/Topic to be more accurate. @eightup we’ll try to get some documentation for that soon. If you want feel free to create an issue to track it against this repo: https://github.com/coreos/fedora-coreos-docs/issues

Hi :slight_smile:

I finally get some time to work on my “professional home production grade Coreos media center” :stuck_out_tongue_winking_eye:
I’d like to have full “raid 1” for all partitions on 2 1TB hdd, and of course be able to boot on first or second one in case of disk failure …

I’m writing my FCC file thanks to your documentation, for now it looks like that :

variant: fcos
version: 1.0.0

passwd:
  users:
- name: core
  ssh_authorized_keys:
    - ssh-rsa 

storage:
  disks:
  - device: /dev/disk/by-id/ata-WDC_WD10SPZX-80Z10T2_WD-WX41A49H9FT4
wipe_table: true
partitions:
  - label: boot.1
    number: 1
    size_mib: 256
    start_mib: 0
    type_guid: BC13C2FF-59E6-4262-A352-B275FD6F7172 #type boot
  - label: system.1
    number: 2
    size_mib: 15360 #15 Go
    # type_guid: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 default type_guid (Linux native partition) when omitted, I Omit ! 
  - label: home.1
    number: 0 #will occupy the rest of the available space. Since type_guid is not specified, it will be a Linux native partition.

  - device: /dev/disk/by-id/ata-WDC_WD10SPZX-80Z10T2_WD-WXL1A49KPYFD
wipe_table: true
partitions:
  - label: boot.2
    number: 1
    size_mib: 256
    start_mib: 0
    type_guid: BC13C2FF-59E6-4262-A352-B275FD6F7172 #type boot
  - label: system.2 
    number: 2
    size_mib: 15360
    # type_guid: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 default type_guid (Linux native partition) when omitted, I Omit ! 
  - label: home.2
    number: 0 #will occupy the rest of the available space. Since type_guid is not specified, it will be a Linux native partition.

  raid:  
- name: Boot
  level: raid1
  devices:
  - /dev/disk/by-partlabel/boot.1
  - /dev/disk/by-partlabel/boot.2

- name: System
  level: raid1
  devices:
  - /dev/disk/by-partlabel/system.1
  - /dev/disk/by-partlabel/system.2
  
- name: Home
  level: raid1
  devices:
  - /dev/disk/by-partlabel/home.1
  - /dev/disk/by-partlabel/home.2

  filesystems: 
- path: /boot
  device: /dev/md/Boot
  format: xfs
  label: Boot
  wipe_filesystem: true

- path: /
  device: /dev/md/System
  format: xfs
  label: System
  wipe_filesystem: true

- path: /home
  device: /dev/md/Home
  format: xfs
  label: Home
  wipe_filesystem: true

Now I’d like to limit system size and for example, on my Atomic Host, /var/lib/docker is growing as images are downloaded …

What should be the best way to mount /var/lib/docker (or podman, I don’t know the one I will use today nor if podman use image in the same way) in /home/docker or /home/podman partition

2 questions :

  • Does my FCC file looks good and will that work (I mean RAID1 for /boot /system /home)
  • How to move /var/lib/{container runtime} to /home/{container runtime}

Thanks for reading,
regards.

1 Like

I’m doing a bare metal install on a repurposed windows machine using the iso method in the bare metal documentation (curl the ignition.ign file, run the install command, sudo reboot). After it comes back up it looks like its going well but eventually it hangs on:
random: crng init done
random: 7 urandom warning(s) missed due to ratelimiting

then after sitting there for maybe 5 mins it reboots and does the whole thing over again (I’ve been trying for a few days now and have tried different hard drives and a separate machine with no luck). my ignition file only has the ssh rsa section and I later added a section to format the hard drive in xfs that I copied verbatim from the fedora docs. Not sure where to go from here but I don’t want to give up.

Wasn’t sure where to check for log files with the live cd to try to determine why the install is failing.

Thanks in advance for any ideas

here are my ignition contents:

{
“ignition”: {
“config”: {},
“timeouts”: {},
“version”: “2.2.0”
},
“networkd”: {},
“passwd”: {
“users”: [
{
“name”: “core”,
“sshAuthorizedKeys”: [
“ssh-rsa rsa-key-20200224”
]
}
]
},
“storage”: {
“filesystems”: [{
“mount”: {
“device”: “/dev/disk/by-label/ROOT”,
“format”: “xfs”,
“wipeFilesystem”: true,
“label”: “ROOT”
}
}]
}
}

I can’t speak for the file contents itself but I think that you need to convert your yaml to json for it to work. They have a transpiler tool for converting to json and validating the ignition file.

https://docs.fedoraproject.org/en-US/fedora-coreos/using-fcct/

if you were already aware please disregard

@nemxwasp, the five-minute reboot cycle is an indication that Ignition has failed. The default console is serial (ttyS0) so you’re not seeing Ignition logs on VGA console. If you edit the kernel command line to drop console=ttyS0,115200n8 you should see a failure report.

@nemric, it’s not currently possible to RAID /boot, /boot/efi, or the root filesystem. We have plans to support the latter but no plans to support RAID for /boot or /boot/efi.

You can still RAID the Home filesystem, but you’ll want to set wipe_table: false for the boot disk or you won’t have an OS to boot from afterward. If you want to allow for a root filesystem that’s larger than the default, you can create the home partitions at a specified offset into the disk, and then the root filesystem will be resized up to that offset.

Note that you aren’t currently arranging to mount your Home filesystem anywhere. You can do that by manually specifying a systemd mount unit, or use the with_mount_unit option from the experimental FCCT 1.1.0 spec.

I believe Docker has a configuration option to set its data directory. You should also be able to symlink /var/lib/docker to the target directory or bind-mount it.

When i go into the edit page its already there right after console=ttyS0,(there’s some stuff in there about bare metal and ignition first time boot as well). At least you gave me something to go on. i probably need to rewrite my ignition file in yaml and use the converter instead of writing it myself in json.

thanks!

@nemxwasp Sorry, my phrasing wasn’t clear. You should delete the console=ttyS0,115200n8 argument.

It’s technically possible to write the Ignition config directly in JSON, but we do recommend writing a YAML Fedora CoreOS Config and converting it.

removing that now i see the message “press enter for emergency shell or wait count down timer for reboot” so its definitely the ignition file.

Thanks!

Thanks so much for your help. it took me way too long but i finally figured out fcct (I wasn’t putting < > around my ignition.fcc file and also didn’t have double quotes around my ssh key). I was able the install working just using the bare minimum creation of core user and ssh key. If I’m feeling courageous later on i’ll probably add a 2nd disk and try to setup raid 0 formatted as xfs via ignition.

thanks again

1 Like

Hi

Isn’t it the way to mount “home” filesystem somewhere ?

Sorry for being so candid, but this installation process looks a bit tricky…

Could you suggest me a easy way to have at least /home in RAID1 ?
Is is possible to install FCOS on USB Stick or USB external HDD ?

I’m about to give up … :cry:

Isn’t it the way to mount “home” filesystem somewhere ?

Check out an example of a systemd mount unit at https://github.com/coreos/fedora-coreos-docs/pull/51.

Could you suggest me a easy way to have at least /home in RAID1 ?

Check out the RAID configuration docs here: https://docs.fedoraproject.org/en-US/fedora-coreos/fcct-config/#_raid (scroll down for a full example, though it doesn’t have the systemd mount unit).

Hope this helps!

Thanks for links, I’ve already read this carefully and written the file above, just expand the quote block, I think it’s ok for the raid, except that I want to RAID everything …

Just missing the “systemd mount unit”

I don’t know how to say that … It’s a bit difficult for me to believe I can’t simply have a full RAID1 system on my bare metal home server…

I stay tuned

Hello,
My Atomic host is dead and I don’t know why … I have to investigate deeper in FCOS.

I think that I have to change my philosophy on how to consider a bare metal installation.

Should I consider the OS as non centric as on “old” bare metal philosophy ?
Should I use PXE boot for “diskless” use and use my RAID for swap and /home ?
How to have a kind of statefull OS in that case ?
What about updates ?

Do you think my “new” approach is good ?

Your questions aren’t really clear, but I can try to see if some statements help:

  • FCOS can be installed like Atomic Host was, but it uses a different installer (coreos-installer). In the case of FCOS you’ll use coreos-installer to install to bare metal and provide it an Ignition config to configure the instance on first boot.
  • You can have state/data with FCOS just like you had with Atomic Host
  • FCOS by default (in the non-live case) will update automatically when new releases come out. We recommend all users leave this on but realize some users will turn it off.
  • Unless you are a more advanced user my personal recommendation is to not use diskless PXE.

If you haven’t had a chance to please run through the hands on lab/workshop we developed earlier this year. It should help answer some questions. Also here is a link to the bare metal install docs.

That’s not fully true, I’ve installed Atomic in a full software RAID1 for /boot /root and /home but

I don’t know how to have an installation of FCOS very close to my FAH install …