Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#1 by Rava » 14 Dec 2023, 07:03

file:///usr/doc/Porteus-FAQ/index.html#twenty from this system

Code: Select all

guest@rava:/$ cat /etc/porteus/*
001-core.xzm:20230922
002-xorg.xzm:20231001
002-xtra.xzm:20230922
003-xfce.xzm:20230922
06-man.xzm:20230915
initrd.xz:20220928
That is chapter twenty - "My PC has low memory amount" as quoted below:
My PC has low memory amount - is there any simple way of increasing it?

Create a swap file on your hard drive which will act as an extra (but slower) memory bank. Run the following command in a console to create and activate a 500MB swap file on the partition 'sda9':

Code: Select all

mkfileswap /mnt/sda9/Porteus.swap 500
If you want to have this swap file activated by default, add following command to your /etc/rc.d/rc.local:

Code: Select all

swapon /mnt/sda9/Porteus.swap
You should replace sda9 with the path of your own partition. You can see your partition setup by typing

Code: Select all

fdisk -l
in a console from any location.
I did not went through the whole offline FAQ testing each command (I was reading it from chapter 5 downwards), but I was thinking "that one command - fdisk -l - would not work for the normal 'guest' user and in that chapter there is no mentioning of using a root terminal."

I even tested it out:

Code: Select all

guest@rava:/$ fdisk -l
bash: fdisk: command not found
guest@rava:/$  echo  $?
127
guest@rava:/$ 
mkfileswap will ask for root's password, but swapon will create the same command not found error as fdisk does as quoted above.

At the very end there is this info:
Where is the Web browser?

[…] They can be accessed by the GUI app Browser Selection and Update Tool or via (root)terminal command: eg. update-firefox.
(green highlighting by me)

I suggest that the mentioning of a root terminal is also mentioned at the top of the article, e.g.
like this:
Many of the below commands only work for user root, so open a root terminal, e.g. by choosing in the main menu System / ??? Terminal (root) (e.g. called Xfce Terminal (root) when Xfce is your DE) or via

Code: Select all

su -
in your guest terminal and giving your current root password.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#2 by Ed_P » 14 Dec 2023, 07:10

FYI Green text on a light pale green background is hard to see. Blue or red would be better. Or just bold black.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#3 by Rava » 14 Dec 2023, 08:19

Ed_P wrote:
14 Dec 2023, 07:10
FYI Green text on a light pale green background is hard to see. Blue or red would be better. Or just bold black.
It depends on your settings.
What do you mean by "just bold black"?
If you mean by that, only use [ B ] aka "Bold" - that would be Bold white in my case.
Because I use Advanced Night Mode Add On for Pale Moon.

But good to know, so bold and blue is better when viewing in "standard settings"?

And I use bold and red, but usually only for error messages. Or warnings or such.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#4 by Ed_P » 14 Dec 2023, 17:07

Rava wrote:
14 Dec 2023, 08:19
so bold and blue is better when viewing in "standard settings"?
Definitely. :happy62: :beer:
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#5 by nanZor » 25 Feb 2024, 01:31

If you really want fdisk, search your system for busybox and call it directly, as it is not in my path. Handy for things like this!

On my system,

Code: Select all

sudo /mnt/sda1/usr/bin/busybox fdisk -l
Use at your own discretion.
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#6 by Ed_P » 25 Feb 2024, 03:38

Thank you nanZor. But...

Code: Select all

guest@porteus:~$ sudo /usr/bin/busybox fdisk -l
Password: 
sudo: /usr/bin/busybox: command not found
guest@porteus:~$ su
Password: 
root@porteus:/home/guest# /usr/bin/busybox fdisk -l
bash: /usr/bin/busybox: No such file or directory
root@porteus:/home/guest# 
No busybox in my Cinnamon system. But fdisk does exist.

Code: Select all

root@porteus:/home/guest# fdisk -l
Disk /dev/loop0: 384.17 MiB, 402835456 bytes, 786788 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 94.35 MiB, 98934784 bytes, 193232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 :
 :
 :
 Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WD Blue SN570 1TB                       
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E55F6DA6-193F-4C16-9701-6B3AAFAACE8E

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     309247    307200   150M EFI System
/dev/nvme0n1p2    309248     571391    262144   128M Microsoft reserved
/dev/nvme0n1p3    571392  358971391 358400000 170.9G Microsoft basic data
/dev/nvme0n1p4 358971392  361519103   2547712   1.2G Windows recovery environment
/dev/nvme0n1p5 361519104  396333055  34813952  16.6G Windows recovery environment
/dev/nvme0n1p6 396333056  399190015   2856960   1.4G Windows recovery environment
/dev/nvme0n1p7 399190016  962932735 563742720 268.8G Microsoft basic data
/dev/nvme0n1p8 962932736 1953523711 990590976 472.4G Microsoft basic data
 :
 :
 :
 
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#7 by nanZor » 25 Feb 2024, 04:18

Hi Ed! Interesting - on my 5.01 LXDE, I noticed something ... if I use SUDO, I seem to call up this:

Code: Select all

sudo fdisk --version
fdisk from util-linux 2.37.4
Quite extensive, giving me all the Loops too.

If I do a canonical search

Code: Select all

sudo find / -name fdisk
I found two versions. The latest 1.36 for some utils (such as my beloved vi editor)

Code: Select all

vi --version
vi: unrecognized option `--version'
BusyBox v1.36.1 (2023-07-17 18:20:12 AEST) multi-call binary.

Usage: vi [-c CMD] [-R] [-H] [FILE]...
... 
But an older busybox exists, and it seems to be from Ubuntu (!)

Code: Select all

sudo /mnt/sda1/bin/busybox
Password: 
BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.
Seems there is a custom mix of the most modern BB, and perhaps the older BB for boot / emergency boot etc.. I'll have to check out some other Porteus versions and see. I'm a busybox freak, so I guess this caught my eye. :)
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#8 by Ed_P » 25 Feb 2024, 05:50

^ I'm a Porteus 5.01 Cinnamon user and we have some overlaps.

Code: Select all

guest@porteus:~$ sudo fdisk --version
Password: 
fdisk from util-linux 2.37.4
guest@porteus:~$ 

guest@porteus:~$ sudo find / -name fdisk
/mnt/live/memory/images/001-core.xzm/sbin/fdisk
/mnt/live/memory/images/001-core.xzm/usr/share/bash-completion/completions/fdisk
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/share/bash-completion/completions/fdisk
/sbin/fdisk
find: File system loop detected; ‘/sys/kernel/debug/pinctrl’ is part of the same file system loop as ‘/sys/kernel/debug’.

guest@porteus:~$ vi --version
vi: unrecognized option `--version'
BusyBox v1.36.1 (2023-07-17 18:20:12 AEST) multi-call binary.

Usage: vi [-c CMD] [-R] [-H] [FILE]...

Edit FILE

	-c CMD	Initial command to run ($EXINIT and ~/.exrc also available)
	-R	Read-only
	-H	List available features

guest@porteus:~$ sudo /bin/busybox
sudo: /bin/busybox: command not found

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# /bin/busybox
bash: /bin/busybox: No such file or directory

root@porteus:/home/guest# ls -on /bin
total 11927
-rwxr-xr-x 1 0   47736 Dec 28 22:50 [*
-rwxr-xr-x 1 0   39576 Dec 28 22:50 arch*
lrwxrwxrwx 1 0       4 Dec 28 22:47 awk -> gawk*
-rwxr-xr-x 1 0   60152 Dec 28 22:50 b2sum*
-rwxr-xr-x 1 0   43672 Dec 28 22:50 base32*
-rwxr-xr-x 1 0   43672 Dec 28 22:50 base64*
-rwxr-xr-x 1 0   39512 Dec 28 22:50 basename*
-rwxr-xr-x 1 0   55960 Dec 28 22:50 basenc*
-rwxr-xr-x 1 0 1213888 Dec 28 22:50 bash*
lrwxrwxrwx 1 0       5 Dec 28 22:46 bunzip2 -> bzip2*
lrwxrwxrwx 1 0       5 Dec 28 22:46 bzcat -> bzip2*
-rwxr-xr-x 1 0   39432 Dec 28 22:50 bzip2*
-rwxr-xr-x 1 0   14528 Dec 28 22:50 bzip2recover*
-rwxr-xr-x 1 0   43736 Dec 28 22:50 cat*
-rwxr-xr-x 1 0   64280 Dec 28 22:50 chcon*
-rwxr-xr-x 1 0   64280 Dec 28 22:50 chgrp*
-rwxr-xr-x 1 0   64248 Dec 28 22:50 chmod*
-rwxr-xr-x 1 0   72504 Dec 28 22:50 chown*
-rwxr-xr-x 1 0   43768 Dec 28 22:50 chroot*
-rwxr-xr-x 1 0  138008 Dec 28 22:50 cksum*
-rwxr-xr-x 1 0   43672 Dec 28 22:50 comm*
  :
  :
  :
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#9 by beny » 25 Feb 2024, 10:42

bash-5.2# whereis fdisk
fdisk: /sbin/fdisk /usr/man/man8/fdisk.8.gz

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#10 by Ed_P » 25 Feb 2024, 19:07

Code: Select all

guest@porteus:~$ whereis fdisk
fdisk: /sbin/fdisk
guest@porteus:~$ 
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#11 by nanZor » 25 Feb 2024, 21:16

Yep. As always if one decides to use mess around with busybox, just be careful if you find a version that may be tucked away somewhere that is much older. I've seen this in other distros like Debian where it may be many years old, or lacking the full complement of utils.

Obviously one can compile or get binaries themselves to put into the system a-la-carte etc. Just be careful out there! :)
That's a UNIX book - cool. -Garth

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus-FAQ -My PC has low memory amount - fdisk -l command not found

Post#12 by Rava » 25 Apr 2024, 21:01

Code: Select all

root@rava:/# ls -l /usr/bin/vi
lrwxrwxrwx 1 root 21 2023-12-29 04:50 /usr/bin/vi -> /mnt/live/bin/busybox
System Port 5.01 XFCE. Neat that the symlinks are in the local file system but the target of these symlinks are at "boot time" /mnt/live/bin/

Added in 2 minutes 16 seconds:
And my busybox is BusyBox v1.35.0 - but since I do not know of any issues with that version, I keep it at that.
Cheers!
Yours Rava

Post Reply