Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic image #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rzr
Copy link

@rzr rzr commented Jan 14, 2021

This image can be used as reference "generic" image
for any architectures supported by debian.

Boot on PC (x86 or x86_64) is supported thanks to grub,
extra tweaking might be needed to boot other architectures
on virtual machines.

For the record, this is inspired from recipes
I wrote for emilia pinball.

Change-Id: I709a456f196df337c3f368f03416defe6aadcb0b
Signed-off-by: Philippe Coval [email protected]

rzr added a commit to CrossStream/debos-recipes that referenced this pull request Jan 24, 2021
This image can be used as reference "generic" image
for any architectures supported by debian.

Boot on PC (x86 or x86_64) is supported thanks to grub,
extra tweaking might be needed to boot other architectures
on virtual machines.

For the record, this is inspired from recipes
I wrote for emilia pinball.

Change-Id: I709a456f196df337c3f368f03416defe6aadcb0b
Forwarded: go-debos#20
Signed-off-by: Philippe Coval <[email protected]>
@rzr rzr force-pushed the sandbox/rzr/review/master branch from af2abc0 to efbc822 Compare January 24, 2021 15:51
@rzr
Copy link
Author

rzr commented Jan 28, 2021

Review welcome

cc: @sjoerdsimons

{{if eq $architecture "i386" "amd64"}}
grub-pc,
{{end}}
{{if eq $suite "buster" "stable"}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you checking the suite? On other suites the kernel name is different?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

linux-image-{{$architecture}}
{{end}}
{{else}}
linux-image-generic

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no such kernel.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a virtual package introduced around 5.10.0 see

apt-cache show linux-image-amd64 | grep generic

Provides: linux-image-generic, linux-latest-modules-5.10.0-3-amd64, virtualbox-guest-modules, wireguard-modules (= 1.0.0)

Precisely with this change:

https://salsa.debian.org/kernel-team/linux/-/commit/59aeb16cb8bf39ed4e9693a9badb3ce6c38b43e3

linux-image-686
{{else}}
linux-image-{{$architecture}}
{{end}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move that to the top and make a kernel variable like in https://github.com/go-debos/debos-recipes/blob/master/rpi64/debimage-rpi64.yaml#L52

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use

{{- $kernel := or .kernel (printf "linux-image-%s" $architecture) -}}
{{if eq $architecture "i386"}}
    {{ $kernel = or .kernel "linux-image-686" }}
{{end}}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

- action: apt
packages: [
{{if eq $architecture "i386" "amd64"}}
grub-pc,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add support for EFI machines

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this one will be enough
#21 (review)

- action: run
chroot: true
description: Set hostname
command: echo "{{$architecture}}" > /etc/hostname

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it's a very bad idea to set hostname to arch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because this would break genericity ? I could use "debian" or just suite name

@mimi89999
Copy link

I opened a PR for a generic EFI image: #21

This image can be used as reference "generic" image
for any architectures supported by debian.

Boot on PC (x86 or x86_64) is supported thanks to grub,
extra tweaking might be needed to boot other architectures
on virtual machines.

For the record, this is inspired from recipes
I wrote for emilia pinball.

Change-Id: I709a456f196df337c3f368f03416defe6aadcb0b
Forwarded: go-debos#20
Signed-off-by: Philippe Coval <[email protected]>
@rzr rzr force-pushed the sandbox/rzr/review/master branch from efbc822 to 0409307 Compare March 1, 2021 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants