The officially official Devuan Forum!

You are not logged in.

#1 Yesterday 18:54:20

greenjeans
Member
Registered: 2017-04-07
Posts: 590  
Website

Swapon bash:command not found ?

Okay another weird one.

At some point in my frequent frenetic installing and more installing this last week, I screwed up swap. No biggie, done it before, just usually have to adjust /etc/fstab.

That didn't work out for some reason this time, so I fired up gparted on main system (sda/1) and assigned a new UUID, closed it, modded fstab on sda/1, then opened terminal and su'ed to root and ran

swapon --all --verbose

and swap fired right up. All good.

Now on to sda/2, did same thing, worked perfectly.

Now to sda/3 the new Daedalus Mate-mini,  fixed fstab, terminal, su-to-root, run swapon command again and I get the same message that you would get if you tried that command as a user instead of root 

bash: command not found

??? It has mount installed and all files are there, swapon and swapoff in /sbin....i'm at a loss here, why would it not let root run swapon?

And the thing is, swap is not off on that partition, the system monitor reports it sees it and it's working.

???

Edit: And tried swapoff, got the same message, bash can't find it.

Last edited by greenjeans (Yesterday 18:55:07)


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#2 Yesterday 20:35:54

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 648  

Re: Swapon bash:command not found ?

hi, reminds me of the $PATH shinanighans that came with Devuan Chimaera release...

where su no longer gave the user the path root would have.

I wonder if you get a different path if you type 'su -' instead of su.

Seems weird, but maybe you could check that.


pic from 1993, new guitar day.

Offline

#3 Yesterday 20:44:21

greenjeans
Member
Registered: 2017-04-07
Posts: 590  
Website

Re: Swapon bash:command not found ?

I'm an idiot.

Thank you Glenn!

Last edited by greenjeans (Yesterday 22:20:05)


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#4 Yesterday 20:46:01

greenjeans
Member
Registered: 2017-04-07
Posts: 590  
Website

Re: Swapon bash:command not found ?

hi, reminds me of the $PATH shinanighans that came with Devuan Chimaera release...

where su no longer gave the user the path root would have.

I wonder if you get a different path if you type 'su -' instead of su.

Seems weird, but maybe you could check that.

Wow, I hadn't heard about that, will give it a check.


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#5 Yesterday 20:50:08

golinux
Administrator
Registered: 2016-11-25
Posts: 3,336  

Re: Swapon bash:command not found ?

That's what happens when you play Rip Van Winkle for so long . . .  wink

Online

#6 Yesterday 20:51:07

rolfie
Member
Registered: 2017-11-25
Posts: 1,178  

Re: Swapon bash:command not found ?

The su stuff has already changed in Beowulf: https://files.devuan.org/devuan_beowulf … _notes.txt

Offline

#7 Yesterday 21:09:38

greenjeans
Member
Registered: 2017-04-07
Posts: 590  
Website

Re: Swapon bash:command not found ?

The su stuff has already changed in Beowulf: https://files.devuan.org/devuan_beowulf … _notes.txt

I'm sitting here right now using stock Daedalus from a netinstall I did a year ago, and that's not the behavior it exhibits, plain old su works just like it always did. That's why I didn't expect this. And I never modified anything to do with the $PATH.

The default settings for the system in all the files i've checked are identical in Daedalus installed a year ago and the one I installed last week from the most recent netinstall iso.


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#8 Yesterday 21:31:32

greenjeans
Member
Registered: 2017-04-07
Posts: 590  
Website

Re: Swapon bash:command not found ?

Wow @rolfie, thanks for the link big-time, sure enough that new install is doing that, su - has all access. That makes me happy and sad and confused all at the same time.

Happy because I didn't do badly, my goal with the Mate-mini was to make a 100% stock Devuan with no changes or additions by me, pure Devuan as-delivered. So I guess I did that, and if that's the way they want it, so be it. Relieved.

Confused because if this goes all the way back to Beowulf, why did it not do it on my other Devuan installs from a year ago? And also, if someone would humor an out-of-touch old curmudgeon:

Why was this necessary?
Where is it? Hard-coded into Bash?


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#9 Yesterday 22:00:49

rolfie
Member
Registered: 2017-11-25
Posts: 1,178  

Re: Swapon bash:command not found ?

You should have been trapped in any release including Beowulf and later. The only way around is a dedicated root terminal.

The problem itself is inherited from Debian. In Buster there was a move of the su command from one package to another (I don't know exactly the names, can be found in the internet). They told me now the su command behaves as in any other Unix/Linux. Not that I like it, I see that very often the "normal" user stumbles across this behaviour. Not really user friendly. Not a bug, works as intended by the people knowing better.

Last edited by rolfie (Yesterday 22:02:22)

Offline

#10 Yesterday 22:18:29

greenjeans
Member
Registered: 2017-04-07
Posts: 590  
Website

Re: Swapon bash:command not found ?

Thanks rolfie, the workaround posted at the link you gave me worked fine and now it's behaving as i'm used to.

I don't like either, but I seem to be an old man yelling at clouds the last couple days anyway.

But hey, I learned new things so it's a good day. Really appreciate the forum members here helping me out.


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#11 Yesterday 22:24:16

greenjeans
Member
Registered: 2017-04-07
Posts: 590  
Website

Re: Swapon bash:command not found ?

That's what happens when you play Rip Van Winkle for so long . . .

It's like I walk out to my truck, put in the key and start it up, but the transmission won't shift out of park today because I didn't use my extra-super-dooper-superuser-key that I didn't know I had or needed to use.


https://sourceforge.net/projects/vuu-do/ New 1.09 isos uploaded 11/27/2024
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#12 Yesterday 22:43:45

golinux
Administrator
Registered: 2016-11-25
Posts: 3,336  

Re: Swapon bash:command not found ?

Nothing lasts for long these days . . . except for human stupidity.  You can always count on that especially from those on top of the food chain. It seems that stability is not very profitable . . .

Online

#13 Today 05:55:37

EDX-0
Member
Registered: 2020-12-12
Posts: 84  

Re: Swapon bash:command not found ?

ah yes the PATH shenanigans, i simply append to path in my .profile

PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin:$HOME/.local/bin"

this way i always get the sbin programs on my path, they will still require sudo to run.

Offline

#14 Today 08:25:35

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 648  

Re: Swapon bash:command not found ?

I remembered the path abnomally, but forgot the fix... I had made an alias in bash that made it behave the same way I was used to. (and I carry it over from my backup/restore file from install to install)

So, it was Beowulf... my bad.

Glad you got it sorted. And, you're obviously not an idiot, greenjeans.


pic from 1993, new guitar day.

Offline

#15 Today 10:10:21

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 208  

Re: Swapon bash:command not found ?

it has been said many times before but bears repeating, debian is a lost cause and it is only a matter of time before it becomes more effort than it is worth to continue to use it as a base. for those who refuse to use alphabet/apple/microsoft/redhat(directly at least...yes everyone has their fingers in everyone else's pies), where to go/look/turn? [tongue_in_cheek_but_not_totally_in_jest] https://en.wikipedia.org/wiki/KolibriOS [/tongue_in_cheek_but_not_totally_in_jest]


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#16 Today 18:14:28

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,494  

Re: Swapon bash:command not found ?

Another way to revert su to the old behavior is to put the following in /etc/default/su (which you will probably have to create).

ALWAYS_SET_PATH yes

Offline

Board footer