The officially official Devuan Forum!

You are not logged in.

#1 2024-12-03 18:54:20

greenjeans
Member
Registered: 2017-04-07
Posts: 723  
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 (2024-12-03 18:55:07)


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
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 2024-12-03 20:35:54

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

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 2024-12-03 20:44:21

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

Re: Swapon bash:command not found ?

I'm an idiot.

Thank you Glenn!

Last edited by greenjeans (2024-12-03 22:20:05)


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
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 2024-12-03 20:46:01

greenjeans
Member
Registered: 2017-04-07
Posts: 723  
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 Vuu-do isos uploaded January 2025!
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 2024-12-03 20:50:08

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

Re: Swapon bash:command not found ?

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

Offline

#6 2024-12-03 20:51:07

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

Re: Swapon bash:command not found ?

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

Offline

#7 2024-12-03 21:09:38

greenjeans
Member
Registered: 2017-04-07
Posts: 723  
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 Vuu-do isos uploaded January 2025!
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 2024-12-03 21:31:32

greenjeans
Member
Registered: 2017-04-07
Posts: 723  
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 Vuu-do isos uploaded January 2025!
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 2024-12-03 22:00:49

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

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 (2024-12-03 22:02:22)

Offline

#10 2024-12-03 22:18:29

greenjeans
Member
Registered: 2017-04-07
Posts: 723  
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 Vuu-do isos uploaded January 2025!
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 2024-12-03 22:24:16

greenjeans
Member
Registered: 2017-04-07
Posts: 723  
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 Vuu-do isos uploaded January 2025!
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 2024-12-03 22:43:45

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

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 . . .

Offline

#13 2024-12-04 05:55:37

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

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 2024-12-04 08:25:35

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

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 2024-12-04 10:10:21

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

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 2024-12-04 18:14:28

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

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

#17 2024-12-04 22:44:45

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

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).

Yep, that's the method I mentioned at the link Rolfie posted, works great!

In addition, despite that, synaptic and other admin stuff would still not start from menu, turns out the policy kit was not starting up at boot, even though there's an entry for it in /etc/xdg/autostart, I had to add a line to start it in /home/vuudo/.config/openbox/autostart, after that everything started working fine, almost....

But my extensions for root edit/access would still not work using pkexec instead of gksu.

So I found a little code online, modded it some, and made a little script I called gksu.sh and dropped it in the $PATH, all it does when you call it is convert the gksu.sh command to a full pkexec command and then executes pkexec and the action you asked for. Keeps me from having to add a bunch of code into the .desktop exec command lines.

Working soooo smooth now, and so much faster and lighter weight than MATE, I am literally almost done building Vuu-do 2, really the only issues I have left are these:

1. Getting a bunch of video artifacts on startup, logout, and shutdown, weird stuff, the Devuan-mate-mini does it too.  My original install of Daedalus a year ago did it too at first, then for some reason it stopped doing it all on it's own, wonder what that's about?

2. Totally personal to my machine i'm sure, but whenever I boot any version of Daedalus, it hangs up right at first when you boot for a minute or two, then puts out a message "Gave up on waiting for a suspend/resume device". Not sure what it's looking for, any way to bypass that behavior on my machine?

3. Alsa doesn't seem to want to start at all, so volumeicon isn't working properly and cannot fire up alsamixer or equalizer. I pulled Pulse out (YAY!) and it installed pipewire instead, pretty stoked about dumping pulse, but have no experience with Pipewire so don't know what to expect.

4. I started this from a clean install of Devuan-mate-mini, loaded openbox stuff and got a good working environment, logged into openbox session, uninstalled all the MATE stuff in Synaptic, but now Synaptic thinks that a whole lotta important stuff is now "auto removable". We're talking stuff that would destroy the whole system if I auto-removed it, the entirety of Xorg, most prgrams and system libraries, all of gstreamer, it's bizarre, like 60-70 of the most important packages in the system. What the heck?


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
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

#18 2024-12-04 23:51:30

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

Re: Swapon bash:command not found ?

And I just gotta say, great googly-moo, the stupid policy kit takes 75-100 mb of ram while it's running, what the actual? Is that really necessary?

#linuxatemyram


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
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

#19 2024-12-05 09:59:16

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

Re: Swapon bash:command not found ?

2. Put

RESUME=none

in /etc/initramfs-tools/conf.d/resume and then run

update-initramfs -u

If you want to hibernate to disk, replace "none" with the uuid of your swap partition.

4. When you install task-*-desktop, your dependencies have dependencies. It's easier to remove stuff if you start minimal and add only what you need. This might solve the pipewire problem - you can have alsa without the "p".

Synaptic: if you modded /etc/default/su you can just get a root terminal and run

synaptic

Offline

#20 2024-12-05 11:56:26

Altoid
Member
Registered: 2017-05-07
Posts: 1,628  

Re: Swapon bash:command not found ?

Hello:

This post caught my eye.

Don't want to hijack the thread but seems relevant.
So just one question, if I may.
Please let me know if it warrants a separate thread.

fsmithred wrote:

... want to hibernate to disk, replace "none" with the uuid of your swap partition.

That is exactly what my box has and the UUID is the swap file.
But it happens that I do not keep my system on all day, just shut down and reboot.
ie: there is no hibernation image present, never set it up to hibernate.

At some point my dmesg printout reads:

--- snip ---
[   24.068315] PM: Image not found (code -22)
--- snip ---

Q:
Does the system look for a hibernation image at boot time because the line in /etc/initramfs-tools/conf.d/resume is not set to =none and there is a valid (swap file) UUID present?

If I edit /etc/initramfs-tools/conf.d/resume and set RESUME=none, on updating I get this:

# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-6.1.0-28-amd64
/usr/sbin/mkinitramfs: 5: /etc/initramfs-tools/conf.d/resume: none: not found
I: The initramfs will attempt to resume from /dev/sdb3
I: (UUID=f0187ff0-be52-4bbc-9461-40f744554b85)
I: Set the RESUME variable to override this.
live-boot: core filesystems dm-verity devices utils udev blockdev dns.
# 

The system looks for a swap file and not finding one with a UUID of none, finds one and uses it.
What to do?

Best,

A.

Last edited by Altoid (2024-12-06 10:31:00)

Offline

#21 2024-12-05 12:42:33

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

Re: Swapon bash:command not found ?

@fmsithred, thank you! Will try.

Trust me, I know about the dependency upon dependency thing, i've borked a thousand installs over the last 15 years trying to figure it out, lol. Nowadays I pretty much know what I can get away with, but of course things change over time....thes days I usually run through list of dependants, then if there's a question I go on the web and do some research.

When I pulled MATE, the system demanded I uninstall Pulse and install Pipewire, I was so giddy at the thought of getting rid of Pulse completely that I just said okay. Shoot, even the old Vuu-do is not free of Pulse completely, something dragged in libpulse0 and I couldn't get rid of it, so I basically dummied it out for a (hacky) solution. So maybe I can dump Pipewire too? Was wondering if it was any good....

I know I should have started from the ground up, but I tried that earlier this year and got so frustrated trying to work with the CLI and apt that I just stopped. Sorry, i'm a GUI guy. Part of that was I had limited time, I actually have all winter now, and I debated for a while about which way to do it, decided to try and see if this way worked first, and now i've got so much work in it I am loathe to start over, day before yesterday I got up at 7 a.m. and worked on it all day until 2:30 a.m. the next morning, slept for about 3-4 hours and got up and went back at it all day.

@Altoid no worried from me about thread-jacking, all this is very informative. But forum decorum being what it is perhaps I should change the title and maybe get Golinux to wave her magic wand and put it in DIY? Mods do what you think is best.

So question number 5:
5. Given that my system was working completely fine for user without polkit running, just needed to use terminal for root things, Would it be at all feasible to write some sort of script that only started polkit up when a request is made for superuser access and then have it shut down once you were done? It eats up a lot of ram running all the time.


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
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

#22 2024-12-05 12:53:56

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

Re: Swapon bash:command not found ?

One more thing just struck me, I was never able to get the original Vuu-do to hibernate, I did get suspend working when you close the lid on a laptop by adding an  /etc/acpi/events entry connecting to a small script that invokes obsession-exit -s.

Since you mentioned hibernation requires it knowing the UUID of the swap partition it's easy enough for me to do on my own machine, but is there a way to do that generic-ly during install?


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
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

#23 2024-12-05 15:46:30

Altoid
Member
Registered: 2017-05-07
Posts: 1,628  

Re: Swapon bash:command not found ?

Hello:

greenjeans wrote:

@Altoid no worried from me about thread-jacking ...

Thanks, but it is your thread ie: started by you.

greenjeans wrote:

... forum decorum being what it is ...

... is the reason I made reference to thread-jacking.

But I see no need to change anything.

My piggybacked question was posted on the answer fsmithred posted for you.
Still your thread.

Best,

A.

Offline

#24 2024-12-05 16:08:40

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

Re: Swapon bash:command not found ?

Hah! Uninstalled all the Pipewire stuff and ALSA started working correctly! Happy about that.

Sad that they apparently got rid of the equalizer function in ALSA, but I guess most music players that would get installed have one onboard anyway. So it was likely redundant anyway.

Now if I can just get rid of the "auto-removeable" nonsense that Synaptic is doing....

That and those weird visual artifacts I mentioned, if I can fix those two things i'll be in high cotton.


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
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

#25 2024-12-05 16:28:06

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

Re: Swapon bash:command not found ?

Sweet, good ol man pages, I should really learn to read them thoroughly before posting my novice issues.

Solution to the Synaptic auto-remove is found in apt-mark, mark 'em manual and should fix it (hopefully!).

Even easier than I thought, just had to delete /var/lib/apt/extended_states

Did that and and it's all good now!

Last edited by greenjeans (2024-12-05 17:22:46)


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
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

Board footer