-
Notifications
You must be signed in to change notification settings - Fork 72
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
Auto-detect whether the kernel is bzImage or vmlinuz. #144
Conversation
@dlorenc Sorry for delay. |
Thanks, let me know what you think of the approach. Minikube itself won't really know what's in the iso either, so passing this in via a struct parameter would be hard. |
"os/exec" | ||
"strings" | ||
|
||
"github.com/docker/machine/libmachine/mcnutils" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add "github.com/docker/machine/libmachine/mcnutils"
?
https://github.com/docker/machine/blob/master/libmachine/mcnutils/utils.go is not have IsExist()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, I had to make this public to share it and I accidentally put it in the wrong place...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, got it.
As in #140 (comment)
I wanted to say "backward compatibility method" is this approach. And would be able to provide backward compatibility without changing the minikube. Hardcoded "kernel image" filename is a little bit not good. But It is inevitable. |
log.Debugf("Unmounting %s", isoFilename) | ||
if err := hdiutil("detach", volumeRootDir); err != nil { | ||
return err | ||
for _, f := range []string{"vmlinuz64", "bzImage", "initrd", "initrd.img"} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for feature use, I think to add vmlinuz
(generally compressed kernel image name) and vmlinux
(not compressed) is better.
https://en.wikipedia.org/wiki/Vmlinux
Traditionally, UNIX platforms called the kernel image /unix. With the development of virtual memory, kernels that supported this feature were given the vm- prefix to differentiate them. The name vmlinux is a mutation of vmunix, while in vmlinuz the letter z at the end denotes that it is compressed (gzipped).[1]
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand. Should I add vmlinux here as well? Or are you suggesting to use that instead of vmlinuz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry confused.
minikube and boot2docker are used bzImage
and vmlinuz64
.
But generally,
- kenrnel filename:
vmlinuz
orvmlinux
orbzImage
- initrd filename:
initrd
orinitrd.gz
e.g.
http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/hd-media/
So, I think
[]string{"vmlinux", "vmlinuz64", "vmlinuz", "bzImage", "initrd", "initrd.gz", "initrd.img"}
is better for feature use.
Do you get what I want to say...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, makes sense. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks :)
@dlorenc Sorry, conflicting |
LTGM. waiting for CI. |
This changes the extract function to just copy everything it can find, and it moves the detection into the getXhyveArgs function.
What do you think of this approach?
Ref #140