I'm testing TestDisk now...You are using [advanced > undelete] ?
Selecting a disk or folder is not enough, you have to go into it with [Enter] to work...
I'm testing TestDisk now...You are using [advanced > undelete] ?
You must start testdisk as root. But even then, usually /root/ is similar limited on most systems as /home/guest/ is limited. Which system admin would give /root/ 520 GB of free space by default, and you need approx that to safely start a rescue operation of a 500 GB lost partition. That would hardly work in any sane environment. And in our case, saving restored files onto the RAM disk borders with insanity.
Back in 2020 I used the outdated testdisk 7.2 WIP and I do not recall how I had to do it. I do not recall having to start testdisk from the target partition, but maybe I did. In cases like these I usually read into the finer workings beforehand while experimenting with the software but not yet starting the real operation, to get a better grasp how it works and about possible pitfalls, and when all looks like described on the support forum or in readme's or in a wiki article, then I finally start the operation for real.
has some tiny error in it you overlooked?
Holmes: Therefore, I deduce your simple script must be the reasonable culprit for the misbehaviour you witnessed.
Watson: … … …
Holmes: Elementary, my dear Watson.
Watson: At least in theory, my dear Holmes. At least in theory…
Holmes: …
Kinda weird indeed.
Code: Select all
if [ ! -e /mnt/live/memory/images/gpart*.xzm ]; then
activate $OPTIONAL/$TESTDISK > /dev/null 2>&1 &
activate $OPTIONAL/gpart*.xzm > /dev/null 2>&1 &
fi
Leave out the > /dev/null 2>&1 part and see if it hides some crucial information.Ed_P wrote: ↑10 Oct 2023, 04:22If I change the script's if statement, like so:I don't get the error message. But testdisk doesn't get activated either.Code: Select all
if [ ! -e /mnt/live/memory/images/gpart*.xzm ]; then activate $OPTIONAL/$TESTDISK > /dev/null 2>&1 & activate $OPTIONAL/gpart*.xzm > /dev/null 2>&1 & fi
Code: Select all
~# uname -a
Linux porteus.example.net 6.5.5-porteus #1 SMP PREEMPT_DYNAMIC Sat Sep 23 18:21:43 MSK 2023 x86_64 Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz GenuineIntel GNU/Linux
~# cat /etc/porteus/*
001-core.xzm:20230922
002-xorg.xzm:20231001
002-xtra.xzm:20230922
003-cinnamon.xzm:20230922
initrd.xz:20230923
Not for me. I have several scripts in /usr/local/bin/ for activating rarely used modules. And for deactivating them, cause activate works that way when you start it on an already activated module.
Code: Select all
activate-011-slapt-get activate-leafpad
activate-abcde activate-libjpeg+libpng
activate-aria2 activate-libjpeg+libtiff+libjbig
activate-audacious activate-libreoffice
activate-audacity activate-moc
activate-btop activate-netsurf
activate-chromium activate-onlyoffice
activate-fbreader-0.12 activate-palemoon
activate-firefox activate-recordmydesktop
activate-gimp activate-redshiftgui
activate-gimp-2.10.22 activate-rendera
activate-gimp-2.10.8 activate-rkhunter
activate-gimp-2.8.6 activate-shellcheck
activate-graphicsmagick activate-signal
activate-hardinfo activate-slapt-get
activate-interlink activate-xmahjongg
Code: Select all
root@rava:~# activate-hardinfo -i
activate-hardinfo V0.3
233472 2012-07-08 17:15 /mnt/sda5/Porteus_modules/5.0/hardinfo-0.5.1-x86_64-1pw.xzm
1 /mnt/sda5/Porteus_modules/5.0/hardinfo-0.5.1-x86_64-1pw.xzm
Code: Select all
root@rava:/usr/local/bin# ls -o activate-hardinfo
-rwxr--r-- 1 root 1635 2021-09-28 22:03 activate-hardinfo
Code: Select all
guest@rava:~$ activate-hardinfo
bash: /usr/local/bin/activate-hardinfo: Permission denied
Code: Select all
root@rava:/usr/local/bin# grep "activate " activate-hardinfo
echo activate "$actifile"
activate "$actifile"
Code: Select all
root@rava:~# cat /etc/porteus/*
001-core.xzm:20230922
002-xorg.xzm:20230922
002-xtra.xzm:20230922
003-xfce.xzm:20230922
06-man.xzm:20230915
initrd.xz:20220928
root@rava:~# ls -ld /mnt/live/memory/images/hardinfo-0.5.1-x86_64-1pw.xzm
/bin/ls: cannot access '/mnt/live/memory/images/hardinfo-0.5.1-x86_64-1pw.xzm': No such file or directory
root@rava:~# activate-hardinfo
activate-hardinfo V0.3
activate /mnt/sda5/Porteus_modules/5.0/hardinfo-0.5.1-x86_64-1pw.xzm
Updating shared library links: /sbin/ldconfig
'libgnutls.so.26' -> 'libgnutls.so.30'
'./libc.so.6' -> '/lib64/libc.so.6'
root@rava:~# ls -ld /mnt/live/memory/images/hardinfo-0.5.1-x86_64-1pw.xzm
drwxr-xr-x 4 root root 37 2012-01-10 13:56 /mnt/live/memory/images/hardinfo-0.5.1-x86_64-1pw.xzm
root@rava:~# hardinfo --version
HardInfo version 0.5.1
Copyright (C) 2003-2009 Leandro A. F. Pereira. See COPYING for details.
Compile-time options:
Release version: Yes (ARCH_x86_64)
BinReloc enabled: Yes
Data prefix: /usr/share/hardinfo/
Library prefix: /usr/lib/hardinfo/
Compiled on: Linux 2.6.35.10 (darkstar)
Modules:
File Name Name Version
computer.so Computer 0.5.1
devices.so Devices 0.5.1
network.so Network 0.5.1
benchmark.so Benchmarks 0.5.1
root@rava:~#
Code: Select all
sh: -c: option requires an argument
Code: Select all
Display
Resolution 0x0 pixels
This is what my 5.0.1 cat /etc/porteus/ shows:Rava wrote: ↑10 Oct 2023, 07:31And it all works in 5.0.1 as should be:Code: Select all
root@rava:~# cat /etc/porteus/* 001-core.xzm:20230922 002-xorg.xzm:20230922 <------------------- 5.0 002-xtra.xzm:20230922 003-xfce.xzm:20230922 06-man.xzm:20230915 initrd.xz:20220928
And I have other scripts that activate Optional modules that's why this problem is so strange.Ed_P wrote: ↑10 Oct 2023, 05:41Code: Select all
001-core.xzm:20230922 002-xorg.xzm:20231001 <------------------- 5.0.1 002-xtra.xzm:20230922 003-cinnamon.xzm:20230922 initrd.xz:20230923
Code: Select all
echo toor | sudo -S activate $OPTIONAL/$SOLITAIRE > /dev/null 2>&1 &
echo toor | sudo -S activate /mnt/$DRV/porteus5.0/Optional/tightvnc-*.xzm > /dev/null 2>&1 &
if [ ! -e /mnt/live/memory/images/$MODULE ]; then
echo $PSWD | sudo -S activate $OPTIONAL/$MODULE > /dev/null 2>&1 &
sleep 2
sudo -S sed -i 's^=gksu ^=psu ^' /usr/share/applications/gslapt.desktop
sudo -S sed -i 's^;System;^;System;Filesystem;^' /usr/share/applications/gslapt.desktop
sudo -S /usr/sbin/gslapt
fi
002-xorg.xzm:20230922 is from the 5.0.1 ISO. (You see that the other base module have the same date) Seems there is already an update for 5.0.1.Ed_P wrote: ↑10 Oct 2023, 16:17This is what my 5.0.1 cat /etc/porteus/ shows:Rava wrote: ↑10 Oct 2023, 07:31And it all works in 5.0.1 as should be:Code: Select all
002-xorg.xzm:20230922 <------------------- 5.0
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
Porteus-v5.01 is released!
Rava wrote: ↑10 Oct 2023, 17:23Now I have this: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
Good question, I dunno.
That refers to all of 5.01 /5.0.1 - when i was asking specifically about the difference between
Code: Select all
#!/bin/sh
OPTIONAL="/mnt/sda6/porteus5.0/Optional" # harddrive
#OPTIONAL="/mnt/sdb1/Optional" # USB drive
TESTDISK="testdisk-7.2-WIP-x86_64-Aug2023.xzm" # version
TESTDISK="testdisk-7.2-WIP-x86_64-rava.xzm"
#awk 'c-->0;/Booting device:/{c=1}' /var/log/porteus-livedbg
if [ `whoami` != "root" ]; then
echo -e "Enter root's password\033[1;31m"
su -c "sh $0 $1 $2"; exit
fi
echo -e "\033[0m"; echo -en "\033]0;testdisk\a"
set -x;
if [ ! -e /mnt/live/memory/images/gpart*.xzm ]; then
activate $OPTIONAL/gpart*.xzm # > /dev/null 2>&1 &
fi
if [ ! -e /mnt/live/memory/images/$TESTDISK ]; then
activate $OPTIONAL/$TESTDISK # > /dev/null 2>&1 &
fi
read -p "Enter backup drive. ( /mnt/sd__ /dev/sd__ ) " BKDRV
if [ ! $BKDRV == "" ]; then
cd $BKDRV
echo && echo == $BKDRV ==
ls -lght
read
mkdir -p Recovery
fi
testdisk
exit
Code: Select all
Enter root's password
Password:
+ '[' '!' -e '/mnt/live/memory/images/gpart*.xzm' ']'
+ activate /mnt/sda6/porteus5.0/Optional/gpart-0.3-x86_64-2salix15.0.xzm
Updating shared library links: /sbin/ldconfig
+ '[' '!' -e /mnt/live/memory/images/testdisk-7.2-WIP-x86_64-rava.xzm ']'
+ activate /mnt/sda6/porteus5.0/Optional/testdisk-7.2-WIP-x86_64-rava.xzm
Updating shared library links: /sbin/ldconfig
+ read -p 'Enter backup drive. ( /mnt/sd__ /dev/sd__ ) ' BKDRV
Enter backup drive. ( /mnt/sd__ /dev/sd__ )