Re: single quote "'" in bash xterm or lxterminal

2023-12-29 Thread Max Nikulin

On 30/12/2023 09:14, Mike McClain wrote:

Since some of these use a
spinoff of xterm [ -n $DISPLAY ] is a little more generic than
[ $TERM == xterm ], RaspberryPI has chosen lxterminal as their default
which would would fail that test but still runs bash.


I would expect that the reason of failure is

echo $TERM
xterm-256color

so in bash the test should be e.g. [[ "$TERM" == xterm* ]]. The issue 
with $DISPLAY test is that you may start screen or tmux in xterm or 
lxterminal. I am unsure if keys generate the same escape sequences for 
these terminal types.


Conditions in inputrc files are a bit more intelligent in respect to 
terminal types, see readline(3):



Conditional Constructs



term

The  term=  form  may be used to include terminal-specific key bindings,
perhaps to bind the key sequences output by the terminal's function
keys.  The word on the right side of the = is tested against the full
name of the terminal and the portion of the terminal name before the
first -.  This allows sun to match both sun and sun-cmd, for instance.


P.S. I have not managed to reproduce the single quote issue

bind -f /tmp/input-binding
cat /tmp/input-binding
'"\M-[1;5H": backward-kill-line'

bind -p | grep  backward-kill-line
"\C-x\C-?": backward-kill-line

If I strip single quotes then another binding is added successfully.



Re: single quote "'" in bash xterm or lxterminal

2023-12-29 Thread Greg Wooledge
On Fri, Dec 29, 2023 at 08:14:37PM -0600, Mike McClain wrote:
> As it turns out every line in /mc/bin/xterm_bindings that
> was not a comment was problematic.From man readline or info readline
> I saw this: bind '"\C-x\C-r": re-read-init-file' and that is the syntax
> I used in xterm_bindings, as '"\e[1;5H": backward-kill-line'.

Yeah, that's incorrect syntax.  You're dealing with two separate kinds
of things: bind commands issued by a shell, and readline key bindings
read from a file.

When you put a readline key binding into a file like ~/.inputrc or
like your /mc/bin/xterm_bindings file, it looks like this:

"keys": action

But when you do the same thing with bash's bind command, you need to
wrap a *second* layer of quotes around it, like this:

bind '"keys": action'

The outer layer of quotes is removed by the shell, leaving the
readline binding (which includes literal double-quotes) as a single
argument.

You've mixed up the two syntaxes.  That's the source of the problem.

> You wondered what /mc/implied, my name is McClain so /mc is where my
> stuff goes to separate it from system stuff making it easier to move
> my stuff from distribution to distribution.

That's what your home directory is for, though.  It seems odd to keep
personal settings in two separate locations like this.



Re: single quote "'" in bash xterm or lxterminal

2023-12-29 Thread Mike McClain
In response to Greg Wooledge's message of Wed, 27 Dec.
As it turns out every line in /mc/bin/xterm_bindings that
was not a comment was problematic.From man readline or info readline
I saw this: bind '"\C-x\C-r": re-read-init-file' and that is the syntax
I used in xterm_bindings, as '"\e[1;5H": backward-kill-line'.
Looking as you suggested for the problematic line, I deleted each
line until none were left, only then did the "'" problem go away.
When I compared .inputrc to xterm_bindings I then saw the problem.
You wondered what /mc/implied, my name is McClain so /mc is where my
stuff goes to separate it from system stuff making it easier to move
my stuff from distribution to distribution. I started with DosLinux
back around 1997-8 and have used redhat, slakware, solaris, freebsd
and settled on Debian early this century. Since some of these use a
spinoff of xterm [ -n $DISPLAY ] is a little more generic than
[ $TERM == xterm ], RaspberryPI has chosen lxterminal as their default
which would would fail that test but still runs bash.
In spite of having used linux for years I'm still a 'luser'
compared to you and often fumble as this case demonstrates.
I do appreciate your input, bothe here and on the bash list.
Thanks for the help and I wish you a happy new year.
Mike
--
Happiness is not so much in having but in sharing.



Re: Possibly broken Grub or initrd after updates on Testing

2023-12-29 Thread Richard Rosner
As far as I can tell, /boot and /boot/grub are the same filesystem. After all, 
I didn't really do anything custom. Just your default LUKS installation with 
the boot efi stuff on sda1/sdb1/whatever, LUKS on 2 and LUKS encrypted swap on 
3.

I did make a video. Nothing that's not showing up always. For a fraction of a 
second it shows something about slot 0 open, that's it.

> On Dec 29, 2023, at 20:37, Richard Rosner  wrote:
> 
> As far as I can tell, /boot and /boot/grub are the same filesystem. After 
> all, I didn't really do anything custom. Just your default LUKS installation 
> with the boot efi stuff on sda1/sdb1/whatever, LUKS on 2 and LUKS encrypted 
> swap on 3.
> 
> I did make a video. Nothing that's not showing up always. For a fraction of a 
> second it shows something about slot 0 open, that's it.
> 
>> On Dec 29, 2023, at 20:13, Michael Kjörling <2695bd53d...@ewoof.net> wrote:
>> 
>> On 29 Dec 2023 18:56 +0100, from rich...@rosner-online.de (Richard Rosner):
>>> Hey, I have quite the strange issue. After updating a bunch of
>>> packages today [1], mostly related to systemd, gstreamer and udev,
>>> and restarting my device, it no longer boots. I have an encrypted
>>> system. So I do get asked for my decryption password as usual, but a
>>> few seconds later, instead of continuing to the Grub boot menu, my
>>> device simply reboots to the BIOS menu.
>> 
>> Sounds to me very much like GRUB is having trouble finding or reading
>> critical files under /boot/grub, and gives up for that reason. But it
>> _should_ stop, not reboot, if that's the case.
>> 
>>> From what you describe, it sounds like you use a LUKS-encrypted /boot.
>> Is that correct? Also, please confirm that the contents of /boot/grub
>> are located on the same file system as the contents of /boot (that is,
>> that /boot/grub is not on its own file system).
>> 
>> You probably already know this, but the GRUB LUKS passphrase prompt is
>> very early stage.
>> 
>> Have you tried making a video recording of the screen from when you
>> press Enter at the passphrase prompt, to when it reboots, and then go
>> through that carefully (frame by frame)? Maybe GRUB _does_ print
>> something indicating what the actual problem is, but it reboots so
>> quickly after that that you don't have time to see it. A video might
>> capture that fraction-of-a-second display (even if only partially) and
>> help point you in the right direction.
>> 
>> --
>> Michael Kjörling  https://michael.kjorling.se
>> “Remember when, on the Internet, nobody cared that you were a dog?”
>> 



Re: wegvallen / uitvallen van IPv6

2023-12-29 Thread Geert Stappers
On Fri, Dec 29, 2023 at 10:02:39PM +0100, Richard Lucassen wrote:
> On Fri, 29 Dec 2023 10:57:54 +0100 Geert Stappers wrote:
> 
> > > Misschien dat je router advertisements op 546/udp niet accepteert?
> > > 
> > > iptables -A INPUT -s fe80::/10 -p udp --dport 546 -j ACCEPT
> > > 
> > > Ik roep maar wat hoor.
> > 
> > Die aanvulling zou aanleiding moeten zijn
> > om het bericht (met kletskoek) niet te versturen.
> 
> Lees het eens anders:
> 
> dat je router advertisements op 546/udp niet accepteert?
> 
> "je" is het onderwerp, "je router" is dat niet. 't  Is wat onduidelijk
> inderdaad. Wellicht was diet beter geweest:
> 
> dat je router-advertisements op 546/udp niet accepteert?

"I stand corrected"  Nu met toelichting lukt het me om

} dat de laptop geen router-advertisements op 546/udp accepteert?

te lezen. [2]
 

> Als je Linuxdoos achter een router die SLAAC doet die pakketten
> weggooit krijg je dit soort problemen.
> 
> > } dat je router advertisements op 546/udp niet accepteert?
> > 
> > Routers versturen router advertisements
> > en als routers router advertisements accepteren
> > dan is dat van andere routers.
> > 
> > Momenteel weten we niet hoeveel devices router advertisements
> > doen op het netwerk waar IPv6 soms wegvalt.
> >  
> > } iptables -A INPUT -s fe80::/10 -p udp --dport 546 -j ACCEPT
> > 
> > [1]
> 
> > [1] Wat een dwaalspoor, lijkt wel sabotage
> 
> Nou nou Geert, gewoon niet handig opgeschreven mijnerzijds.
> 

Belangrijkste reden voor "dwaalspoor klasseficatie" was
dat de "klacht" is dat het _soms wel, soms niet_ is.
Voor mij is dat een aanwijzing om buiten de laptop te zoeken.
Een reden om eerst de laptop te laten voor wat het is.

Verder is mijn inschatting dat het `ip6tables`, i.p.v. `iptables`,
moet zijn.



Groeten
Geert Stappers

[2] Elkaar via e-mail begrijpen, blijft een uitdaging.
-- 
Silence is hard to parse



Re: Change suspend type from kde menu

2023-12-29 Thread Valerio Vanni

Il 29/12/2023 02:53, Max Nikulin ha scritto:


systemd-sleep(8) does not mention /etc/systemd/system-sleep/

I am a bit puzzled by the following:
https://www.freedesktop.org/software/systemd/man/latest/systemd-sleep.html

Note that scripts or binaries dropped in /usr/lib/systemd/system-sleep/
are intended for local use only and should be considered hacks. If
applications want to react to system suspend/hibernation and resume,
they should rather use the Inhibitor interface.
https://www.freedesktop.org/wiki/Software/systemd/inhibit/


From my point of view dealing with D-Bus just to unload a kernel module 
is inconvenient. It is not an application that is started before suspend 
and should be running after resume. I am curious what is the recommended 
way for this particular use case.


It seems to me something that should be done from an application.
For example, in my case kaffeine could: stop dvb stream, unload module, 
and inverse actions after resume.


But it wouldn't help: it would work only if kaffeine is open.

This kernel module is unable to be suspended and resumed regardless of 
applications.




Re: wegvallen / uitvallen van IPv6

2023-12-29 Thread Richard Lucassen
On Fri, 29 Dec 2023 10:57:54 +0100
Geert Stappers  wrote:

> > Misschien dat je router advertisements op 546/udp niet accepteert?
> > 
> > iptables -A INPUT -s fe80::/10 -p udp --dport 546 -j ACCEPT
> > 
> > Ik roep maar wat hoor.
> 
> Die aanvulling zou aanleiding moeten zijn
> om het bericht (met kletskoek) niet te versturen.

Lees het eens anders:

dat je router advertisements op 546/udp niet accepteert?

"je" is het onderwerp, "je router" is dat niet. 't  Is wat onduidelijk
inderdaad. Wellicht was diet beter geweest:

dat je router-advertisements op 546/udp niet accepteert?

Als je Linuxdoos achter een router die SLAAC doet die pakketten
weggooit krijg je dit soort problemen.

> } dat je router advertisements op 546/udp niet accepteert?
> 
> Routers versturen router advertisements
> en als routers router advertisements accepteren
> dan is dat van andere routers.
> 
> Momenteel weten we niet hoeveel devices router advertisements
> doen op het netwerk waar IPv6 soms wegvalt.
>  
> } iptables -A INPUT -s fe80::/10 -p udp --dport 546 -j ACCEPT
> 
> [1]

> [1] Wat een dwaalspoor, lijkt wel sabotage

Nou nou Geert, gewoon niet handig opgeschreven mijnerzijds.

-- 
richard lucassen
http://contact.xaq.nl/



Re: md0 + UUIDs for member disks

2023-12-29 Thread Andy Smith
Hello,

On Fri, Dec 29, 2023 at 06:17:07PM +0100, Felix Natter wrote:
> Andy Smith  writes:
> > But to be absolutely sure you may wish to totally ignore md0 and
> > its member devices during install as all their data and the
> > metadata on their member devices will still be there after
> > install. You should just be able to see the assembled array in
> > /proc/mdstat, and then mount the filesystem from /etc/fstab.
> > Totally ignoring these devices during install avoids you making
> > a mistake where you alter one of them.
> 
> So /dev/md0 will be automatically assembled when I boot the system
> (cat /proc/mdstat), and I can mount it using UUID?

Yes, if the filesystem on /dev/md0 had a UUID before, it will still
have one when the devices are plugged in to another system (or the
same system after a reinstall).

> I couldn't do this on another system, where the software raid(1) is for
> the root filesystem, though. But as I understood you, in the case of the
> root fs, the above mentioned problem does not occur?

What problem do you refer to?

The only thing that does sometimes happen when moving MD arrays
around is that the name of the md device might need to be changed.

For example, if you have a set of drives that have an md0 on them
and want to move them to a system that already has an md0. The new
system won't assemble that as md0 since it already has an md0 that
has a different UUID. Worse, if you don't do anything and boot such
a system with all the drives installed, it may be arbitrary as to
WHICH ONE gets called md0! It will depend upon which one mdadm
starts assembling first. The other one will be renamed, often to
something weird like md127.

To solve that problem one would list the pairs of array names and
array UUIDs in /etc/mdadm/mdadm.conf. If the root filesystem is on
an md array then the initramfs also has to be updated, to get a copy
of mdadm.conf into that.

But that is a bit of an advanced concern that you probably do not
have. Normally /etc/mdadm/mdadm.conf is basically empty.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Possibly broken Grub or initrd after updates on Testing

2023-12-29 Thread Michael Kjörling
On 29 Dec 2023 18:56 +0100, from rich...@rosner-online.de (Richard Rosner):
> Hey, I have quite the strange issue. After updating a bunch of
> packages today [1], mostly related to systemd, gstreamer and udev,
> and restarting my device, it no longer boots. I have an encrypted
> system. So I do get asked for my decryption password as usual, but a
> few seconds later, instead of continuing to the Grub boot menu, my
> device simply reboots to the BIOS menu.

Sounds to me very much like GRUB is having trouble finding or reading
critical files under /boot/grub, and gives up for that reason. But it
_should_ stop, not reboot, if that's the case.

>From what you describe, it sounds like you use a LUKS-encrypted /boot.
Is that correct? Also, please confirm that the contents of /boot/grub
are located on the same file system as the contents of /boot (that is,
that /boot/grub is not on its own file system).

You probably already know this, but the GRUB LUKS passphrase prompt is
very early stage.

Have you tried making a video recording of the screen from when you
press Enter at the passphrase prompt, to when it reboots, and then go
through that carefully (frame by frame)? Maybe GRUB _does_ print
something indicating what the actual problem is, but it reboots so
quickly after that that you don't have time to see it. A video might
capture that fraction-of-a-second display (even if only partially) and
help point you in the right direction.

-- 
Michael Kjörling  https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Possibly broken Grub or initrd after updates on Testing

2023-12-29 Thread Richard Rosner
Hey, I have quite the strange issue. After updating a bunch of packages today 
[1], mostly related to systemd, gstreamer and udev, and restarting my device, 
it no longer boots. I have an encrypted system. So I do get asked for my 
decryption password as usual, but a few seconds later, instead of continuing to 
the Grub boot menu, my device simply reboots to the BIOS menu.

It's not the first time I ran into such an issue. I did once after manually 
updating initrd because Grub wouldn't offer to boot the 6.5.0-4 kernel because 
of malformed grub.cfg. The solution was kinda simple. Boot into a life system, 
mount the encrypted system according to [2], find out the guide was either 
outdated or not suitable for updating initrd, find a fix, recreate initrd again 
and done.

Sadly, this time that solution won't help. Also I can't find any way to get a 
log of which troubles Grub runs into that it can't continue the boot process. I 
tried getting Grub to write logs to the system by modifying 
GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub by removing quite and splash 
and adding loglevel=7 (and update-grub), but nothing is written, probably 
because for some reason Grub can't really decrypt the system.

So, how do I even find out what's wrong? I'm not familiar with the Grub cmd, I 
have no idea how to get it to tell me what's wrong to even start finding a 
solution. Anybody knows more?

[1]:
Start-Date: 2023-12-28 19:40:04

Upgrade: udev:amd64 (254.5-1, 255.2-2), acl:amd64 (2.3.1-3+b1, 2.3.1-4), 
wpasupplicant:amd64 (2:2.10-20, 2:2.10-21), libacl1:amd64 (2.1.1-3-61, 
2.3.1-4), libarmadillo12:amd64 (1:12.6.4+dfsg-1, 1:12.6.7±dfsg-1), 
libpam-systemd:amd64 (254.5-1, 255.2-2), libp11-kit0:amd64 (0.25.3-2, 
0.25.3-4), libp11-kit0:i386 (0.25.3-2.6.25.3-4), libsonic0:amd64 (0.2.0-12, 
0.2.0-13), libinput10:amd64 (1.23.0-2, 1.23.0-2.1), libsystemd0:amd64 (254.5-1, 
255.2-2), libsystend0:i386 (254.5-1. 255.2-2), pandoc-data:amd64 (3.0.1-3, 
3.0.1-4), libudev-dev:amd64 (254.5-1, 255.2-2), systemd:amd64 (254.5-1, 
255.2-2), libudev1:amd64 (254.5-1, 255.2-2), libudev1:i386 (254.5-1, 255-2-2), 
p11-kit-modules:amd64 (0.25.3-2, 0.25.3-4), python3-wxgtk4.0:amd64 
(4.2.1+dfsg-2, 4.2.1-dfsg-3), gstreamer1.0-gtk3:amd64 (1.22.7-1, 1.22.8-3), 
gstreamer1.0-plugins-good:amd64 (1.22,7-1, 1-22-83-3),  
gstreamer1.0-plugins-good:i386 (1.22.7-1, 1.22.8-3), libcap-ng0:amd64 (0.8.3-3, 
0.8.4-1), mdamd:amd64 (4.2+20231026-1, 4.2+20231121-1), libinput-tools:amd64 
(1.23.0-2, 1.23.0-2.1), libsystemd-shared:amd64 (254.5-1, 255.2-2), 
libattr1:amd64 (1:2.5.1-4+b1, 1:2.5.1-5), cpio:amd64 (2.13+dfsg-7.1, 
2.14+dfsg-1), gstreamer1.0-pulseaudio:amd64 (1:22.7-1, 1.22.8-3), 
libsystemd-dev:amd64 (254.5-1, 255.2-2), p11-kit:amd64 (0.25.3-2, 0.25.3-4), 
libinput-bin:amd64 (1.23.0-2, 1.23.0-2.1)

End-Date: 2023-12-28 19:45:40



[2]: https://wiki.debian.org/GrubEFIReinstall 

Re: Connexion réseau impossible pour certains logiciels

2023-12-29 Thread Michel Verdier
Le 29 décembre 2023 benoit a écrit :

> Mais je ne comprend pas pourquoi, dès que je mets un fichier 
> $HOME/.xsession x11 ne se lance pas.
>
> Genre :
> cd && touch .xsession
> startx

Si ton .xsession ne startx lance X qui lance Xsession qui lance ton
.xsession qui doit lancer le window manager. Car s'il existe les autres
xsession système ne sont pas lancés. Donc s'il est vide tu n'obtiens
rien, c'est normal.



Re: md0 + UUIDs for member disks

2023-12-29 Thread Felix Natter
hi Steve,

thanks for the quick reply!

Steve McIntyre  writes:
> fnat...@gmx.net wrote:
>>
>>I have /dev/md0 mounted at /storage which consists of two HDDs.
>>
>>Now I would like to add an SSD drive for better performance of
>>VMs. Usually, before doing this, I make sure that all of my disks are
>>mounted using UUID and not device names. I do not think this is
>>the case for the two member HDDs of md0 (cat /proc/mdstat).
>>Is there an easy way to fix this?
>>
>>If I need to reinstall, can I keep the two member HDDs with all the
>>data, i.e. does the Debian12 installer recognize the member HDDs
>>and will allow me to configure /dev/md0?
>
> The reason behing using UUIDs is that individual disks don't have
> persistent names attached: /dev/sda might be /dev/sdb next time, etc.
>
> MD RAID devices *do* include persistent metadata so that the system
> can recognise them reliably. You should be fine as you are.

Thanks for the help, this was what I needed.

Cheers and Best Regards,
Felix
-- 
Felix Natter




Re: md0 + UUIDs for member disks

2023-12-29 Thread Felix Natter
Andy Smith  writes:

> Hi Felix,

hello Andy,

thank you for the quick reply!

> On Fri, Dec 29, 2023 at 04:46:10PM +0100, Felix Natter wrote:
>> I have /dev/md0 mounted at /storage which consists of two HDDs.
>> 
>> Now I would like to add an SSD drive for better performance of
>> VMs. Usually, before doing this, I make sure that all of my disks are
>> mounted using UUID and not device names. I do not think this is
>> the case for the two member HDDs of md0 (cat /proc/mdstat).
>> Is there an easy way to fix this?
>
> What are you trying to fix? Filesystems have a UUID. MD RAID devices
> have a UID. And MD RAID member devices also have UUIDs, but they are
> all different *kinds* of UUID. Only filesystems have a filesystem
> UUID that you use in /etc/fstab and other places. You mount things
> by filesystem UUID. You don't mount MD RAID member devices; mdadm
> assembles them.
>
> RAID assembly normally happens automatically by udev finding block
> devices that have the same array id as the one that mdadm is trying
> to incrementally assemble, until all their member devices are found.
>
> So what is it that you are actually wanting to do? If you just want
> to mount whatever filesystem is on md0 by *filesystem* UUID, you do
> that in the normal way as it has nothing to do with MD: you use
> blkid or tune2fs or whatever to read the fs label and put that in
> /etc/fstab.

I was just worried that devices (i.e. /dev/sdx) will change when adding
another drive. I understand that Debian's SW-RAID assembly does not
refer to disks via device names :)

>> If I need to reinstall, can I keep the two member HDDs with all the
>> data, i.e. does the Debian12 installer recognize the member HDDs
>> and will allow me to configure /dev/md0?
>
> Yes. When you come to the partitioning and software RAID section of
> the installer your existing md0 should already be there.

That's very good!

> But to be
> absolutely sure you may wish to totally ignore md0 and its member
> devices during install as all their data and the metadata on their
> member devices will still be there after install. You should just
> be able to see the assembled array in /proc/mdstat, and then mount
> the filesystem from /etc/fstab. Totally ignoring these devices
> during install avoids you making a mistake where you alter one of
> them.

So /dev/md0 will be automatically assembled when I boot the system
(cat /proc/mdstat), and I can mount it using UUID?

I couldn't do this on another system, where the software raid(1) is for
the root filesystem, though. But as I understood you, in the case of the
root fs, the above mentioned problem does not occur?

Many Thanks and Best Regards,
Felix
-- 
Felix Natter




Re: md0 + UUIDs for member disks

2023-12-29 Thread Steve McIntyre
fnat...@gmx.net wrote:
>
>I have /dev/md0 mounted at /storage which consists of two HDDs.
>
>Now I would like to add an SSD drive for better performance of
>VMs. Usually, before doing this, I make sure that all of my disks are
>mounted using UUID and not device names. I do not think this is
>the case for the two member HDDs of md0 (cat /proc/mdstat).
>Is there an easy way to fix this?
>
>If I need to reinstall, can I keep the two member HDDs with all the
>data, i.e. does the Debian12 installer recognize the member HDDs
>and will allow me to configure /dev/md0?

The reason behing using UUIDs is that individual disks don't have
persistent names attached: /dev/sda might be /dev/sdb next time, etc.

MD RAID devices *do* include persistent metadata so that the system
can recognise them reliably. You should be fine as you are.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
Can't keep my eyes from the circling sky,
Tongue-tied & twisted, Just an earth-bound misfit, I...



Re: md0 + UUIDs for member disks

2023-12-29 Thread Andy Smith
Hi Felix,

On Fri, Dec 29, 2023 at 04:46:10PM +0100, Felix Natter wrote:
> I have /dev/md0 mounted at /storage which consists of two HDDs.
> 
> Now I would like to add an SSD drive for better performance of
> VMs. Usually, before doing this, I make sure that all of my disks are
> mounted using UUID and not device names. I do not think this is
> the case for the two member HDDs of md0 (cat /proc/mdstat).
> Is there an easy way to fix this?

What are you trying to fix? Filesystems have a UUID. MD RAID devices
have a UID. And MD RAID member devices also have UUIDs, but they are
all different *kinds* of UUID. Only filesystems have a filesystem
UUID that you use in /etc/fstab and other places. You mount things
by filesystem UUID. You don't mount MD RAID member devices; mdadm
assembles them.

RAID assembly normally happens automatically by udev finding block
devices that have the same array id as the one that mdadm is trying
to incrementally assemble, until all their member devices are found.

So what is it that you are actually wanting to do? If you just want
to mount whatever filesystem is on md0 by *filesystem* UUID, you do
that in the normal way as it has nothing to do with MD: you use
blkid or tune2fs or whatever to read the fs label and put that in
/etc/fstab.

> If I need to reinstall, can I keep the two member HDDs with all the
> data, i.e. does the Debian12 installer recognize the member HDDs
> and will allow me to configure /dev/md0?

Yes. When you come to the partitioning and software RAID section of
the installer your existing md0 should already be there. But to be
absolutely sure you may wish to totally ignore md0 and its member
devices during install as all their data and the metadata on their
member devices will still be there after install. You should just
be able to see the assembled array in /proc/mdstat, and then mount
the filesystem from /etc/fstab. Totally ignoring these devices
during install avoids you making a mistake where you alter one of
them.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



md0 + UUIDs for member disks

2023-12-29 Thread Felix Natter
hello Debian experts,

I have /dev/md0 mounted at /storage which consists of two HDDs.

Now I would like to add an SSD drive for better performance of
VMs. Usually, before doing this, I make sure that all of my disks are
mounted using UUID and not device names. I do not think this is
the case for the two member HDDs of md0 (cat /proc/mdstat).
Is there an easy way to fix this?

If I need to reinstall, can I keep the two member HDDs with all the
data, i.e. does the Debian12 installer recognize the member HDDs
and will allow me to configure /dev/md0?

Many Thanks and Best Regards,
Felix
-- 
Felix Natter




Re: Cuelgues aleatorios

2023-12-29 Thread Camaleón
El 2023-12-29 a las 12:12 +0100, Luis Muñoz Fuente escribió:

> Hola a todos/as:
> Retomo el hilo. En la última contestación a Camaleón, os comenté que
> había comprobado que no se colgaba el sistema gráfico, si no el kernel.
> 
> Creo que algún proceso usa el 100 % de la CPU y por eso se cuelga. Y
> creo que está relacionado con Firefox. En él tengo desactivada la
> aceleración de hardware y WebGL, pero se sigue colgando. En el último
> cuelgue no me da ningún error, los últimos mensajes indican:
> 
> dic 26 15:03:13 torre rtkit-daemon[834]: Supervising 9 threads of 6
> processes of 1 users.
> 
> 
> ¿alguna idea?

Si piensas que Firefox es el culpable, crea un perfil nuevo y trabaja 
con él a diario, para ver si el fallo persiste.

Si mantienes una configuración heredada de Firefox de años (es decir, 
lo has ido actualizando y haciendo cambios en la configuración de 
parámetros, activando y desactivando opciones, etc...) quizá alguna 
opción antigua te esté dando guerra y pone la CPU a tope.

Ya sé que es pesado trabajar con un navegador «limpio» y con los 
ajustes prdeterminados, pero si no experimentas cuelgues con un perfil 
nuevo en varios días (desconozco la cadencia en que se queda colgado el 
equipo, si te pasa a menudo, o lo puedes forzar cargando alguna página 
en concreto) pues ya sabes por dónde seguir.

Saludos,

-- 
Camaleón 



Re: difference in seconds between two formatted dates ...

2023-12-29 Thread Albretch Mueller
 at the end of the day I had my cake and ate it, too:

site="www.debian.com"
site="www.google.fr"
###
dt=$(date +%Y%m%d%H%M%S.%N);
whois > "${site}_${dt}_whois.log" 2>&1
sudo strace --output "${site}_${dt}_strace_ping.log" ping "${site}" -c
4 > "${site}_${dt}_ping.log" 2>&1
ls -l "${site}_${dt}"*".log"; wc -l "${site}_${dt}"*".log"

 Once again, thank you Greg,
 lbrtchx



Re: Connexion réseau impossible pour certains logiciels

2023-12-29 Thread Basile Starynkevitch



On 12/29/23 13:44, yamo' wrote:

Salut,
benoit a tapoté le 21/12/2023 13:30:


J’ai réinstallé mon système et les logiciels tels que evolution,
libreoffice, firefox-esr, ne parviennent pas à se connecter à internet.


Peut-être est-ce lié à AppArmor ou SELinux?

Tu peux jeter un oeil à :

# aa-status






Une autre solution est de tester la connectivité en ligne de commande, 
par exemple par ping ftp.lip6.fr






--
Basile Starynkevitch
 
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/



Re: Connexion réseau impossible pour certains logiciels

2023-12-29 Thread yamo'
Salut,
benoit a tapoté le 21/12/2023 13:30:

> J’ai réinstallé mon système et les logiciels tels que evolution,
> libreoffice, firefox-esr, ne parviennent pas à se connecter à internet.
> 

Peut-être est-ce lié à AppArmor ou SELinux?

Tu peux jeter un oeil à :

# aa-status




-- 
Stéphane



Re: find question

2023-12-29 Thread Greg Wooledge
On Fri, Dec 29, 2023 at 10:56:52PM +1300, Richard Hector wrote:
> find $dir -mtime +7 -delete

"$dir" should be quoted.

> Will that fail to delete higher directories, because the deletion of files
> updated the mtime?
> 
> Or does it get all the mtimes first, and use those?

It doesn't delete directories recursively.

unicorn:~$ mkdir -p /tmp/foo/bar
unicorn:~$ touch /tmp/foo/bar/file
unicorn:~$ find /tmp/foo -name bar -delete
find: cannot delete ‘/tmp/foo/bar’: Directory not empty

But I suppose you're asking "What if it deletes both the file and the
directory, because they both qualify?"

In that case, you should use the -depth option, so that it deletes
the deepest items first.

unicorn:~$ find /tmp/foo -depth -delete
unicorn:~$ ls /tmp/foo
ls: cannot access '/tmp/foo': No such file or directory

Without -depth, it would try to delete the directory first, and that
would fail because the directory's not empty.

-depth must appear AFTER the pathnames, but BEFORE any other arguments
such as -mtime or -name.

> And how precise are those times? If I'm running a cron job that deletes
> 7-day-old directories then creates a new one less than a second later, will
> that reliably get the stuff that's just turned 7 days old?

The POSIX documentation describes it pretty well:

   -mtime n  The primary shall evaluate as true if the  file  modification
 time  subtracted  from  the  initialization  time, divided by
 86400 (with any remainder discarded), is n.

To qualify for -mtime +7, a file's age as calculated above must be at
least 8 days.  (+7 means more than 7.  It does not mean 7 or more.)

It's not uncommon for the POSIX documentation of a command to be superior
to the GNU documentation of that same command, especially a GNU man page.
GNU info pages are often better, but GNU man pages tend to be lacking.



Re: Cuelgues aleatorios

2023-12-29 Thread Luis Muñoz Fuente


Hola a todos/as:
Retomo el hilo. En la última contestación a Camaleón, os comenté que
había comprobado que no se colgaba el sistema gráfico, si no el kernel.

Creo que algún proceso usa el 100 % de la CPU y por eso se cuelga. Y
creo que está relacionado con Firefox. En él tengo desactivada la
aceleración de hardware y WebGL, pero se sigue colgando. En el último
cuelgue no me da ningún error, los últimos mensajes indican:

dic 26 15:03:13 torre rtkit-daemon[834]: Supervising 9 threads of 6
processes of 1 users.


¿alguna idea?


Gracias y saludos



Re: Re : Re: Connexion réseau impossible pour certains logiciels

2023-12-29 Thread Basile Starynkevitch



On 12/29/23 10:29, benoit wrote:

Le mardi 26 décembre 2023 à 10:21, Michel Verdier  a écrit :



Le 25 décembre 2023 benoit a écrit :


Et dans .xinitrc, au lieu de :

exec /usr/bin/openbox-session

J’ai :

. /etc/X11/Xsession


C'est ce qu'il y a dans le xinitrc par défaut /etc/X11/xinit/xinitrc
Donc tu peux enlever ton .xinitrc
Si tu as des trucs à faire met-les dans .xsession qui sera exécuté par
/etc/X11/Xsession en plus des autres fichiers de configuration dans
/etc/X11/Xsession.d

Merci pour l'info
En effet le fichier /etc/X11/Xsession contient
USERXSESSION=$HOME/.xsession

Mais je ne comprend pas pourquoi, dès que je mets un fichier
$HOME/.xsession x11 ne se lance pas.


Genre :
cd && touch .xsession
startx



Je suggère d'indiquer explicitement les chemins, donc un $HOME/.xsession 
exécutable (par chmod a+rx ~/.xsession) contenant


#!/bin/sh

cd $HOME

/usr/bin/startx /usrc/bin/icewm

et d'installer  bien sûr les paquets xinit et icewm et leurs dépendances 
indirectes (par exemple par aptitude install)



Ca démarre pas...

Je ne vois rien qui me semble anormal dans
.xsession-errors

--
Benoît


--
Basile Starynkevitch
 
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/



Re: wegvallen / uitvallen van IPv6

2023-12-29 Thread Geert Stappers
In-Reply-To: <20231229095050.0e15d075ea49ed6c81714...@lucassen.org>
On Fri, Dec 29, 2023 at 09:50:50AM +0100, Richard Lucassen wrote:
> On Fri, 29 Dec 2023 09:09:04 +0100 Gijs Hillenius wrote:
> 
> > Ik zal avahi uitzetten, en zien wat dat doet.
> > 
> > Echter, ik vermoed dat ik (hier) op een dood spoor rijd. Wat ik
> > eigenlijk wil oplossen is het geregeld wegvallen / uitvallen van IPv6.
> > Het eerste wat ik zag in logs is die avahi melding..
> 
> Misschien dat je router advertisements op 546/udp niet accepteert?
> 
> iptables -A INPUT -s fe80::/10 -p udp --dport 546 -j ACCEPT
> 
> Ik roep maar wat hoor.

Die aanvulling zou aanleiding moeten zijn
om het bericht (met kletskoek) niet te versturen.


} dat je router advertisements op 546/udp niet accepteert?

Routers versturen router advertisements
en als routers router advertisements accepteren
dan is dat van andere routers.

Momenteel weten we niet hoeveel devices router advertisements
doen op het netwerk waar IPv6 soms wegvalt.

 
} iptables -A INPUT -s fe80::/10 -p udp --dport 546 -j ACCEPT

[1]



Meting uit te voeren bij "werkt" en "weggevallen" van  IPv6 connectie:

   ip -6 route show

kortere schrijfwijze, geeft zelfde output:

   ip -6 r


Van de werkende situatie noteren (na het zoeken) wat de router is.
In de kapot situatie beginnen met verschillen zoeken t.o.v. "werkt".


Ander  debug advies:  `sudo apt install radvdump`
En dan kijken wat er aan IPv6 router advertisements voorbij komt.
Dat zal best veel zijn, daarom de tip:

  sudo radvdump | grep -e from -e received


Uit het oorspronkelijke bericht:
|On Thu, Dec 28, 2023 at 01:49:42PM +0100, Gijs Hillenius wrote:
|> in /etc/resolv.conf
|> 
|>   nameserver fe80::b25b:99ff:fea9:a10%wlp0s20f3
|> 

Die fe80::b25b:99ff:fea9:a10,  wat is bekend van dat device?


Groeten
Geert Stappers

[1] Wat een dwaalspoor, lijkt wel sabotage
-- 
Silence is hard to parse



find question

2023-12-29 Thread Richard Hector

Hi all,

When using:

find $dir -mtime +7 -delete

Will that fail to delete higher directories, because the deletion of 
files updated the mtime?


Or does it get all the mtimes first, and use those?

And how precise are those times? If I'm running a cron job that deletes 
7-day-old directories then creates a new one less than a second later, 
will that reliably get the stuff that's just turned 7 days old? Or will 
there be a race condition depending on how quickly cron starts the 
script, which could be different each time?


Is there a better way to do this?

Cheers,
Richard



Re : Re: Connexion réseau impossible pour certains logiciels

2023-12-29 Thread benoit
Le mardi 26 décembre 2023 à 10:21, Michel Verdier  a écrit :


> Le 25 décembre 2023 benoit a écrit :
> 
> > Et dans .xinitrc, au lieu de :
> > 
> > exec /usr/bin/openbox-session
> > 
> > J’ai :
> > 
> > . /etc/X11/Xsession
> 
> 
> C'est ce qu'il y a dans le xinitrc par défaut /etc/X11/xinit/xinitrc
> Donc tu peux enlever ton .xinitrc
> Si tu as des trucs à faire met-les dans .xsession qui sera exécuté par
> /etc/X11/Xsession en plus des autres fichiers de configuration dans
> /etc/X11/Xsession.d

Merci pour l'info
En effet le fichier /etc/X11/Xsession contient 
USERXSESSION=$HOME/.xsession

Mais je ne comprend pas pourquoi, dès que je mets un fichier 
$HOME/.xsession x11 ne se lance pas.


Genre :
cd && touch .xsession
startx

Ca démarre pas...

Je ne vois rien qui me semble anormal dans
.xsession-errors

--
Benoît



Re: [HS] Lilo (et Grub)

2023-12-29 Thread Eric DEGENETAIS
bonjour,
Le ven. 29 déc. 2023 à 09:34, Pierre Malard
 a écrit :
>
> Le 28 déc. 2023 à 14:38, ajh-valmer  a écrit :
> >
> > Ok, j'attends avec impatience :
> > "le mécanisme d'amorçage compatible avec le mode legacy BIOS".
> > Merci d’avance.
>
> Bonjour,
>
> Personnellement toutes mes VM tournent sous formatage GPT et sans UEFI mais
> cela ne fait pas de différences. Effectivement il suffit d’une petite
> partition au début d’environ 1 Mo non formatée mais avec le flag
> « bios-grub ».
>
Coiffé au poteau :
Périphérique Début   Fin  Secteurs Taille Type
/dev/sdb1 2048  4095  2048 1M Amorçage BIOS

Problème : à partir d'un disque déjà paritionné ça suppose de décaler
le début de l'actuelle première partition d'1M ...
Faisable avec gparted je pense.
__
Éric Dégenètais
Henix

http://www.henix.com
http://www.squashtest.org



Re: is dit goed ? nameserver met netwerk device eraanvast?

2023-12-29 Thread Richard Lucassen
On Fri, 29 Dec 2023 09:09:04 +0100
Gijs Hillenius  wrote:

> Ik zal avahi uitzetten, en zien wat dat doet.
> 
> Echter, ik vermoed dat ik (hier) op een dood spoor rijd. Wat ik
> eigenlijk wil oplossen is het geregeld wegvallen / uitvallen van IPv6.
> Het eerste wat ik zag in logs is die avahi melding..

Misschien dat je router advertisements op 546/udp niet accepteert?

iptables -A INPUT -s fe80::/10 -p udp --dport 546 -j ACCEPT

Ik roep maar wat hoor.

R.

-- 
richard lucassen
http://contact.xaq.nl/



Re: [HS] Lilo (et Grub)

2023-12-29 Thread Pierre Malard
Le 28 déc. 2023 à 14:38, ajh-valmer  a écrit :
> 
>> Le jeu. 28 déc. 2023 à 12:44, ajh-valmer  a écrit :
>>> J'ai vérifié, le répertoire /boot contient bien tous les fichiers :
>>> System.map-5.10.0-21-amd64
>>> config-5.10.0-21-amd64
>>> initrd.img-5.10.0-21-amd64
>>> vmlinuz-5.10.0-21-amd64
>>> Quid ? Serait-ce le partitionnement 'hd1,gpt1' ?
>>> (pas possible d'écrire dans le mbr ?)
> 
>> Effectivement, GPT ne permet pas le mécanisme de boot classique. Je ne
>> suis pas au fait des détails techniques, mais il n'y a pas de notion
>> de master boot record.
>> Il existe par contre un mécanisme d'amorçage compatible avec le mode
>> legacy BIOS. Il me semble que ça consiste à réserver (partition
>> spéciale) un espace de l'ordre du Mb pour effectuer les écritures.
>> Malheureusement les détails m'échappent,
>> mais je tâcherai de remettre la main dessus ce soir, où j'aurai accès
>> à mon PC personnel qui amorce de cette façon.
> 
> Ok, j'attends avec impatience :
> "le mécanisme d'amorçage compatible avec le mode legacy BIOS".
> Merci d’avance.

Bonjour,

Personnellement toutes mes VM tournent sous formatage GPT et sans UEFI mais
cela ne fait pas de différences. Effectivement il suffit d’une petite
partition au début d’environ 1 Mo non formatée mais avec le flag
« bios-grub ».

Pour mettre jour le boot, voici ce que je fais alors :
# update-grub
et
# grub-install --modules=part_gpt /dev/sda


Voici un fdisk typique :
# fdisk -l /dev/sda
Disque /dev/sda : 16 GiB, 17179869184 octets, 33554432 secteurs
Modèle de disque : Virtual disk
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : gpt
Identifiant de disque : 8A91A527-7D9C-4196-90D5-324DE2BACF27

Périphérique   Début  Fin Secteurs Taille Type
/dev/sda1   20481843116384 8M Amorçage BIOS
/dev/sda2  18432  5261311  5242880   2,5G Partition d'échange Linux
/dev/sda35261312 33552383 28291072  13,5G Système de fichiers Linux

Si on utilise UEFI il faut juste ajouter une partition VFAT montée sur
le répertoire /boot/efi.

--
Pierre Malard
Responsable architectures système CDS DINAMIS/THEIA Montpellier
IRD - UMR Espace-Dev - UAR CPST - IR Data-Terra
Maison de la Télédétection
500 rue Jean-François Breton
34093 Montpellier Cx 5
France

  « - Il n'y a que trois éléments indispensables à la vie.
Et il n'y a que les scientifiques pour penser que
c'est l'oxygène, l'hydrogène et le carbone...
  - Quoi alors ? L'eau, l'air et le feu ?
  - Non ! Le désir, le désordre et le danger... »
   Manon Briand ; La turbulence des fluides
(film québécois de 2001)
   |\  _,,,---,,_
   /,`.-'`'-.  ;-;;,_
  |,4-  ) )-,_. ,\ (  `'-'
 '---''(_/--'  `-'\_)   πr

perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-.  ;-;;,_:  |,A-  ) )-,_. ,\ 
(  `'"'"'-'"'"': '"'"'-3'"'"'2(_/--'"'"'  `-'"'"'\_): 
24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
- --> Ce message n’engage que son auteur <--



signature.asc
Description: Message signed with OpenPGP


Re: is dit goed ? nameserver met netwerk device eraanvast?

2023-12-29 Thread Gijs Hillenius


[snip alles]

Dank Wilfried en Geert!

Ik zal avahi uitzetten, en zien wat dat doet.

Echter, ik vermoed dat ik (hier) op een dood spoor rijd. Wat ik
eigenlijk wil oplossen is het geregeld wegvallen / uitvallen van IPv6.
Het eerste wat ik zag in logs is die avahi melding..

Grt

Gijs


-- 
Take your dying with some seriousness, however.  Laughing on the way to
your execution is not generally understood by less advanced life forms,
and they'll call you crazy.
-- "Messiah's Handbook: Reminders for the Advanced Soul"