Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Remove wireguard after I built it [SOLVED]

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Remove wireguard after I built it [SOLVED]

#1 Post by Scorpion »

I built wireguard from the source following the official instructions and the stable WireGuard-0.0.20181119 version.
If I use another kernel I have this problem:

Code: Select all

wg-quick up wg0
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"
How can I remove it? I used make and after make install but make uninstall:

Code: Select all

make uninstall
make: *** No rule to make target 'uninstall'.  Stop.
Last edited by Scorpion on 2019-01-07 15:46, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Remove wireguard after I built it

#2 Post by Head_on_a_Stick »

If you have a manifest.txt then try

Code: Select all

cat install_manifest.txt | xargs echo sudo rm | sh
If not then list the install steps with

Code: Select all

make -n install
then reverse them :)

EDIT: http://forums.debian.net/viewtopic.php?t=38976
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Remove wireguard after I built it

#3 Post by Scorpion »

I don't have any manifest.

Code: Select all

make -n install
make -C /lib/modules/4.19.0-13.1-liquorix-amd64/build M=/path/WireGuard-0.0.20181119/src modules_install
mkdir -p /lib/modules/4.19.0-13.1-liquorix-amd64/extra
make -f ./scripts/Makefile.modinst
:
echo '  DEPMOD  4.19.0-13.1-liquorix-amd64'; /bin/bash ./scripts/depmod.sh /sbin/depmod 4.19.0-13.1-liquorix-amd64
depmod -a
make -C tools install
install -v -d "/usr/bin" && install -v -m 0755 wg "/usr/bin/wg"
install -v -d "/usr/share/man/man8" && install -v -m 0644 man/wg.8 "/usr/share/man/man8/wg.8"
[ "yes" = "yes" ] || exit 0; \
install -v -d "/usr/share/bash-completion/completions" && install -v -m 0644 completion/wg.bash-completion "/usr/share/bash-completion/completions/wg"
[ "yes" = "yes" ] || exit 0; \
install -v -m 0755 wg-quick/linux.bash "/usr/bin/wg-quick" && install -v -m 0700 -d "/etc/wireguard"
[ "yes" = "yes" ] || exit 0; \
install -v -m 0644 man/wg-quick.8 "/usr/share/man/man8/wg-quick.8"
[ "yes" = "yes" -a "yes" = "yes" ] || exit 0; \
install -v -m 0644 completion/wg-quick.bash-completion "/usr/share/bash-completion/completions/wg-quick"
[ "yes" = "yes" -a "yes" = "yes" ] || exit 0; \
The 4.19.0-13.1-liquorix-amd64 kernel doesn't work since I built it with another.
Is the link for build a wireguard .deb?
I think that I can install it from unstable. But how can I remove it now?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Remove wireguard after I built it

#4 Post by Head_on_a_Stick »

Scorpion wrote:how can I remove it now?
Look at all the "install" lines in your posted output — they tell you exactly where all of the components have been installed, all you have to do is delete them.
deadbang

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: Remove wireguard after I built it

#5 Post by stevepusser »

Scorpion wrote:I don't have any manifest.

Code: Select all

make -n install
make -C /lib/modules/4.19.0-13.1-liquorix-amd64/build M=/path/WireGuard-0.0.20181119/src modules_install
mkdir -p /lib/modules/4.19.0-13.1-liquorix-amd64/extra
make -f ./scripts/Makefile.modinst
:
echo '  DEPMOD  4.19.0-13.1-liquorix-amd64'; /bin/bash ./scripts/depmod.sh /sbin/depmod 4.19.0-13.1-liquorix-amd64
depmod -a
make -C tools install
install -v -d "/usr/bin" && install -v -m 0755 wg "/usr/bin/wg"
install -v -d "/usr/share/man/man8" && install -v -m 0644 man/wg.8 "/usr/share/man/man8/wg.8"
[ "yes" = "yes" ] || exit 0; \
install -v -d "/usr/share/bash-completion/completions" && install -v -m 0644 completion/wg.bash-completion "/usr/share/bash-completion/completions/wg"
[ "yes" = "yes" ] || exit 0; \
install -v -m 0755 wg-quick/linux.bash "/usr/bin/wg-quick" && install -v -m 0700 -d "/etc/wireguard"
[ "yes" = "yes" ] || exit 0; \
install -v -m 0644 man/wg-quick.8 "/usr/share/man/man8/wg-quick.8"
[ "yes" = "yes" -a "yes" = "yes" ] || exit 0; \
install -v -m 0644 completion/wg-quick.bash-completion "/usr/share/bash-completion/completions/wg-quick"
[ "yes" = "yes" -a "yes" = "yes" ] || exit 0; \
The 4.19.0-13.1-liquorix-amd64 kernel doesn't work since I built it with another.
Is the link for build a wireguard .deb?
I think that I can install it from unstable. But how can I remove it now?
You're going to be much better off backporting a proper Debian package if you're running Stretch, though that is getting trickier now that upstream has started using debhelper 12 and debhelper-compat, though updating debhelper from backports probably will help.

I'll take a look at backporting wireguard, though your problems with different kernels hint that it needs a kernel module rebuilt for every kernel you have installed.
MX Linux packager and developer

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: Remove wireguard after I built it

#6 Post by stevepusser »

Yes, the Debian version includes a dkms package. I suppose a manually-built version would require a reinstall on every kernel in order to build the kernel modules.

It looks like a pretty straightforward backport.
MX Linux packager and developer

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: Remove wireguard after I built it

#7 Post by stevepusser »

I backported it from Sid on a vanilla Stretch pbuilder platform for MX 17,and the dkms package builds on the 4.19 and 4.20 kernel. It's a 1 MiB download: https://drive.google.com/open?id=16VEqI ... ZsNIbp6Hlq and I'll leave it up for a few days at least.
MX Linux packager and developer

xepan
Posts: 89
Joined: 2018-11-28 06:38

Re: Remove wireguard after I built it

#8 Post by xepan »

Head_on_a_Stick wrote:

Code: Select all

cat install_manifest.txt | xargs echo sudo rm | sh
jesus. "read", not cat. xargs -0, best not at all.
http://mywiki.wooledge.org/BashFAQ/001

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Remove wireguard after I built it

#9 Post by Head_on_a_Stick »

xepan wrote:jesus. "read", not cat. xargs -0, best not at all.
Thanks for the advice but that was a pure copy&paste exercise, I didn't bother expending any thought on that at all :D
deadbang

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Remove wireguard after I built it

#10 Post by Scorpion »

stevepusser wrote:I backported it from Sid on a vanilla Stretch pbuilder platform for MX 17,and the dkms package builds on the 4.19 and 4.20 kernel. It's a 1 MiB download: https://drive.google.com/open?id=16VEqI ... ZsNIbp6Hlq and I'll leave it up for a few days at least.
Awesome, but I' m not sure what to do. I' m running Stretch amd64 (with gnome) and backports a galore :D
Should I install the "wireguard_0.0.20181218-1~mx17+1_all.deb"?

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Remove wireguard after I built it [SOLVED]

#11 Post by Scorpion »

I rebuilt it

Code: Select all

cd src
make clean
make 
make install
And now works so you have to do it for every kernel.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: Remove wireguard after I built it [SOLVED]

#12 Post by stevepusser »

You install the "all" packages plus the ones for your architecture from my zip. One neat trick is to install local-apt-repository and put the debs in /srv/local-apt-repository, then they become part of your apt system for good, until you remove them. Then you just "apt install wireguard".

You should not have to rebuild your own version from source for every kernel, unless that also builds the modules. Most of the time, just running "make install" on a new kernel will work. But the dkms package in my builds does that automatically, and is the better choice.
MX Linux packager and developer

Post Reply