Score:1

How to use pagination in BusyBox when ‘more’ is dysfunctional?

za flag

So I’m dropped in Busybox and need to do some work here (no pools, datasets and encrypted root) but more isn’t working properly.

I need to go through the config files but I have access to a few degraded commands and fail to set pagination.

I am not very confident with those tools, never been there that long

Thank you

Terrance avatar
id flag
I haven't booted into BusyBox for a while but I think that `less` is in there.
sealedsenses avatar
za flag
No it’s not, don’t know why. And the one there have nearly no options, no ˋhelpˋ available with them and the list is different than the man doc. In ˋgrubˋ I can set it with ˋpager=1ˋ but not here
Terrance avatar
id flag
What version of Ubuntu are you using?
sealedsenses avatar
za flag
21.04 desktop Hirsute Hippo
Terrance avatar
id flag
That is strange. When I type in `busybox less` it shows the version and help for the `less` command in my 21.04 VM I have running. And as a test if I do `cat /etc/group | busybox more` it also seems to work right. So as far as I can see both commands of more and less are there. You might need to reinstall your OS to fix the issue.
Score:0
za flag

Same issue. Using BusyBox 1.27.2 on initramfs of Max10 (linux 4.15.0-generic #42-Ubuntu.) "More" waits for keypress when run from console, but not when using pipes.

Edit: I found I could paginate using sed:

cat /init |sed -e"30q"
cat /init |sed -e"60q"

And so on...

ChanganAuto avatar
us flag
This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://askubuntu.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://askubuntu.com/help/whats-reputation), you can also [add a bounty](https://askubuntu.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/1180243)
José G Moya Y avatar
za flag
Well, I think the hint about "sed" helps someone needing to edit config files while being trapped in a busybox without it. What does NOT are those messages saying "now that you are trapped in a dysfunctional login, reinstall". The disfunctional busybox could be inside the boot of a linux installer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.