Custom ISO build with correct keybord / locale settings

Hi,

I’m really new to the VyOS ecosystem and at first glance, the maintainers seem to do all they can, to make the life as hard as possible for non-paying customers.

Sorry for my already very negatively attitude in this post. I really try to give VyOS a chance in my home lab and later in my company (5000+ employees) to replace OPNsense, because of performance issues.

I read already dozens of forum posts, asked ChatGPT & Co. and all the answers I got so far are invalid or outdated.

Actually, I had initially three requirements my custom ISO should provide. But I was only able to achieve one of those.

  1. Adding qemu-guest-agent
    This was rather easy to achieve with a custom flavor

  2. Having de_CH as the keyboard layout
    The default build systems only includes few hand-picked ones. I guess, people have to pay to get their layout on the list.
    What I tried so far:

    • Adding a [[includes_chroot]] section and providing /etc/default/keyboard. The file exists after installation, but the content is fully ignored and useless
    • set console keymap, but keyboard-configuration is missing. After providing this package, I run into the next dead end
  3. Having the correct locale settings of de_CH instead of en_US

    • Adding a [[includes_chroot]] section and providing /etc/default/locale. The file exists but VyOS has been rewritten the file with the defaults of en_US.
  4. Trying to provide an APT source.list at list for the beginning to have the ability to side-load missing packages, I need

    • Adding a [[includes_chroot]] section and providing /etc/apt/sources.list. The file exists, but VyOS has emptied the file.

Could someone provide my a working method for the issues 2. - 4.? I can’t get rid of the feeling, that the entire ISO build systems isn’t meant to really change your ISO, rather than a legitimation to say we care to our dear community even we don’t do.

Thank you very much!

1 Like
  1. Here is an example on how to add additional keymaps:

Hi @dannyyy,

For the keyboard layout you can open up requests just like Apachez showed.

The /etc/apt/sources.list can of course be filled by hand. Just sudo su - and edit the file vi /etc/apt/source.list and you’re ready to go. BUT, note this is not the way VyOS should be used IMHO. If you are missing packages you can best discuss it here for instance and see if you can get it added or maybe there’s an alternative. Another option would be to use the container system provided by VyOS to run services you are missing.

Greet,

Sander

@Apachez not very sure what you want to say.
Do you mean, I have to patch these two files by hand (or script) in my build process?

Or, I have to open a new feature request all the time I need a new layout? Since we have also several branch offices across the world, this means each time a local IT admin asks for their native layout, I need to forward this request to the VyOS maintainers and wait?

You can contribute the project and create a PR
If you don’t have subscription.
@Apachez provided good examples how to do it with examples of PR’s

2 Likes

I’m happy to contribute. Was not sure whether community contribution in this regard is an option.
Just registered in the developer portal.

Using the linked PR as a source, I have to add only de_CH in the mentioned three code locations, and that’s it? The necessary keymaps will automatically be fetched and installed?

I tried temporarily the de (Germany) layout. There seems to be some inconsistencies to the real layout. Also all the characters which requires the Alt Gr or option modifier, were not available. Especially on German / Swiss keyboards this would be a major thing, because most of the common used characters like \ # ~ [ ] { } are only accessible by the that modifier key.

You can add custom repositories during building of ISO in case the defaults isnt enough:

https://docs.vyos.io/en/latest/contributing/build-vyos.html#customize

And then add additional packages through modifying the local copy of vyos-build/data/architectures/amd64.toml at current · vyos/vyos-build · GitHub or by putting the deb files in the build-root which I think will then be included automagically during compile of ISO.

Personally I would advice against trying to change the locales since the scripting and VyOS are all in english anyway.

You can easily add additional keymaps by the examples I provided if you want to do something custom or file a feature request (task) through https://vyos.dev if you want the default to have additional languages.

And as mentioned Debian is the backend for VyOS so you can technically adjust this after the install is complete but you will then lose any system modification next time you update to a newer VyOS since VyOS uses a squashfs filesystem as based along with overlayfs to handle the diffs compared to the content of the squashfs.