NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Let's go step by step to ensure everything is set up properly:
1. Update Linux Headers

After an Arch update, you typically need to update the kernel headers to match the current kernel version.

sudo pacman -S linux-headers

If you're using a custom kernel, you’ll need to install the corresponding headers, e.g., for linux-lts:

sudo pacman -S linux-lts-headers

2. Use Reflector to Get Best Mirrors

Reflector helps you find the fastest mirrors for your region. Here’s how you can use it:

Install Reflector (if not already installed):

sudo pacman -S reflector

Then, run the following to get the fastest mirrors:

sudo reflector --verbose --latest 10 --sort rate --save /etc/pacman.d/mirrorlist

This command will grab the top 10 fastest mirrors sorted by download speed and save them to /etc/pacman.d/mirrorlist.

After running Reflector, update your system with the new mirror list:

sudo pacman -Syyu

3. Monitor Your USB Wi-Fi Card for Pen Testing

Now, for your USB Wi-Fi card (Realtek 8812AU/8821AU), which you want to use as the monitoring interface.

Check if the Device is Recognized:

From the lsusb output you provided, the device is recognized, so this part is good to go.

Install the Drivers for Your USB Wi-Fi Adapter:

To use your Realtek USB Wi-Fi adapter for monitoring, you’ll need to install the correct drivers.

For 8812AU/8821AU, you can install the driver from AUR:

yay -S rtl8812au-dkms-git

Alternatively, you can use:

sudo pacman -S dkms

Then, follow any extra steps the AUR package asks for.

Enable the Interface for Monitoring Mode: After installing the drivers, you can use tools like airmon-ng or iw to set the interface into monitor mode.
Check if the device is detected:

iw dev

If your USB card shows up as something like wlan1, enable monitor mode with:

sudo ip link set wlan1 down
sudo iw dev wlan1 set type monitor
sudo ip link set wlan1 up

Check with Aircrack and Wireshark: Once the interface is in monitor mode, you should be able to use it with tools like aircrack-ng or Wireshark. Just select the wlan1 (or whatever interface is listed) as your capture interface.

This setup should allow you to keep your internal Wi-Fi adapter for general use and dedicate the USB Wi-Fi card for monitoring in tools like aircrack-ng or wireshark. Let me know if you hit any snags during this process!
You said:
[agent-47@archlinux ~]$ sudo pacman -S linux-headers
[sudo] password for agent-47:
warning: linux-headers-6.13.2.arch1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-headers-6.13.2.arch1-1

Total Installed Size: 138.59 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [################] 100%
(1/1) checking package integrity [################] 100%
(1/1) loading package files [################] 100%
(1/1) checking for file conflicts [################] 100%
(1/1) checking available disk space [################] 100%
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
:: Processing package changes...
(1/1) reinstalling linux-headers [################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Install DKMS modules
==> dkms install --no-depmod rtl8812au/5.13.6.r63.ge8be0fc -k 6.13.2-arch1-1
Error! Bad return status for module build on kernel: 6.13.2-arch1-1 (x86_64)
Consult /var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build/make.log for more information.
==> WARNING: dkms install --no-depmod rtl8812au/5.13.6.r63.ge8be0fc -k 6.13.2-arch1-1' exited 10
[agent-47@archlinux ~]$ D
ChatGPT said:

It seems like there was an issue while building the DKMS module for the Realtek 8812AU driver. The error you're seeing typically happens due to a mismatch between the kernel and the DKMS module source.

Let's go through the troubleshooting steps:
1. Check the make.log for Details:

To get more information about what went wrong, let's check the make.log file:

cat /var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build/make.log

This log will provide specific details about the error that occurred during the build process. It should help identify if it's a missing dependency or a different issue.
2. Rebuild DKMS Module:

If there’s an issue with the DKMS module, you can try rebuilding it manually. Sometimes DKMS modules fail to build properly due to incomplete dependencies or other issues.

Try this:

sudo dkms remove rtl8812au/5.13.6.r63.ge8be0fc --all
sudo dkms add -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms build -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms install -m rtl8812au -v 5.13.6.r63.ge8be0fc

3. Check Kernel Headers:

Sometimes the issue can be due to the kernel headers not being correctly installed or mismatched. You can verify your current kernel version with:

uname -r

Ensure that the headers installed match the current kernel version. If they don't match, reinstall the appropriate headers:

sudo pacman -S linux-headers

If you’re using a custom kernel, ensure that you have the corresponding headers installed.
4. Check Dependencies:

Make sure that your system has all necessary dependencies for building the driver. You can install the basic development tools by running:

sudo pacman -S base-devel

Then, try reinstalling the driver package again.
5. Alternative Driver Installation:

If you continue to experience issues, you can try installing the driver from a different source, such as:

rtl8812au AUR driver:

yay -S rtl8812au-dkms-git

Sometimes, using a different source or version of the driver might resolve the build issues.

Let me know the details in the make.log file, and I can help further!
You said:
agent-47@archlinux ~]$ sudo dkms remove rtl8812au/5.13.6.r63.ge8be0fc --all
sudo dkms add -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms build -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms install -m rtl8812au -v 5.13.6.r63.ge8be0fc
Deleting module rtl8812au-5.13.6.r63.ge8be0fc completely from the DKMS tree.
Creating symlink /var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/source -> /usr/src/rtl8812au-5.13.6.r63.ge8be0fc
Sign command: /usr/lib/modules/6.13.2-arch1-1/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module:
Cleaning build area...
'make' -j2 KVER=6.13.2-arch1-1 KSRC=/lib/modules/6.13.2-arch1-1/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.13.2-arch1-1 (x86_64)
Consult /var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build/make.log for more information.
Sign command: /usr/lib/modules/6.13.2-arch1-1/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module:
Cleaning build area...
'make' -j2 KVER=6.13.2-arch1-1 KSRC=/lib/modules/6.13.2-arch1-1/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.13.2-arch1-1 (x86_64)
Consult /var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build/make.log for more information.
[agent-47@archlinux ~]$
ChatGPT said:

The build error you're encountering suggests there might be a deeper issue with the module compilation. Let's analyze and fix it step-by-step.
1. Check the Build Log

To understand the exact problem, we need to inspect the make.log file that has more detailed information about why the build is failing. Run this:

cat /var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build/make.log

This should give you a more specific error message, which can help us narrow down the problem.
2. Ensure Kernel Modules are Available

Since the error message mentions a failure to build the module for your kernel (6.13.2-arch1-1), it might be a kernel mismatch issue. Let’s ensure everything is up-to-date.

Update Your System Again: Just to be sure, update your system and all relevant dependencies once more:

sudo pacman -Syu

Ensure Kernel Headers are Properly Installed: Verify that your kernel headers match your running kernel. You can double-check with:

uname -r
sudo pacman -S linux-headers

If you're using a custom kernel, make sure you have the headers for that version installed.

3. Install Missing Dependencies

Sometimes, missing build dependencies can cause such issues. Let’s ensure you have all the necessary tools installed.

Install essential build tools:

sudo pacman -S base-devel

You might also need to install the linux-firmware package (if it’s not already installed):

sudo pacman -S linux-firmware

4. Try Manually Building the Module

Let’s attempt to manually build the driver outside of DKMS to bypass the error and see if it can compile.

Clone the Driver Repository:

git clone https://github.com/aircrack-ng/rtl8812au.git
cd rtl8812au

Build the Module:

make
sudo make install

If the build process fails here as well, the log will give us more insight into the specific problem.
5. Alternative Driver Source:

If this still doesn’t work, you might want to try a different driver version from the AUR:

Install via AUR (using yay or paru):

yay -S rtl8812au-dkms-git

This might be a more updated version or use a different patch that could work better for your kernel version.

Let me know what the make.log file says, and we can go from there!
You said:
[agent-47@archlinux ~]$ cat /var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build/make.log
DKMS make.log for rtl8812au-5.13.6.r63.ge8be0fc for kernel 6.13.2-arch1-1 (x86_64)
Sun Feb 9 09:10:55 PM EST 2025
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.13.2-arch1-1/build M=/var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build modules
make[1]: Entering directory '/usr/lib/modules/6.13.2-arch1-1/build'
make[2]: Entering directory '/var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (GCC) 14.2.1 20250207
You are using: gcc (GCC) 13.2.1 20230801
CC [M] core/rtw_cmd.o
CC [M] core/rtw_security.o
gcc: error: unrecognized command-line option ‘-fmin-function-alignment=16’; did you mean ‘-flimit-function-alignment’?
make[4]: *** [/usr/lib/modules/6.13.2-arch1-1/build/scripts/Makefile.build:196: core/rtw_cmd.o] Error 1
make[4]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command-line option ‘-fmin-function-alignment=16’; did you mean ‘-flimit-function-alignment’?
make[4]: *** [/usr/lib/modules/6.13.2-arch1-1/build/scripts/Makefile.build:196: core/rtw_security.o] Error 1
make[3]: *** [/usr/lib/modules/6.13.2-arch1-1/build/Makefile:1989: .] Error 2
make[2]: *** [/usr/lib/modules/6.13.2-arch1-1/build/Makefile:251: __sub-make] Error 2
make[2]: Leaving directory '/var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build'
make[1]: *** [Makefile:251: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.13.2-arch1-1/build'
make: *** [Makefile:2516: modules] Error 2
[agent-47@archlinux ~]$
ChatGPT said:

The error message in the make.log file suggests that there's a mismatch between the GCC version used to build your kernel and the one currently being used to build the module. Specifically, the kernel was compiled with GCC 14.2.1, but you're using GCC 13.2.1. This is causing compatibility issues with the -fmin-function-alignment=16 option.

To fix this issue, you have two main options:
Option 1: Install the Same GCC Version as Your Kernel

To ensure compatibility, you can install GCC 14.2.1, which is the same version used to build your kernel.

Install GCC 14.2.1 from the Arch repositories (it may still be available):

sudo pacman -S gcc

Verify GCC Version:

Ensure you're using the right GCC version:

gcc --version

If the version is not 14.2.1, you can manually install the desired version from the Arch User Repository (AUR) or from a custom repository (if available).

Rebuild the Module after installing the correct GCC version:

sudo dkms build -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms install -m rtl8812au -v 5.13.6.r63.ge8be0fc

Option 2: Force the Module to Compile with the Current GCC Version

If you want to stick with your current GCC version (13.2.1), you can try modifying the Makefile to bypass the alignment issue by removing the -fmin-function-alignment=16 option.

Navigate to the Driver Source Folder:

cd /var/lib/dkms/rtl8812au/5.13.6.r63.ge8be0fc/build

Edit the Makefile:

Open the Makefile in a text editor:

nano Makefile

Search for -fmin-function-alignment=16 and remove it, or replace it with a more compatible option like -flimit-function-alignment.

Rebuild the Module:

After saving the changes, rebuild the driver:

sudo dkms build -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms install -m rtl8812au -v 5.13.6.r63.ge8be0fc

Let me know if this works for you, or if you run into any additional issues!
You said:
[agent-47@archlinux ~]$ sudo pacman -S gcc
resolving dependencies...
looking for conflicting packages...

Packages (2) gcc-libs-14.2.1+r753+g1cd744a6828f-1
gcc-14.2.1+r753+g1cd744a6828f-1

Total Download Size: 86.12 MiB
Total Installed Size: 345.93 MiB
Net Upgrade Size: 17.81 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
gcc-14.2.1+r753+... 51.1 MiB 11.5 MiB/s 00:04 [################] 100%
gcc-libs-14.2.1+... 35.0 MiB 6.74 MiB/s 00:05 [################] 100%
Total (2/2) 86.1 MiB 8.64 MiB/s 00:10 [################] 100%
(2/2) checking keys in keyring [################] 100%
(2/2) checking package integrity [################] 100%
error: gcc-libs: signature from "Frederik Schwan <[email protected]>" is unknown trust
:: File /var/cache/pacman/pkg/gcc-libs-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: gcc: signature from "Frederik Schwan <[email protected]>" is unknown trust
:: File /var/cache/pacman/pkg/gcc-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
[agent-47@archlinux ~]$ gcc --version
gcc (GCC) 13.2.1 20230801
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[agent-47@archlinux ~]$
ChatGPT said:

The issue you’re facing with the PGP signature error is a known issue that can occur with some package repositories in Arch Linux. To fix this, we need to refresh the PGP keys and resolve the trust issue with the package you're trying to install.

Here's how you can solve this:
1. Refresh the PGP Keys

You can update and refresh the keys using the following command:

sudo pacman-key --init
sudo pacman-key --populate archlinux

This will reinitialize the keyring and populate it with the necessary keys, including the one for the gcc packages.
2. Clear the Pacman Cache

Sometimes clearing the package cache helps resolve issues with corrupted packages:

sudo pacman -Scc

This will ask if you want to remove all the cached packages. Press y to proceed.
3. Retry Installing GCC

Once the keys have been refreshed and the cache cleared, try installing the GCC packages again:

sudo pacman -S gcc

This should now install the GCC 14.2.1 version without the signature error.
4. Proceed with the Driver Build

Once you've installed the correct GCC version, you can continue with rebuilding and installing the RTL8812AU driver:

sudo dkms build -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms install -m rtl8812au -v 5.13.6.r63.ge8be0fc

Let me know how this goes, and if you run into any other issues!
You said:
[agent-47@archlinux ~]$ sudo pacman -Scc

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] y
removing unused sync repositories...
[agent-47@archlinux ~]$ sudo pacman -S gcc
resolving dependencies...
looking for conflicting packages...

Packages (2) gcc-libs-14.2.1+r753+g1cd744a6828f-1
gcc-14.2.1+r753+g1cd744a6828f-1

Total Download Size: 86.12 MiB
Total Installed Size: 345.93 MiB
Net Upgrade Size: 17.81 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
gcc-14.2.1+r753+... 51.1 MiB 7.87 MiB/s 00:06 [################] 100%
gcc-libs-14.2.1+... 35.0 MiB 281 KiB/s 02:08 [################] 100%
Total (2/2) 86.1 MiB 655 KiB/s 02:15 [################] 100%
(2/2) checking keys in keyring [################] 100%
(2/2) checking package integrity [################] 100%
error: gcc-libs: signature from "Frederik Schwan <[email protected]>" is unknown trust
:: File /var/cache/pacman/pkg/gcc-libs-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: gcc: signature from "Frederik Schwan <[email protected]>" is unknown trust
:: File /var/cache/pacman/pkg/gcc-14.2.1+r753+g1cd744a6828f-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
[agent-47@archlinux ~]$
ChatGPT said:

It seems like the PGP key error is still present, which typically happens when the system doesn't trust the signature of the package. Let's go through some additional steps to resolve the issue.
Step 1: Manually Import the Key

Since the key is from "Frederik Schwan", we can manually import this key into your system. Try the following:

sudo pacman-key --recv-keys 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1

This will fetch the missing key from the keyserver. Afterward, you should sign the key:

sudo pacman-key --lsign-key 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1

Step 2: Clear the Package Cache Again (Optional)

Now that the key has been added, let's clear the pacman cache once again to make sure we're working with fresh packages:

sudo pacman -Scc

Step 3: Try Installing GCC Again

Now, try installing GCC once again:

sudo pacman -S gcc

Step 4: Proceed with Building the Driver

Once GCC 14.2.1 is successfully installed, continue with the driver build:

sudo dkms build -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms install -m rtl8812au -v 5.13.6.r63.ge8be0fc

Let me know if this works or if you encounter any further issues!
You said:
It seems like the PGP key error is still present, which typically happens when the system doesn't trust the signature of the package. Let's go through some additional steps to resolve the issue.

### Step 1: **Manually Import the Key**
Since the key is from "Frederik Schwan", we can manually import this key into your system. Try the following:

bash
sudo pacman-key --recv-keys 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1



This will fetch the missing key from the keyserver. Afterward, you should sign the key:

bash
sudo pacman-key --lsign-key 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1



### Step 2: **Clear the Package Cache Again (Optional)**
Now that the key has been added, let's clear the pacman cache once again to make sure we're working with fresh packages:

bash
sudo pacman -Scc



### Step 3: **Try Installing GCC Again**
Now, try installing GCC once again:

bash
sudo pacman -S gcc



### Step 4: **Proceed with Building the Driver**
Once GCC 14.2.1 is successfully installed, continue with the driver build:

bash
sudo dkms build -m rtl8812au -v 5.13.6.r63.ge8be0fc
sudo dkms install -m rtl8812au -v 5.13.6.r63.ge8be0fc



Let me know if this works or if you encounter any further issues!
ChatGPT said:

It looks like you’ve pasted my previous steps again. Let’s go through them once more, and I’ll guide you through each one step-by-step in case something went wrong.
Step 1: Manually Import the Missing PGP Key

Let's first ensure the missing key is manually imported:

Import the Key:

Run the following command to fetch the missing PGP key:

sudo pacman-key --recv-keys 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1

This will fetch the key from the keyserver.

Sign the Key:

Once the key is fetched, you need to sign it to trust it:

sudo pacman-key --lsign-key 6A54

You said:
[agent-47@archlinux ~]$ sudo pacman-key --recv-keys 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1
gpg: keyserver receive failed: Server indicated a failure
==> ERROR: Remote key not fetched correctly from keyserver.
[agent-47@archlinux ~]$
ChatGPT said:


You said:
?
ChatGPT said:

It seems there was an issue fetching the key from the keyserver. This is a common problem with keyservers sometimes, and we can try a couple of methods to fix it.
Method 1: Use a Different Keyserver

Let's try using a different keyserver to fetch the key. You can use the following command:

sudo pacman-key --keyserver hkp://pool.sks-keyservers.net --recv-keys 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1

This command points to a different keyserver. If this works, proceed to sign the key:

sudo pacman-key --lsign-key 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1

Method 2: Use Another Keyserver (Alternative)

If the above doesn’t work, you can try this alternative keyserver:

sudo pacman-key --keyserver hkps://keyserver.ubuntu.com --recv-keys 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1

Again, after importing the key, sign it with:

sudo pacman-key --lsign-key 6A54C52C6F63F385B44A4F52F0B01C2FCE5A36F1

Method 3: Bypass Signature Check (Not Recommended)

If you still encounter issues and just need to proceed, you can temporarily bypass the PGP signature verification for the specific package by editing the pacman config file.

Edit the pacman configuration file:

sudo nano /etc/pacman.conf

In the file, look for the line that says SigLevel and change it temporarily to:

SigLevel = Never

Important: This will skip PGP checks for all packages, so use it cautiously.

Save and exit, then try installing GCC again:

sudo pacman -S gcc

Afterward, restore the original configuration by changing SigLevel back to Required DatabaseOptional.

Let me know if any of these solutions work!
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.