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

git checkout v.4.4.0 error #4

Open
keides2 opened this issue Jan 9, 2020 · 3 comments
Open

git checkout v.4.4.0 error #4

keides2 opened this issue Jan 9, 2020 · 3 comments

Comments

@keides2
Copy link

keides2 commented Jan 9, 2020

I get an error in git checkout.
Would you please tell me what to do?

$ uname -r
4.4.0-17763-Microsoft
$ uname -a
Linux xxxx 4.4.0-17763-Microsoft # 379-Microsoft Wed Mar 06 19:16:00 PST 2019 x86_64 x86_64 x86_64 GNU / Linux
$ sudo git clone https://github.com/microsoft/WSL2-Linux-Kernel.git /usr/src/4.4.0-17763-Microsoft
Cloning into '/usr/src/4.4.0-17763-Microsoft' ...
remote: Enumerating objects: 6302976, done.
remote: Total 6302976 (delta 0), reused 0 (delta 0), pack-reused 6302976
Receiving objects: 100% (6302976/6302976), 1.08 GiB | 2.85 MiB / s, done.
Resolving deltas: 100% (5294448/5294448), done.
Checking out files: 100% (61777/61777), done.
$ cd /usr/src/4.4.0-17763-Microsoft
kei @ xxxx: /usr/src/4.4.0-17763-Microsoft$ls
COPYING Kbuild MAINTAINERS README block drivers include kernel net security usr
CREDITS Kconfig Makefile README-Microsoft.WSL2 certs firmware init lib samples sound virt
Documentation LICENSES Microsoft arch crypto fs ipc mm scripts tools
kei @ xxxx: /usr/src/4.4.0-17763-Microsoft$ sudo git checkout v4.4.0
error: pathspec 'v4.4.0' did not match any file (s) known to git.

Thank you,

@toml12953
Copy link

toml12953 commented Jan 29, 2020

Try this:
git checkout 4.4.0-17763-Microsoft

That worked for me.

@keides2
Copy link
Author

keides2 commented Jan 30, 2020

Thank @toml12953 for your response.

I tried below:

kei@xxxx:/usr/src/4.4.0-17763-Microsoft$ git checkout 4.4.0-17763-Microsoft
fatal: Unable to create '/usr/src/4.4.0-17763-Microsoft/.git/index.lock': Permission denied
kei@xxxx:/usr/src/4.4.0-17763-Microsoft$ sudo git checkout 4.4.0-17763-Microsoft
[sudo] password for kei:
error: pathspec '4.4.0-17763-Microsoft' did not match any file(s) known to git.
kei@xxxx:/usr/src/4.4.0-17763-Microsoft$

Thank you,

cakira added a commit to cakira/usbip-wsl2-instructions that referenced this issue Jun 24, 2021
According to https://unix.stackexchange.com/a/576913/234293, /usr/src isn't a good folder to compile the kernel.

This commit fixes rpasek#4
@cakira
Copy link

cakira commented Jun 24, 2021

@keides2 , a little bit late, but your problem happened because your command missed a sudo.

kei@xxxx:/usr/src/4.4.0-17763-Microsoft$ sudo git checkout 4.4.0-17763-Microsoft

My commit above solves the problem with another approach: compile the kernel under you home dir and you won't need to sudo.

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

No branches or pull requests

3 participants