Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 15 Dec 2019, 10:31
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Fatdog64-802/801/800 Final [21 May 2019]
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 25 of 30 [448 Posts]   Goto page: Previous 1, 2, 3, ..., 23, 24, 25, 26, 27, 28, 29, 30 Next
Author Message
rufwoof


Joined: 24 Feb 2014
Posts: 3681

PostPosted: Wed 23 Oct 2019, 12:39    Post subject: Fatdog change suggestion (bug??)  

script :
/usr/sbin/fatdog-drive-icon-action-handler

function :
do_umount

Propose extending the code to also close the relevant /dev/mapper folder when the desktop bottom left drive icons x close corner is clicked.

If you create a cryptsetup encrypted image file and open that, then the mount point appears in the bottom left drive icons along with its x close corner showing.

When closed using the commands

umount /mnt/data
cryptsetup close data

that desktop drive icon disappears. But if instead closed using the rox-app (clicking the x close icon in the drive icons top corner), its only umounted, the /dev/mapper remains ... so the desktop drive icon remains

If that closed drive icon is clicked again, then rox reopens the folder again, with the content visible. I'd suggest that isn't the intended/desired action, it should be fully closed and the drive icon removed, so you have to go back through entering a password again to reopen it. i.e. the /dev/mapper/xxx name should also be closed

Which requires changing the do_umount function to something like ...
Code:
do_umount() {
   
   ISCRYPT=$(df -h | grep $2 | grep /dev/mapper | awk '{print $1}')
   
   case "$2" in
      $AUFS_ROOT*)
         Xdialog --title "Error" --infobox "${1##*/} is used by system, it cannot be un-mounted." 0 0 10000
         return ;;
   esac

   # close all rox folders
   rox -D "$2"
   
   # umount - escalate to root if we are not root
   if [ $(id -u) -ne 0 ]; then   
      gtksu "Unmounting ${1##*/}" umount "$2"
      RC=$?
      if [ ! -z "$ISCRYPT" ]; then
         cryptsetup close $ISCRYPT
      fi
   else
      umount "$2"
      RC=$?
      if [ ! -z "$ISCRYPT" ]; then
         cryptsetup close $ISCRYPT
      fi
   fi
   
   # prompt user if fails
   if [ $RC -ne 0 ]; then
      if Xdialog --title "Error" --yesno "Unable to unmount ${1##*/}, it is currently used by the following process:
$(fuser -m $2 | xargs ps -o cmd -p | sed 's/CMD//')\n\n
Do you want me to stop them and try again?" 0 0; then
         fuser -m -k $2
         do_umount $1 "$2"
      fi
   fi
}


Example code to create a cryptsetup encrypted image file
Code:
dd if=/dev/zero of=data.img bs=1M count=20
cryptsetup -y luksFormat data.img
#... needs uppercase YES and enter password ... twice

cryptsetup luksOpen data.img data
#... enter password
mkfs.ext2 /dev/mapper/data
cryptsetup close data


To open it
Code:
cryptsetup luksOpen data.img data
mkdir /mnt/data
mount /dev/mapper/data /mnt/data


To close it
Code:
umount /mnt/data
cryptsetup close data

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3681

PostPosted: Sun 27 Oct 2019, 14:42    Post subject: Fatdog help : urxvt help page  

Attached is a actual gzip of a suggested extension to the existing Fatdog help text (as quoted below) that includes a outline of installing urxvt with perl extensions - that includes tab's, clickable url's ...etc. additional functionality.

The new (additional) text is at the bottom of that file, that replaces the 'to be added' existing text.

Note that the same edit should also be reflected into https://distro.ibiblio.org/fatdog/web/faqs/urxvt.html#boxes

Added text ...

Quote:
urxvt with perl extensions (clickable url links, tabs ...etc.)

Open : Fatdog Control Panel, Desktop, Fatdog64 Edit Default Programs and ensure that BROWSER is set to the choice of browser you prefer.

Open : Fatdog Control Panel, System, Gslapt Package Manager, type rxvt in the search box and press <Enter>, locate the rxvt-unicodeperltrue_color.. package, right click the selection box and select Install, and then click the Execute button to install that package

That's a much larger version of urxvt than the Fatdog default urxvt version as it is compiled to install and use perl extensions, those perl extensions however open up additional useful functionality such as clickable links, tabs ..etc.

Menu, Restart X .. to restart X and now when you run urxvt (terminal) any links will be underlined and you can middle mouse click links to open that link (url) in the default web browser (as defined above). Shift up-arrow will open a new tab. Ctrl left (or right) arrow to step between tabs.

If you'd rather have links open using a different mouse button then edit /root/.Xresources and change the URxvt.matcher.button: 2 setting to : 1 for left mouse click, 2 for middle mouse click, 3 for right mouse click. Restart X after making such edits in order for the changes to become effective.
usr_share_doc_fd-help_urxvt.md.gz
Description 
gz

 Download 
Filename  usr_share_doc_fd-help_urxvt.md.gz 
Filesize  1.37 KB 
Downloaded  47 Time(s) 

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
dr. Dan


Joined: 20 Apr 2015
Posts: 85
Location: Oregon, U.S.A.

PostPosted: Sun 27 Oct 2019, 19:59    Post subject: suspend issues  

Hi Fatdog team. I have an ongoing irregular problem with suspending, which has occurred on three of four different laptops. I interacted with step slightly, but have not seen improvement.

Running dmesg in a terminal shows errors with usually one or more of three running programs. I've attached some sample portions.

Thanks for any help, and let me know if I should provide any additional information.

Dan
dmesg_suspend_error.txt.tar.gz
Description 
gz

 Download 
Filename  dmesg_suspend_error.txt.tar.gz 
Filesize  2.58 KB 
Downloaded  48 Time(s) 
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 1226

PostPosted: Mon 28 Oct 2019, 19:28    Post subject:  

@rufwoof, if you'd like take a look at the urxvt build I use, here. It supports true color and perl extensions, including tabs. I make extensive use of tabs. You can install it from Gslapt. The installer appends a section to ~/.Xdefaults to enable perl extensions.
_________________
Fatdog64-810|+Packages|Kodi|gtkmenuplus
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3681

PostPosted: Mon 28 Oct 2019, 20:01    Post subject:  

Thanks step.
_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3681

PostPosted: Mon 28 Oct 2019, 20:25    Post subject: Re: suspend issues  

dr. Dan wrote:
Hi Fatdog team. I have an ongoing irregular problem with suspending, which has occurred on three of four different laptops. I interacted with step slightly, but have not seen improvement.

Running dmesg in a terminal shows errors with usually one or more of three running programs. I've attached some sample portions.

Suspend requires tasks be released and if that fails within a timeout period so suspend fails. It's a common intermittent problem across Linux in general.

In your case the dmesg is suggesting its dhcpcd and syslogd that seem to have prevented suspension.

See this thread https://askubuntu.com/questions/158115/how-can-i-figure-out-why-suspend-sometimes-fails and in particular the section/post about ...
Quote:
Now, put a script in /etc/pm/sleep.d/, scripts there will be run at suspend and resume. The file name should start with an ordering number, 00-49 for user scripts (for more details, see man pm-suspend).

The script could look like this

#!/bin/sh
(killall -9 mount.nfs; exit 0)

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3681

PostPosted: Tue 29 Oct 2019, 07:56    Post subject:  

Would like to have kexec as a available command within initrd (Bulldog), so that I can boot a minimal Bulldog and then boot another kernel directly from there rather than having to re-run BIOS bootup. Attempting to compile kexec for use within initrd when using musl (standard compile compiles OK, but that wont work/run inside initrd), with the source code downloaded from https://mirrors.edge.kernel.org/pub/linux/utils/kernel/kexec/ and with both kernel sources and devx sfs loaded I'm hitting a problem of :

(after having run ./configure ...)

make CC=musl-gcc CFLAGS=-static
Quote:
kexec/crashdump.c:25:10: fatal error: linux/limits.h: No such file or directory
#include <linux/limits.h>
^~~~~~~~~~~~~~~~

Also tried

CFLAGS="-I/usr/musl/include" make CC=musl-gcc CFLAGS=-static

but that also failed.

Any tips/pointers as to how to compile kexec for within Fatdog initrd (Bulldog) would be appreciated. TIA.

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1749

PostPosted: Tue 29 Oct 2019, 15:07    Post subject:  

Code:
CFLAGS="-I/usr/musl/include" make CC=musl-gcc CFLAGS=-static

I think you've invalidated the first CFLAGS by using the second one.
Anyway, it builds fine for me with just:
Code:
export CC="musl-gcc -I/usr/musl/kernel/include"
./configure && make -j

___________

EDIT: if you want to build kexec with lzma and zlib support, you need:

Code:
mkdir -p /tmp/static

export CC="musl-gcc -I/usr/musl/kernel/include"
export CPATH="/tmp/static/include"
export LDFLAGS="-L/tmp/static/lib"

# cd xz sources
./configure --prefix=/tmp/static --disable-shared --enable-static --disable-nls
make && make install

# cd zlib sources
./configure --prefix=/tmp/static --static
make && make install

# cd kexec-tools sources
./configure && make

Sources are here: http://distro.ibiblio.org/fatdog/source/800/

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3681

PostPosted: Tue 29 Oct 2019, 16:17    Post subject:  

Thanks SFR.

I had loff_t errors reported when I tried the first method. Revising to

export CC="musl-gcc -I/usr/musl/kernel/include -Dloff_t=off_t"
./configure && make -j

worked - at least compiles and runs, but reports unknown type 'Reserved' (as in the likes of /sys/firmware/memmap/17/type)

kexec-tools: fix Unknown type (Reserved)

which seems a broader issue (involving patches etc.).

Not a biggie for me as I can work around it using grub4dos menu.lst chaining (my minimal Bulldog (boots with wifi net connected and ssh (dropbear)) is only 11MB and boots in a second or two (6 seconds to wifi net connected), so downloading (ssh/scp) a 'main' system and setting menu.lst to boot that, and rebooting is a minimal/acceptable lag compared to if kexec were being used).

Thanks again SFR.

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1749

PostPosted: Tue 29 Oct 2019, 17:56    Post subject:  

Hmm, I use slightly newer version of musl (1.1.24), but just tried in VBox with pristine 802+devx and it still builds fine, with only 2 warnings...

Anyway, I just realized that we don't even have this feature enabled:
Code:
# zgrep -i 'kexec' /proc/config.gz
# CONFIG_KEXEC is not set
# CONFIG_KEXEC_FILE is not set
#

Or did you build your custom kernel?

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3681

PostPosted: Tue 29 Oct 2019, 18:07    Post subject:  

Good spot SFR. I did compile a standard kernel/default config ... which also has those "not set". I built the same version of standard kernel as Fatdog, with localyesconfig so all modules are built into the kernel. Also drop initrd (initramfs.cpio) into the kernel, so just the one file to boot (vmlinuz), but with a cut down Bulldog (fatdog initrd) as the initramfs.cpio. My laptop works with the default kernel included firmware, so no external modules/firmware whatsoever. Hence the 11MB vmlinuz size (enough for cli/wifi net connected/ssh).

My intent was to have that as a means to quickly boot (1 second, 6 seconds with net connected), and pull in a main system from wherever (mounted filesystem, via the internet ...etc.) and then (re)boot using that. kexec came to mind, but its equally just as easy to (temporarily) modify menu.lst to boot the new main system and reboot into that.

EDIT: having rebuilt the kernel with KEXEC enabled that is working OK i.e. can from within Bulldog kexec -l vmlinuz --initrd=initrd;kexec -e ... and it boots to full graphical Fatdog desktop mode using that alternative kernel.

upx'd the kexec and with initrd built into the kernel along with all modules (just boots with vmlinuz alone), that's a 9.9MB vmlinuz filesize (I dropped btrfs support and some other stuff out of the kernel build). That boots to cli, wifi net connect and has ssh (so I can ssh into hashbang and access tmux for email/irc ...etc.), is set to support overlayfs and now has functional kexec - so it can directly boot another system/puppy without having to reboot via BIOS.

ssh (scp) is a little slow compared to a fully booted systems scp speed. Pulling down a fatdog iso for instance and then extracting the initrd out of that and booting it isn't a quick task/action - more like a coffee break task.

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5397
Location: Ontario

PostPosted: Wed 30 Oct 2019, 19:33    Post subject: fatdog 802 without a save file  

Observation: When I use fatdog 802 without a save file, the SFS manager
doesn't work properly --> /mnt/home isn't available and clicking 'Apply' doesn't work.

So a warning message would be nice.
________________________________________________
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1749

PostPosted: Thu 31 Oct 2019, 05:25    Post subject:  

rufwoof wrote:
EDIT: having rebuilt the kernel with KEXEC enabled that is working OK i.e. can from within Bulldog kexec -l vmlinuz --initrd=initrd;kexec -e ... and it boots to full graphical Fatdog desktop mode using that alternative kernel.

Alright, glad you made it working.

don570 wrote:
Observation: When I use fatdog 802 without a save file, the SFS manager
doesn't work properly --> /mnt/home isn't available and clicking 'Apply' doesn't work.

So a warning message would be nice.

SFS Manager defaults to $HOME if /mnt/home is unavailable.
Maybe you meant SFS Loader?
Yes, its default location is /mnt/home, but below the left pane there's this checkbox:
Quote:
To change SFS directory, tick the box and click Apply.

where you can choose the location of your SFSes.

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5397
Location: Ontario

PostPosted: Thu 31 Oct 2019, 20:23    Post subject:  

Quote:
Yes, its default location is /mnt/home, but below the left pane there's this checkbox:
Quote:
To change SFS directory, tick the box and click Apply.

where you can choose the location of your SFSes.


But it doesn't work properly unless you have set up a pupsave file
or a directory to save output permanently.
________________________________________
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3681

PostPosted: Thu 31 Oct 2019, 22:38    Post subject:  

sfs manager and sfs loader both work fine for me when I booted Fatdog 8.2 with no savefile (fresh/first boot). Checking the box and clicking apply in sfs loader and I can switch to another folder to use for loading sfs's from, and adding a sfs had it load OK. sfs manager with no save file defaulted to /root as the default folder to save the sfs to and it downloaded the selected sfs into /root OK. That was booting using grub4dos and having fd64.sfs copied into ram (fd64.sfs outside of initrd, basesfs=ram:.....)
_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 25 of 30 [448 Posts]   Goto page: Previous 1, 2, 3, ..., 23, 24, 25, 26, 27, 28, 29, 30 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3599s ][ Queries: 12 (0.1028s) ][ GZIP on ]