Re: [gentoo-user] Portage load control

2023-05-11 Thread Michael Cook

On 5/11/23 23:23, Eldon wrote:

On Thu, May 11, 2023 at 11:07:04PM +0100, Peter Humphrey wrote:

Once again, --load-average is being ignored. Why is it there? Surely, it must
be to mitigate the worst effects of that N*K, but it isn't doing so.


Take all of the following with a grain of salt and YMMV. Any gentoo
pro's please correct my ideas here:

I have also been experimenting along the lines of making emerge nicer
via a few quick strategies, and while it doesn't address your issue
directly, I'll tell you some of the things that have made it more
enjoyable to use a machine while it is building packages:

1) Niceness: I set the following in my make.conf, since I value
responsiveness of the machine over the speed of the build:
```
PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}"
PORTAGE_NICENESS=19
```

2) Load average: I will trade some build time for responsiveness, so I
go ahead and use `taskset 2-100 emerge ...` on linux to prevent emerge
from using the first two cores/threads. I don't have a machine with a hundred
cores, but if I did, it would make a little heat

3) I set --load-average on the command line and in the make opts. No need
to run too wild. I make sure this is less than the number of cores I
allocated with taskset, or I think I may not hit the designated load
average for limiting.

4) ONLY if I have the RAM, mount /var/tmp or /var/tmp/portage as a
tmpfs. If I am merging very large projects (firefox and llvm for
example) concurrently, I may need more than several 10's of GB of RAM
for this. If I don't usually run the machine with substantial swap space
enabled, this might be a good time.

I think with those strategies, it is ok to just run emerge with `-j`
with no arguments. The cores prohibited from participating in emerge
will be available for interactive tasks, and the load average will limit
to some degree the number of processes.
  
If you give this a try, let me know what you think!


Eldon

Don't set PORTAGE_IONICE_COMMAND or PORTAGE_NICENESS. I just set 
PORTAGE_SCHEDULING_POLICY="idle". My MAKEOPTS are "-j12 -l12" and I have 
"--jobs=12" in EMERGE_DEFAULT_OPTS (6c12t CPU). Anything that uses rust 
(cargo seems to not support load so runs into problems, but setting 
scheduling policy should help) or webkit you might want to lower 
MAKEOPTS jobs via env overrides.





Re: [gentoo-user] Apache and systemd problem

2023-05-11 Thread Alexandru N. Barloiu

first of all, gentoo does install with a service file:

[root@noela:~]# equery f apache | grep systemd | grep service
/lib/systemd/system/apache2.service

also, I feel the way apache works is indifferent to distro or os. i 
mean, it makes very little difference as far as apache goes if you have 
openrc or systemd. in the end its just a shell script to apachectl 
start|stop|restart||configtest. Get a grip on logging. On how the system 
logs, and how apache logs. check /etc/conf.d/apache2 which establishes 
the parameters with which apache starts.



|

On 5/10/2023 9:58 PM, Jacques Montier wrote:

Hello all,

To learn a little bit about systemd, I recently installed a gentoo 
with systemd profile.

After some fights, the OS is working, but it was a real mess !!!
Now I am struggling for launching apache2 daemon.
When apache is compiled and installed, no apache2.service appears !
It was the same problem with the mysql database...
I copied the apache2.service from Linux Mint (attached file).
systemctl enable apache2.service works but failed when starting... 
(journalctl attached)


Have you any solution to resolve that issue ?

Thanks in advance.


--
Jacques

Re: [gentoo-user] Portage load control

2023-05-11 Thread Jack

On 5/11/23 18:07, Peter Humphrey wrote:

On Thursday, 11 May 2023 17:18:17 BST Mark Knecht wrote:


I'm sure you get this but I'm pointing toward the EMERGE_DEFAULT_OPTS
portage variable which, according to it's page that "defines entries to be
appended to the emerge command line." I suspect they are appended, but
that doesn't guarantee that they override other entries that you are adding
by hand or have somewhere else. It seems reasonable to me that you
might just use this setting with nothing else and see if you can get it
under control.

I think that's worth a shot. And no, I don't have any other entries.


Note the blue section on the page:

  Note
When MAKEOPTS="-jN" is used with
EMERGE_DEFAULT_OPTS="--jobs K --load-average X.Y" the number
of possible tasks created would be up to N*K. Therefore, both variables
need to be set with each other in mind as they create up to K jobs each
with up to N tasks.

The ''problem' is this can easily hit 100% of the cores you have in the
machine if not sensibly set. (You choose what's 'sensible')

Once again, --load-average is being ignored. Why is it there? Surely, it must
be to mitigate the worst effects of that N*K, but it isn't doing so.


Sorry if I'm repeating myself, but as I see it, there are two different 
--load-average settings to consider.  I'd have to go back to the 
beginning of the thread to confirm you are setting both of them.


The --load-average to emerge itself just tells it not to start a new job 
if the load is above the setting.  If there are several large jobs, but 
all start with single  threaded configuration activity such as 
./configure or cmake, multiple jobs can clearly get started before the 
load average starts climbing.


The --load-average in MAKEOPTS gets passed to make, and controls how 
many processes make starts.  If that is set, and the load is still too 
high, the problem is in make not in emerge.  Also, that setting will 
have no effect if the package uses ninja or something else instead of 
make.  Ninja does have a -l setting for load average, but I don't know 
if emerge passes any MAKEOPTS to ninja. That might be an interesting 
enhancement request.


Jack




Re: [gentoo-user] Portage load control

2023-05-11 Thread Mark Knecht
On Thu, May 11, 2023 at 3:07 PM Peter Humphrey 
wrote:
>
> On Thursday, 11 May 2023 17:18:17 BST Mark Knecht wrote:

> > The ''problem' is this can easily hit 100% of the cores you have in the
> > machine if not sensibly set. (You choose what's 'sensible')
>
> Once again, --load-average is being ignored. Why is it there? Surely, it
must
> be to mitigate the worst effects of that N*K, but it isn't doing so.
>

>From your description, yeah, it's weird, but possibly it's managing it over
(for instance) over much longer time frames or something like that.

Or possibly it just doesn't work.

Or possibly whoever wrote the man page misunderstood.

Poking around a bit this morning I took the path at the bottom of the
link I gave you to the Portage niceness page. It says scheduling policy
control
started with portage-3.0.35 which on paper sounds sort of recent. Possibly
a bug crept in, but I was curious as to what you have for
PORTAGE_SCHEDULING_POLICY, if any, and whether you
need to enable some sort of scheduling to get this under control?

https://wiki.gentoo.org/wiki/Portage_niceness

I find this page a bit troubling as it isn't clear to a dummy like
me what happens if nothing is set. If I still ran Gentoo, or if it
was easier to set up a VM, I'd try it myself but alas it ain't
to be.

Anyway, I feel for ya.

Good luck,
Mark


Re: [gentoo-user] Portage load control

2023-05-11 Thread Peter Humphrey
On Thursday, 11 May 2023 17:18:17 BST Mark Knecht wrote:

> I'm sure you get this but I'm pointing toward the EMERGE_DEFAULT_OPTS
> portage variable which, according to it's page that "defines entries to be
> appended to the emerge command line." I suspect they are appended, but
> that doesn't guarantee that they override other entries that you are adding
> by hand or have somewhere else. It seems reasonable to me that you
> might just use this setting with nothing else and see if you can get it
> under control.

I think that's worth a shot. And no, I don't have any other entries.

> Note the blue section on the page:
> 
>  Note
> When MAKEOPTS="-jN" is used with
> EMERGE_DEFAULT_OPTS="--jobs K --load-average X.Y" the number
> of possible tasks created would be up to N*K. Therefore, both variables
> need to be set with each other in mind as they create up to K jobs each
> with up to N tasks.
> 
> The ''problem' is this can easily hit 100% of the cores you have in the
> machine if not sensibly set. (You choose what's 'sensible')

Once again, --load-average is being ignored. Why is it there? Surely, it must 
be to mitigate the worst effects of that N*K, but it isn't doing so.

-- 
Regards,
Peter.






Re: [gentoo-user] using Wifi in a new machine

2023-05-11 Thread Philip Webb
230511 Michael wrote:
> On Thursday, 11 May 2023 15:01:51 BST Philip Webb wrote:
>> There is another related question : is there a way
>> to make both connections simultaneously & switch between them ?
> If you configure them both in /etc/conf.d/net with different priorities, both 
> will come up and obtain routes and IP addresses.  Use a different metric for 
> each to specify which NIC will take priority in your network stack, e.g.:
> 
> metric_enp2s0=20
> metric_wlp4s0=30
> 
> In the above example the wireless is acting as a fallback when the wired 
> enp2s0 fails.  Using arpwatch or ip-monitor can automate the fallback by 
> monitoring a particular IP address/route, but to manually switch between them 
> I think you'll have to shut down the one you don't want.
> 
> Using iproute's 'metric' option to change priorities will also work.  
> However, 
> I think established connections will continue to use the previous NIC and 
> route.
> 
> There may be more sophisticated ways to achieve what you want, other 
> contributors may have better ideas.

Thanks : I'll save this among my notes.

Any further advice in this area is very welcome.

-- 
,,
SUPPORT ___//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT`-O--O---'   purslowatchassdotutorontodotca




Re: [gentoo-user] using Wifi in a new machine

2023-05-11 Thread Michael
On Thursday, 11 May 2023 15:01:51 BST Philip Webb wrote:
> Thanks for both replies.  5 min  after I sent my request last night,
> I realised that I sb able to access Wifi thro'out installation
> simply via the System Rescue connection, which finds the service easily
> & needs only the password to finish the job.  I do have a landline via DHCP,
> but Wifi here is  6 times  faster & there sb a lot of downloading to do.
> 
> I will add the details to my info files.
> 
> There is another related question : is there a way
> to make both connections simultaneously & switch between them ?

If you configure them both in /etc/conf.d/net with different priorities, both 
will come up and obtain routes and IP addresses.  Use a different metric for 
each to specify which NIC will take priority in your network stack, e.g.:

metric_enp2s0=20
metric_wlp4s0=30

In the above example the wireless is acting as a fallback when the wired 
enp2s0 fails.  Using arpwatch or ip-monitor can automate the fallback by 
monitoring a particular IP address/route, but to manually switch between them 
I think you'll have to shut down the one you don't want.

Using iproute's 'metric' option to change priorities will also work.  However, 
I think established connections will continue to use the previous NIC and 
route.

There may be more sophisticated ways to achieve what you want, other 
contributors may have better ideas.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Apache and systemd problem

2023-05-11 Thread Michael
On Thursday, 11 May 2023 17:17:27 BST Jacques Montier wrote:

> I don't find any "LogLevel info" in /etc/apache2/httpd.conf
> /var/log/apache2/error_log is empty.
> 
> Jacques

Please take a look here to see what the httpd.conf should look like and if 
there is no LogLevel directive add it yourself:

https://wiki.gentoo.org/wiki/Apache#.2Fetc.2Fconf.d.2Fapache2

Unfortunately I do not have access to an apache installation to compare notes, 
but the above Wiki page should help with this.  When troubleshooting similar 
problems in the past I would run apachectl in a terminal and keep an eye in 
the error.log to see what was being printed out.

The fact '/usr/bin/apache2ctl configtest' returns nothing makes me wonder if 
all is well with the file /usr/bin/apache2ctl.  Check:

which /usr/bin/apache2ctl
which /usr/bin/apachectl

to see which command exists in your installation.

After you are able to start it manually, you can edit your systemd service 
file accordingly.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Portage load control

2023-05-11 Thread Mark Knecht
On Thu, May 11, 2023 at 9:03 AM Peter Humphrey 
wrote:
>
> On Thursday, 11 May 2023 15:58:20 BST Mark Knecht wrote:
> > Going further, this page states:
> >
> > "The load average value is the same as displayed by top or uptime, and
for
> > an N-core system, a load average of N.0 would be a 100% load. Another
rule
> > of thumb here is to set X.Y=N*0.9 which will limit the load to 90%, thus
> > maintaining system responsiveness."
>
> That's the first reference I've seen to percentage load. Interesting.
Perhaps
> changes are afoot already.
>
> > So, how many cores does your system have? For a 16 core system, if you
want
> > 40% load, you only want to spawn 16 * 0.4 jobs so you'd set that value
to
> > 6.4
>
> 24 cores, but portage is ignoring my load-average anyway, so I'm
interested to
> see what the bug reports elicits.
>
> --
> Regards,
> Peter.

I'm sure you get this but I'm pointing toward the EMERGE_DEFAULT_OPTS
portage variable which, according to it's page that "defines entries to be
appended to the emerge command line." I suspect they are appended, but
that doesn't guarantee that they override other entries that you are adding
by hand or have somewhere else. It seems reasonable to me that you
might just use this setting with nothing else and see if you can get it
under
control.

Note the blue section on the page:

 Note
When MAKEOPTS="-jN" is used with
EMERGE_DEFAULT_OPTS="--jobs K --load-average X.Y" the number
of possible tasks created would be up to N*K. Therefore, both variables
need to be set with each other in mind as they create up to K jobs each
with up to N tasks.

The ''problem' is this can easily hit 100% of the cores you have in the
machine if not sensibly set. (You choose what's 'sensible')

HTH,
Mark


Re: [gentoo-user] Apache and systemd problem

2023-05-11 Thread Jacques Montier
>
> > - /var/log/apache2 and /etc/apache2/httpd.conf are in the right place
>
> Check ownership of files in /var/log/apache2/
>
> Apache will need to be able to write to them.
>
> Apache ownership of apache:apache


Inside apache2, root:root and the files are empty.

I changed the ownership of the files into apache2 to apache:apache
 No change. apache2 still fails.


> > - /usr/bin/apache2ctl configtest returns nothing
>
> Hmm ... it should return Status OK, or 0.
>
>  I get absolutely nothing.

>
> > - when trying to start apache2.service, i get this :
> > apache2.service: start operation timed out. Terminating.
>
> It is missing something, can't connect to the IP/port it needs, or there's
> a
> file missing.  What is the output of:
>
> 'systemctl -l status apache2'
>
>
apache2.service - The Apache HTTP Server
 Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled;
preset: disabled)
 Active: failed (Result: timeout) since Thu 2023-05-11 17:46:29 CEST;
5min ago
   Docs: https://httpd.apache.org/docs/2.4/
Process: 1967 ExecStart=/usr/sbin/apache2ctl start (code=killed,
signal=TERM)
CPU: 22ms

mai 11 17:41:29 bureau systemd[1]: Starting apache2.service...
mai 11 17:46:29 bureau systemd[1]: apache2.service: start operation timed
out. Terminating.
mai 11 17:46:29 bureau systemd[1]: apache2.service: Killing process 1970
(systemctl) with signal SIGKILL.
mai 11 17:46:29 bureau systemd[1]: apache2.service: Failed with result
'timeout'.
mai 11 17:46:29 bureau systemd[1]: Failed to start apache2.service.



Also set "LogLevel info" (or debug) in its config file and restart it to
> see
> what the apache error log reveals.
>

I don't find any "LogLevel info" in /etc/apache2/httpd.conf
/var/log/apache2/error_log is empty.

Jacques


Re: [gentoo-user] Portage load control

2023-05-11 Thread Peter Humphrey
On Thursday, 11 May 2023 15:58:20 BST Mark Knecht wrote:
> Going further, this page states:
> 
> "The load average value is the same as displayed by top or uptime, and for
> an N-core system, a load average of N.0 would be a 100% load. Another rule
> of thumb here is to set X.Y=N*0.9 which will limit the load to 90%, thus
> maintaining system responsiveness."

That's the first reference I've seen to percentage load. Interesting. Perhaps 
changes are afoot already.

> So, how many cores does your system have? For a 16 core system, if you want
> 40% load, you only want to spawn 16 * 0.4 jobs so you'd set that value to
> 6.4

24 cores, but portage is ignoring my load-average anyway, so I'm interested to 
see what the bug reports elicits. 

-- 
Regards,
Peter.






Re: [gentoo-user] Portage load control

2023-05-11 Thread Peter Humphrey
On Thursday, 11 May 2023 14:45:26 BST Mark Knecht wrote:

> OK, this is a bit of a weird thing for me to ask you to try but this page
> on emerge:
> 
> https://wiki.gentoo.org/wiki/EMERGE_DEFAULT_OPTS
> 
> says pretty clearly that "--load-average X.Y" should be a floating point
> number so try it with "--load-average 40.0", and further with and without
> the --jobs option.
> 
> Note 2 things - this page doesn't say to use an "=" AND it was last edited
> on my birthday. It wasn't a good year for me. Possibly it wasn't a good year
> for this man page... ;-)

Yet more confusion, with man page and wiki article contradicting each other.  
:(

I'll try your suggestions - thanks!

-- 
Regards,
Peter.






Re: [gentoo-user] Portage load control

2023-05-11 Thread Mark Knecht
Going further, this page states:

"The load average value is the same as displayed by top or uptime, and for
an N-core system, a load average of N.0 would be a 100% load. Another rule
of thumb here is to set X.Y=N*0.9 which will limit the load to 90%, thus
maintaining system responsiveness."

So, how many cores does your system have? For a 16 core system, if you want
40% load, you only want to spawn 16 * 0.4 jobs so you'd set that value to
6.4

On Thu, May 11, 2023 at 6:45 AM Mark Knecht  wrote:
>
>
>
> On Thu, May 11, 2023 at 6:34 AM Peter Humphrey 
wrote:
> >
> > On Monday, 8 May 2023 11:20:45 BST Neil Bothwick wrote:
> >
> > > Maybe you should take this to bgo where it can be flagged for the
portage
> > > devs to look at, just keep us posted on the outcome.
> >
> > So far, I've just been asked whether I expected something different, to
which I
> > replied "Why is --load-average=40 being ignored?"
> >
> > Perhaps we don't all understand the same things about how this is
supposed to
> > work.
> >
> > --
> > Regards,
> > Peter.
> >
>
> OK, this is a bit of a weird thing for me to ask you to try but this page
on emerge:
>
> https://wiki.gentoo.org/wiki/EMERGE_DEFAULT_OPTS
>
> says pretty clearly that "--load-average X.Y" should be a floating point
number so
> try it with "--load-average 40.0", and further with and without the
--jobs option.
>
> Note 2 things - this page doesn't say to use an "=" AND it was last edited
> on my birthday. It wasn't a good year for me. Possibly it wasn't a good
year
> for this man page... ;-)

>


Re: [gentoo-user] Apache and systemd problem

2023-05-11 Thread Michael
On Thursday, 11 May 2023 15:07:09 BST Jacques Montier wrote:
> Thank you Michael for your response.
> 
> - no error during compilation and installation

OK

> - /var/log/apache2 and /etc/apache2/httpd.conf are in the right place

Check ownership of files in /var/log/apache2/ 

Apache will need to be able to write to them.


> - by default in httpd.conf:
> User apache
> Group apache
> - User and group for /var/www  -> apache:apache

OK

> - /usr/bin/apache2ctl configtest returns nothing

Hmm ... it should return Status OK, or 0.


> - when trying to start apache2.service, i get this :
> apache2.service: start operation timed out. Terminating.

It is missing something, can't connect to the IP/port it needs, or there's a 
file missing.  What is the output of:

'systemctl -l status apache2'

Also set "LogLevel info" (or debug) in its config file and restart it to see 
what the apache error log reveals.


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Apache and systemd problem

2023-05-11 Thread Jacques Montier
Thank you Michael for your response.

- no error during compilation and installation
- /var/log/apache2 and /etc/apache2/httpd.conf are in the right place
- by default in httpd.conf:
User apache
Group apache
- User and group for /var/www  -> apache:apache
- /usr/bin/apache2ctl configtest returns nothing
- when trying to start apache2.service, i get this :
apache2.service: start operation timed out. Terminating.

Cheers,

--
Jacques


Le jeu. 11 mai 2023 à 11:42, Michael  a écrit :

> On Wednesday, 10 May 2023 19:58:50 BST Jacques Montier wrote:
> > Hello all,
> >
> > To learn a little bit about systemd, I recently installed  a gentoo with
> > systemd profile.
> > After some fights, the OS is working, but it was a real mess !!!
> > Now I am struggling for launching apache2 daemon.
> > When apache is compiled and installed, no apache2.service appears !
> > It was the same problem with the mysql database...
> > I copied the apache2.service from Linux Mint (attached file).
>
> Have you also check the necessary apache directories in /etc and /var/log/
> were installed as they should and something did not go wrong with the
> installation of the package?
>
>
> > systemctl enable apache2.service works but failed when starting...
> > (journalctl attached)
> >
> > Have you any solution to resolve that issue ?
> >
> > Thanks in advance.
> >
> >
> > --
> > Jacques
>
> I wonder if some configuration files are missing, or the IP address/port
> apache is configured to bind to is already taken by another process.
>
> Try 'systemctl -l status apache2' and also check your '/var/logs/apache2/
> error.log'.
>
> Also run '/usr/sbin/apache2ctl configtest' and check it returns "Syntax
> OK",
> otherwise follow any configuration errors it reports.


Re: [gentoo-user] using Wifi in a new machine

2023-05-11 Thread Philip Webb
Thanks for both replies.  5 min  after I sent my request last night,
I realised that I sb able to access Wifi thro'out installation
simply via the System Rescue connection, which finds the service easily
& needs only the password to finish the job.  I do have a landline via DHCP,
but Wifi here is  6 times  faster & there sb a lot of downloading to do.

I will add the details to my info files.

There is another related question : is there a way
to make both connections simultaneously & switch between them ?

-- 
,,
SUPPORT ___//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT`-O--O---'   purslowatchassdotutorontodotca




Re: [gentoo-user] Portage load control

2023-05-11 Thread Mark Knecht
On Thu, May 11, 2023 at 6:34 AM Peter Humphrey 
wrote:
>
> On Monday, 8 May 2023 11:20:45 BST Neil Bothwick wrote:
>
> > Maybe you should take this to bgo where it can be flagged for the
portage
> > devs to look at, just keep us posted on the outcome.
>
> So far, I've just been asked whether I expected something different, to
which I
> replied "Why is --load-average=40 being ignored?"
>
> Perhaps we don't all understand the same things about how this is
supposed to
> work.
>
> --
> Regards,
> Peter.
>

OK, this is a bit of a weird thing for me to ask you to try but this page
on emerge:

https://wiki.gentoo.org/wiki/EMERGE_DEFAULT_OPTS

says pretty clearly that "--load-average X.Y" should be a floating point
number so
try it with "--load-average 40.0", and further with and without the --jobs
option.

Note 2 things - this page doesn't say to use an "=" AND it was last edited
on my birthday. It wasn't a good year for me. Possibly it wasn't a good year
for this man page... ;-)


Re: [gentoo-user] Portage load control

2023-05-11 Thread Peter Humphrey
On Monday, 8 May 2023 11:20:45 BST Neil Bothwick wrote:

> Maybe you should take this to bgo where it can be flagged for the portage
> devs to look at, just keep us posted on the outcome.

So far, I've just been asked whether I expected something different, to which I 
replied "Why is --load-average=40 being ignored?"

Perhaps we don't all understand the same things about how this is supposed to 
work.

-- 
Regards,
Peter.






Re: [gentoo-user] Apache and systemd problem

2023-05-11 Thread Michael
On Wednesday, 10 May 2023 19:58:50 BST Jacques Montier wrote:
> Hello all,
> 
> To learn a little bit about systemd, I recently installed  a gentoo with
> systemd profile.
> After some fights, the OS is working, but it was a real mess !!!
> Now I am struggling for launching apache2 daemon.
> When apache is compiled and installed, no apache2.service appears !
> It was the same problem with the mysql database...
> I copied the apache2.service from Linux Mint (attached file).

Have you also check the necessary apache directories in /etc and /var/log/ 
were installed as they should and something did not go wrong with the 
installation of the package?


> systemctl enable apache2.service works but failed when starting...
> (journalctl attached)
> 
> Have you any solution to resolve that issue ?
> 
> Thanks in advance.
> 
> 
> --
> Jacques

I wonder if some configuration files are missing, or the IP address/port 
apache is configured to bind to is already taken by another process.

Try 'systemctl -l status apache2' and also check your '/var/logs/apache2/
error.log'.

Also run '/usr/sbin/apache2ctl configtest' and check it returns "Syntax OK", 
otherwise follow any configuration errors it reports.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] using Wifi in a new machine

2023-05-11 Thread Michael
On Thursday, 11 May 2023 08:22:58 BST Neil Bothwick wrote:
> On Wed, 10 May 2023 21:42:16 -0400, Philip Webb wrote:
> > Can anyone explain how I can get Wifi working at this early point
> > in the installation process ?
> 
> There's an example of using WPA from the command line at
> 
> https://nixos.org/manual/nixos/stable/#sec-installation-manual-networking

It used to be a simple matter of configuring the authentication credentials 
with the AP in /etc/wpa_supplicant/wpa_supplicant.conf and running 'dhcpcd 
wlan0' to obtain an IP address from the router, but things have gotten more 
complicated over the years.

Today you need to follow these stages:

1. Check if the appropriate firmware is available, otherwise fetch it from 
here and untar it in /lib/firmware:

https://www.intel.co.uk/content/www/uk/en/support/articles/05511/
wireless.html

I think you'll need "iwlwifi-cc-46.3cfab8da.0.tgz"?

2. Load the appropriate kernel module for your hardware.

3. Configure /etc/conf.d/net with some appropriate settings; e.g.

modules="wpa_supplicant"
wpa_supplicant_wlan0="-Dnl80211"
mac_wlan0="A1:B2:C3:D4:E5:F6"
config_wlan0="dhcp"

Substitute wlan0 with whatever your wireless NIC is identified as in 'ip link 
show'.

4. Configure /etc/wpa_supplicant/wpa_supplicant.conf with suitable 
authentication credentials for your AP:

network={
ssid="My_AP"
bssid=AA:BB:CC:DD:EE:FF
proto=RSN
key_mgmt=WPA-PSK (for WPA3, try key_mgmt=WPA-PSK-SHA256)
pairwise=CCMP
auth_alg=OPEN
group=CCMP
psk="Very_Secret_Shared_Key"
ieee80211w=2 (1 is for PMF 'enabled', or 2 for 'required')
priority=5
}

5. Then start the wpa_supplicant service:

rc-service -v wpa_supplicant start


This way you won't have reassociate manually with wpa_cli each time and as 
long as you add your wpa_supplicant service to default runlevel it will come 
up when you boot into your system.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] using Wifi in a new machine

2023-05-11 Thread Neil Bothwick
On Wed, 10 May 2023 21:42:16 -0400, Philip Webb wrote:

> Can anyone explain how I can get Wifi working at this early point
> in the installation process ?

There's an example of using WPA from the command line at

https://nixos.org/manual/nixos/stable/#sec-installation-manual-networking

-- 
Neil Bothwick

I'm not anti-social, I'm just not user friendly


pgpArp5i8eYy1.pgp
Description: OpenPGP digital signature