Re: [EXTERNAL] [gentoo-user] empty cdrom drive is busy or mounted

2019-08-23 Thread james
On 8/23/19 5:21 PM, Neil Bothwick wrote:
> On 22 August 2019 22:08:41 GMT-04:00, Andrew Udvare  wrote:
>>
>>> On 2019-08-22, at 12:31, Laurence Perkins 
>> wrote:
>>>
>>> A common tactic is to use grep twice:
>>> ps auxf | grep -v grep | grep blah
>>
>> Or grep with brackets:
>>
>> ps aux | grep '[f]irefox'
>>
>> I have a function for this:
>>
>> psgrep() {
>>  ps aux | grep "[${1:0:1}]${1:1}";
>> }
>>
>> This works because the ps output will have "grep [f]irefox" and the
>> regex can't match that line (without escaping the [] again).
> 
> Or just use pgrep, I usually use pgrep - fa. 
> 

Ah, that is what I was looking for

thx,
James



Re: [EXTERNAL] [gentoo-user] empty cdrom drive is busy or mounted

2019-08-23 Thread Neil Bothwick
On 22 August 2019 22:08:41 GMT-04:00, Andrew Udvare  wrote:
>
>> On 2019-08-22, at 12:31, Laurence Perkins 
>wrote:
>> 
>> A common tactic is to use grep twice:
>> ps auxf | grep -v grep | grep blah
>
>Or grep with brackets:
>
>ps aux | grep '[f]irefox'
>
>I have a function for this:
>
>psgrep() {
>  ps aux | grep "[${1:0:1}]${1:1}";
>}
>
>This works because the ps output will have "grep [f]irefox" and the
>regex can't match that line (without escaping the [] again).

Or just use pgrep, I usually use pgrep - fa. 
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: [EXTERNAL] [gentoo-user] empty cdrom drive is busy or mounted

2019-08-22 Thread Andrew Udvare


> On 2019-08-22, at 12:31, Laurence Perkins  wrote:
> 
> A common tactic is to use grep twice:
> ps auxf | grep -v grep | grep blah

Or grep with brackets:

ps aux | grep '[f]irefox'

I have a function for this:

psgrep() {
  ps aux | grep "[${1:0:1}]${1:1}";
}

This works because the ps output will have "grep [f]irefox" and the regex can't 
match that line (without escaping the [] again).


-- 
Andrew


Re: [EXTERNAL] Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-22 Thread Jack

On 2019.08.22 12:31, Laurence Perkins wrote:



On Thu, 2019-08-22 at 10:03 +1000, Adam Carter wrote:
> On Thu, Aug 22, 2019 at 5:48 AM james  wrote:
> > On 8/16/19 12:44 PM, Jack wrote:
> > > ps auxf | grep systemd
> >
> > This is new turf for me. Upon issuing this command string I get::
> >
> > # ps auxf | grep systemd
> > root 24947  0.0  0.0  13964   996 pts/6S+   15:43   0:00
> >   |   |   |   \_ grep --colour=auto systemd
> >
>
> This is showing that the only process with systemd in its name is  
the

> grep command itself; you could pass anything to grep and it will be
> found in the process list, eg;
>
> $ ps auxf | grep blah
> adam   52359  0.0  0.0   7708   940 pts/3S+   09:55   0:00
>\_ grep --colour=auto blah
>
> So, there's no systemd process running on this system.

A common tactic is to use grep twice:
ps auxf | grep -v grep | grep blah

That strips out all instances of grep from the results.
Putting what you're searching for first is more efficient, but putting
it last keeps the colorized output intact.

LMP
I often deal with that by using the search function in my terminal  
(usually konsole) to highlight the term I'm actually looking for.







Re: [EXTERNAL] Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-22 Thread Laurence Perkins


On Thu, 2019-08-22 at 10:03 +1000, Adam Carter wrote:
> On Thu, Aug 22, 2019 at 5:48 AM james  wrote:
> > On 8/16/19 12:44 PM, Jack wrote:
> > > ps auxf | grep systemd
> > 
> > This is new turf for me. Upon issuing this command string I get::
> > 
> > # ps auxf | grep systemd
> > root 24947  0.0  0.0  13964   996 pts/6S+   15:43   0:00
> >   |   |   |   \_ grep --colour=auto systemd
> > 
> 
> This is showing that the only process with systemd in its name is the
> grep command itself; you could pass anything to grep and it will be
> found in the process list, eg;
> 
> $ ps auxf | grep blah
> adam   52359  0.0  0.0   7708   940 pts/3S+   09:55   0:00  
>\_ grep --colour=auto blah
> 
> So, there's no systemd process running on this system.

A common tactic is to use grep twice:
ps auxf | grep -v grep | grep blah

That strips out all instances of grep from the results.
Putting what you're searching for first is more efficient, but putting
it last keeps the colorized output intact.

LMP


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


Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-21 Thread Adam Carter
On Thu, Aug 22, 2019 at 5:48 AM james  wrote:

> On 8/16/19 12:44 PM, Jack wrote:
> > ps auxf | grep systemd
>
> This is new turf for me. Upon issuing this command string I get::
>
> # ps auxf | grep systemd
> root 24947  0.0  0.0  13964   996 pts/6S+   15:43   0:00
>   |   |   |   \_ grep --colour=auto systemd
>

This is showing that the only process with systemd in its name is the grep
command itself; you could pass anything to grep and it will be found in the
process list, eg;

$ ps auxf | grep blah
adam   52359  0.0  0.0   7708   940 pts/3S+   09:55   0:00  \_
grep --colour=auto blah

So, there's no systemd process running on this system.


Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-21 Thread Jack

On 2019.08.21 15:48, james wrote:

On 8/16/19 12:44 PM, Jack wrote:
> ps auxf | grep systemd

This is new turf for me. Upon issuing this command string I get::

# ps auxf | grep systemd
root 24947  0.0  0.0  13964   996 pts/6S+   15:43   0:00
  |   |   |   \_ grep --colour=auto systemd
This just means that there is nothing else running on your system with  
"systemd" in the name.


I have no clue what this means, nor what action, if any I should take  
to remedy this. I have never used systemd and put up/modify  
everything I can to keeep systemd off. Any explaination or advice,  
like a master list of things/configs to ensure nothing 'systemd  
related' in on the system, is most welcome.
Sorry, but you came into the middle of a conversation started by  
someone else, and all suggestions provided were directed primarily at  
him.  What is the "this" you think you need to remedy?


In the case of the original poster to this thread, he was not using  
systemd, but did have it installed, so I suggested that ps command to  
see if any part of systemd was running on his system, even though he  
didn't think there was.


In your case, if you have never installed systemd, then you should not  
have anything to worry about.  While many of us might call it  
"intrusive," as far as I know, it does not have the ability to actually  
install itself without you knowing about it.  If you have eix  
installed, you could even do "eix systemd" to confirm you don't have  
any of it's pieces installed.


Just a note: I've been in poor health, over the last 2 years, so  
excuse my lack of keeping my gentoo system(s) robustly updated.
Not updating your system may make it difficult to do once you are  
ready, but it does  not change the state of what you do or do not have  
installed or running.  If you need help when you DO try to update, just  
start a new thread with an appropriate  subject, and there are plenty  
of folks who will offer advice.


James

Jack


Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-21 Thread james
On 8/16/19 12:44 PM, Jack wrote:
> ps auxf | grep systemd



This is new turf for me. Upon issuing this command string I get::


# ps auxf | grep systemd
root 24947  0.0  0.0  13964   996 pts/6S+   15:43   0:00
  |   |   |   \_ grep --colour=auto systemd



I have no clue what this means, nor what action, if any I should take
to remedy this. I have never used systemd and put up/modify everything I
can to keeep systemd off. Any explaination or advice, like a master list
of things/configs to ensure nothing 'systemd related' in on the system,
is most welcome.


Just a note: I've been in poor health, over the last 2 years, so excuse
my lack of keeping my gentoo system(s) robustly updated.



James




Re: [gentoo-user] empty cdrom drive is busy or mounted [resolved]

2019-08-18 Thread Helmut Jarausch

On 08/16/2019 06:21:30 PM, Jack wrote:

On 2019.08.16 12:00, Helmut Jarausch wrote:

On 08/16/2019 05:25:34 PM, Jack wrote:
try "lsof /cdrom"?  It says the mount point, not the device, might  
be busy.



This didn't show anything.
I still don't know the cause of my problems.
But fortunately, they have been resolved by recompiling the kernel  
(5.2.0),
systemd and all packages depending on systemd - using the new  
gcc-9.2.0


Furthermore I had to add the use flags
cgroup-hybrid -sysv-utils
for systemd. This hasn't been necessary before - very strange.
For me, systemd is a monster which I haven't understood.
I try to not use it since I am using openrc.
Perhaps I have to remove it from my system and use eudev instead of  
udev as part of systemd.


Thanks for trying to help me - it was a really strange situation.


If you are using openrc (as I am) I would say you really don't want  
systemd installed at all.  I can't imagine any good coming from  
that.  You do need eudev,  I also have elogind installed, but I'm not  
sure if it's absolutely required, or if I had some other reason for  
installing (possibly to get rid of consolekit?)



Thank you Jack and Laurence!

I've put the (possibly dangerous) task to get rid of systemd on my  
to-do list.
Meanwhile, the issue is resolved here - most probably because I  
uninstalled
sys-fs/udiskie. (Less likely because I upgraded the kernel from 5.2.8  
to 5.2.9)


Many thanks again,
Helmut


Re: [EXTERNAL] Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread Laurence Perkins


On Fri, 2019-08-16 at 12:21 -0400, Jack wrote:
> On 2019.08.16 12:00, Helmut Jarausch wrote:
> > On 08/16/2019 05:25:34 PM, Jack wrote:
> > > try "lsof /cdrom"?  It says the mount point, not the device,
> > > might  
> > > be busy.
> > 
> > This didn't show anything.
> > I still don't know the cause of my problems.
> > But fortunately, they have been resolved by recompiling the
> > kernel  
> > (5.2.0),
> > systemd and all packages depending on systemd - using the new  
> > gcc-9.2.0
> > 
> > Furthermore I had to add the use flags
> > cgroup-hybrid -sysv-utils
> > for systemd. This hasn't been necessary before - very strange.
> > For me, systemd is a monster which I haven't understood.
> > I try to not use it since I am using openrc.
> > Perhaps I have to remove it from my system and use eudev instead
> > of  
> > udev as part of systemd.
> > 
> > Thanks for trying to help me - it was a really strange situation.
> 
> If you are using openrc (as I am) I would say you really don't want  
> systemd installed at all.  I can't imagine any good coming from
> that.   
> You do need eudev,  I also have elogind installed, but I'm not sure
> if  
> it's absolutely required, or if I had some other reason for
> installing  
> (possibly to get rid of consolekit?)

elogind will be needed if you have one of the desktop environments or
login managers that relies on it, and yeah, it mostly just takes the
place of console kit with regard to giving the user who is actually
sitting at the keyboard extra privileges.

LMP


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


Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread Jack

On 2019.08.16 12:26, Helmut Jarausch wrote:

On 08/16/2019 05:25:34 PM, Jack wrote:
try "lsof /cdrom"?  It says the mount point, not the device, might  
be busy.


Unfortunately, the problem is still there.

dmesg shows

[ 1326.461161] systemd-udevd[9882]: Process 'cdrom_id --eject-media  
/dev/sr0' failed with exit code 1.



But does that mean?
My guess is that you have not fully purged your system of systemd.  I  
have a few dmesg entries from udevd, but nothing that mentions  
systemd.  Does "ps auxf | grep systemd" show anything?  It does not for  
me.


Does "eix systemd" show anything installed?  It does not for me.  There  
is also a setting in the kernel config (at the very bottom) about  
whether you use openrc or systemd, but I use gentoo-sources, and  
suspect that's a gentoo addition that probably controls some other  
settings.  It looks like they just enable all other setting necessary  
for either the script based inits (including openrc) or for systemd, so  
it looks like it would be safe to have both set.


Jack


Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread Helmut Jarausch

On 08/16/2019 05:25:34 PM, Jack wrote:
try "lsof /cdrom"?  It says the mount point, not the device, might be  
busy.


Unfortunately, the problem is still there.

dmesg shows

[ 1326.461161] systemd-udevd[9882]: Process 'cdrom_id --eject-media  
/dev/sr0' failed with exit code 1.



But does that mean?



On 8/16/19 10:23 AM, Helmut Jarausch wrote:

Hi,

I have a very strange effect on my Gentoo system.
First, I've check that /dev/sr0 points to the correct device (from  
dmesg)


For an empty drive  I get

1 # mount /dev/sr0 /cdrom
mount: /cdrom: /dev/sr0 already mounted or mount point busy.

2 # lsof /dev/sr0

3 # umount /dev/sr0
umount: /dev/sr0: not mounted.


Does anybody know what's going on here?

Many thanks for a hint.

P.S. I have checked this with two physically different drives.










Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread Jack

On 2019.08.16 12:00, Helmut Jarausch wrote:

On 08/16/2019 05:25:34 PM, Jack wrote:
try "lsof /cdrom"?  It says the mount point, not the device, might  
be busy.



This didn't show anything.
I still don't know the cause of my problems.
But fortunately, they have been resolved by recompiling the kernel  
(5.2.0),
systemd and all packages depending on systemd - using the new  
gcc-9.2.0


Furthermore I had to add the use flags
cgroup-hybrid -sysv-utils
for systemd. This hasn't been necessary before - very strange.
For me, systemd is a monster which I haven't understood.
I try to not use it since I am using openrc.
Perhaps I have to remove it from my system and use eudev instead of  
udev as part of systemd.


Thanks for trying to help me - it was a really strange situation.


If you are using openrc (as I am) I would say you really don't want  
systemd installed at all.  I can't imagine any good coming from that.   
You do need eudev,  I also have elogind installed, but I'm not sure if  
it's absolutely required, or if I had some other reason for installing  
(possibly to get rid of consolekit?)


Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread Helmut Jarausch

On 08/16/2019 05:25:34 PM, Jack wrote:
try "lsof /cdrom"?  It says the mount point, not the device, might be  
busy.



This didn't show anything.
I still don't know the cause of my problems.
But fortunately, they have been resolved by recompiling the kernel  
(5.2.0),

systemd and all packages depending on systemd - using the new gcc-9.2.0

Furthermore I had to add the use flags
cgroup-hybrid -sysv-utils
for systemd. This hasn't been necessary before - very strange.
For me, systemd is a monster which I haven't understood.
I try to not use it since I am using openrc.
Perhaps I have to remove it from my system and use eudev instead of  
udev as part of systemd.


Thanks for trying to help me - it was a really strange situation.


On 8/16/19 10:23 AM, Helmut Jarausch wrote:

Hi,

I have a very strange effect on my Gentoo system.
First, I've check that /dev/sr0 points to the correct device (from  
dmesg)


For an empty drive  I get

1 # mount /dev/sr0 /cdrom
mount: /cdrom: /dev/sr0 already mounted or mount point busy.

2 # lsof /dev/sr0

3 # umount /dev/sr0
umount: /dev/sr0: not mounted.


Does anybody know what's going on here?

Many thanks for a hint.

P.S. I have checked this with two physically different drives.










Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread Jack

try "lsof /cdrom"?  It says the mount point, not the device, might be busy.

On 8/16/19 10:23 AM, Helmut Jarausch wrote:

Hi,

I have a very strange effect on my Gentoo system.
First, I've check that /dev/sr0 points to the correct device (from dmesg)

For an empty drive  I get

1 # mount /dev/sr0 /cdrom
mount: /cdrom: /dev/sr0 already mounted or mount point busy.

2 # lsof /dev/sr0

3 # umount /dev/sr0
umount: /dev/sr0: not mounted.


Does anybody know what's going on here?

Many thanks for a hint.

P.S. I have checked this with two physically different drives.







Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread Helmut Jarausch

On 08/16/2019 05:22:27 PM, J. Roeleveld wrote:
Sounds like error message is not clear. But as there is no disc, the  
mount

action should fail anyway.
What happens when there is a disc in the drive?


The same unfortunately.
Thanks,
Helmut



--
Joost

On 16 August 2019 16:23:36 CEST, Helmut Jarausch  
jarau...@skynet.be

wrote:
 Hi,

 I have a very strange effect on my Gentoo system.
 First, I've check that /dev/sr0 points to the correct device  
(from

 dmesg)

 For an empty drive  I get

 1 # mount /dev/sr0 /cdrom
 mount: /cdrom: /dev/sr0 already mounted or mount point busy.

 2 # lsof /dev/sr0

 3 # umount /dev/sr0
 umount: /dev/sr0: not mounted.


 Does anybody know what's going on here?

 Many thanks for a hint.

 P.S. I have checked this with two physically different drives.




--
Sent from my Android device with K-9 Mail. Please excuse my brevity.






Re: [gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread J. Roeleveld
Sounds like error message is not clear. But as there is no disc, the mount 
action should fail anyway.
What happens when there is a disc in the drive?

--
Joost

On 16 August 2019 16:23:36 CEST, Helmut Jarausch  wrote:
>Hi,
>
>I have a very strange effect on my Gentoo system.
>First, I've check that /dev/sr0 points to the correct device (from  
>dmesg)
>
>For an empty drive  I get
>
>1 # mount /dev/sr0 /cdrom
>mount: /cdrom: /dev/sr0 already mounted or mount point busy.
>
>2 # lsof /dev/sr0
>
>3 # umount /dev/sr0
>umount: /dev/sr0: not mounted.
>
>
>Does anybody know what's going on here?
>
>Many thanks for a hint.
>
>P.S. I have checked this with two physically different drives.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[gentoo-user] empty cdrom drive is busy or mounted

2019-08-16 Thread Helmut Jarausch

Hi,

I have a very strange effect on my Gentoo system.
First, I've check that /dev/sr0 points to the correct device (from  
dmesg)


For an empty drive  I get

1 # mount /dev/sr0 /cdrom
mount: /cdrom: /dev/sr0 already mounted or mount point busy.

2 # lsof /dev/sr0

3 # umount /dev/sr0
umount: /dev/sr0: not mounted.


Does anybody know what's going on here?

Many thanks for a hint.

P.S. I have checked this with two physically different drives.