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 Mon 25 May 2020, 04:10
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
FirstRib default WeeDog Linux build system
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 44 of 54 [800 Posts]   Goto page: Previous 1, 2, 3, ..., 42, 43, 44, 45, 46, ..., 52, 53, 54 Next
Author Message
rufwoof


Joined: 24 Feb 2014
Posts: 3721

PostPosted: Wed 02 Oct 2019, 12:44    Post subject:  

Under voidlinux you can install and use grub bootloader. When managed manually its quite similar except the menu system is under the /boot folder. Syntax is similar/familiar.
_________________
( ͡° ͜ʖ ͡°) :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 
rockedge


Joined: 11 Apr 2012
Posts: 1794
Location: Connecticut, United States

PostPosted: Wed 02 Oct 2019, 14:05    Post subject:  

Hello wiak,

I was referring to being able to run Grub4Dos in WeeDog. Would be easy to set up a virtual hdd in VirtualBox for example when running in RAM from a booted CD or ISO. I should get a command line solution working for a simple installer mechanism.

I use Puppy Bionic to do most of the work setting up boot partitions and creating them. But it would be easier if the booted WeeDog could run the Grub4Dos programs, and would be nice to have on board.
Back to top
View user's profile Send private message Visit poster's website 
rockedge


Joined: 11 Apr 2012
Posts: 1794
Location: Connecticut, United States

PostPosted: Wed 02 Oct 2019, 14:08    Post subject:  

hello rufwoof,
I did install grub but have yet to use it correctly on the VirtualBox virtual HDD

I have to figure out what I am not doing right! Why I suddenly missed starting Grub4Dos.....
Back to top
View user's profile Send private message Visit poster's website 
AndresC2

Joined: 08 Jul 2017
Posts: 76

PostPosted: Wed 02 Oct 2019, 17:02    Post subject:  

Hi Wiak

sorry for late post no internet in home

you are right i do not have too much memory ram for such task

anyway i build a script for merge changes in ram with 01-filesystem.squashfs in debian buster:

mkdir -vp /tmp/merge
unionfs-fuse -o nonempty -o allow_root -o cow /run/live/overlay/rw=RW:/run/live/rootfs/01-filesystem.squashfs=RO /tmp/merge

mksquashfs /tmp/merge /lib/live/mount/medium/Buster/live/01-filesystemNEW.squashfs

umount /tmp/merge

work fine for me.

is possible the same in WeeDog?

In debian the 01-filesystem.squashfs is mount in this path:/run/live/rootfs/01-filesystem.squashfs

but where is in weedog?

i try

mkdir -vp /tmp/merge
mkdir -vp /tmp/weedog

mount -o loop /mnt/sdb1/WeeDog/01weedog.sfs /tmp/weedog
unionfs-fuse -o nonempty -o allow_root -o cow /mnt/layers/RAM/upper_changes/rw=RW:/tmp/weedog=RO /tmp/merge

No work it said device or loop0 is busy.

another thing a script in boot like this:

if [ -f /mnt/sdb1/WeeDog/01weedogNEW.sfs ]; then
mv 01weedog.sfs 01weedogOLD.sfs
mv 01weedogNEW 01weedog.sfs
fi

thanks.

EDIT:

Wiak i did it

dpkg-deb -x linux-image-4.19.0-5-686 linux

mkdir -p modules-4.19.0-5-686

cd modules-4.19.0-5-686

mkdir -p usr/lib
ln -s usr/lib lib

cp linux/usr/lib/modules modules-4.19.0-5-686/usr/lib

mksquashfs modules-4.19.0-5-686 02modules-4.19.0-5-686.sfs

i have 01weedog.sfs only 62 mb

02modules-4.19.0-5-686.sfs only 51mb

initramfs05.gz only 51mb

reboot ........

Nice run very fine

this is cool in my case beacause when mksquashfs weedog+modules my cpu overhead but

this way compress much fast not overhead at all.

then merge /mnt/layers/RAM/upper_changes with 01weedog is much easy now.

Last edited by AndresC2 on Wed 02 Oct 2019, 17:49; edited 1 time in total
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3721

PostPosted: Wed 02 Oct 2019, 17:46    Post subject:  

I was looking to build a bespoke kernel with all modules statically inbuilt within the kernel and initrd also integral, so could all be booted with just vmlinuz alone. Compiled a 5.2.18 kernel with localyesconfig, with CONFIG_INITRAMFS_SOURCE set to point to a config file containing
Code:
dir /dev 755 0 0
nod /dev/console 644 0 0 c 5 1
nod /dev/loop0 644 0 0 b 7 0
dir /bin 755 1000 1000
slink /bin/sh busybox 777 0 0
file /bin/busybox /sbin/busybox 755 0 0
dir /proc 755 0 0
dir /sys 755 0 0
dir /mnt 755 0 0
file /init /mnt/sda1/KERNEL/init.sh 755 0 0

where that init.sh file contains just
Code:
mount -t proc -o nodev,noexec,nosuid proc /proc
mount -t sysfs -o nodev,noexec,nosuid sysfs /sys
mount -t devtmpfs -o mode=0755 none /dev
/bin/sh

... 12MB in size bzImage (vmlinuz) Smile, but didn't boot Sad

_________________
( ͡° ͜ʖ ͡°) :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 
seaside

Joined: 11 Apr 2007
Posts: 937

PostPosted: Wed 02 Oct 2019, 18:26    Post subject:  

wiak wrote:


By the way, seaside, I came across a kernel command line parameter some time ago, rootwait, which sounded relevant but I forgot to look into it. I'm off to sleep now but maybe worth investigating its purpose. Probably I'll set things to not wait indefinitely though, but rather to have a give up timeout in case device faulty.

quai


wiak,

Good idea to have a timeout.

Perhaps,
Code:
end=$((SECONDS+30)) #before loop
if [ $SECONDS -gt $end ] #then exit loop and abort


Cheers.
s
(I thought there was a "snooze" symbol at the end of your post Smile )
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3721

PostPosted: Wed 02 Oct 2019, 18:30    Post subject: voidlinux wifi  

Voidlinux cli wifi connecting ...
Code:
Make sure wpa_supplicant is running.
ln -s /etc/sv/wpa_supplicant && sv start wpa_supplicant

Find your wireless interface
ip link

Get connected
wpa_cli -i <wifi_interface>

scan
scan_results
add_network
set_network 0 ssid <mywifi>
set_network 0 psk <mywifipassword>
enable_network 0
save_config
quit

_________________
( ͡° ͜ʖ ͡°) :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 
wiak

Joined: 11 Dec 2007
Posts: 1993
Location: not Bulgaria

PostPosted: Wed 02 Oct 2019, 19:05    Post subject:  

seaside wrote:

Perhaps,
Code:
end=$((SECONDS+30)) #before loop
if [ $SECONDS -gt $end ] #then exit loop and abort

...
(I thought there was a "snooze" symbol at the end of your post Smile )


Hello seaside,

Yes that would do for timeout (but env variable SECONDS doesn't get set under busybox sh does it?). There is also the 'timeout' command - I'm just out of bed so haven't tested any of this yet. Okay, now tried "SECONDS" and that works fine and makes sure the 30 is additional time, thanks. EDIT: no, SECONDS is indeed a bashism. I'll use something similar.
EDIT2: ok, done. Will upload new weedog script after some further testing.

As for the "snooze" symbol, that's cos was using android phone in bed just before sleeping and it autocorrected 'wiak' I believe... Wink

_________________
WeeDogLinux forum: https://weedoglinux.rockedge.org/viewforum.php?f=4
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797

Last edited by wiak on Thu 03 Oct 2019, 01:46; edited 6 times in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1993
Location: not Bulgaria

PostPosted: Wed 02 Oct 2019, 19:16    Post subject:  

AndresC2 wrote:

EDIT:

Wiak i did it

dpkg-deb -x linux-image-4.19.0-5-686 linux

mkdir -p modules-4.19.0-5-686

cd modules-4.19.0-5-686

mkdir -p usr/lib
ln -s usr/lib lib

cp linux/usr/lib/modules modules-4.19.0-5-686/usr/lib

mksquashfs modules-4.19.0-5-686 02modules-4.19.0-5-686.sfs

i have 01weedog.sfs only 62 mb

02modules-4.19.0-5-686.sfs only 51mb

initramfs05.gz only 51mb

reboot ........

Nice run very fine

this is cool in my case beacause when mksquashfs weedog+modules my cpu overhead but

this way compress much fast not overhead at all.

then merge /mnt/layers/RAM/upper_changes with 01weedog is much easy now.


Hello AndresC2,

Sorry, I'm just out of bed but will try to digest later what you are writing about above and comment thereafter. I am out of touch with debian but perhaps what you are saying relates to Void too?

Anyway, glad what you've tried worked for you. Keep posting, it's good to know what you are up to and I'm interested in minimising whatever can be done for limited hardware. If things can be put into one of the rdsh plugin facilities that would be particularly interesting and good since don't want to break the core script initramfs/init code whilst it is more generally working fine.

Cheers

wiak

_________________
WeeDogLinux forum: https://weedoglinux.rockedge.org/viewforum.php?f=4
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1993
Location: not Bulgaria

PostPosted: Wed 02 Oct 2019, 19:17    Post subject:  

rufwoof wrote:

... 12MB in size bzImage (vmlinuz) Smile, but didn't boot Sad


Nice if it did

re: wifi connecting under Void. I'll try the recipe, thanks.

wiak

_________________
WeeDogLinux forum: https://weedoglinux.rockedge.org/viewforum.php?f=4
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1993
Location: not Bulgaria

PostPosted: Thu 03 Oct 2019, 03:23    Post subject:  

Fixed earlier notified tiny bug in build_weedog_initramfs05 script and whilst doing that took time to slightly modify a few things (including implementation of seaside recommendation). I'll be uploading it later, but because I've slightly reorganised the rdsh code, I want to do some more testing prior to version release/upload, so upload might be later today or tomorrow.

Nothing major.

wiak

_________________
WeeDogLinux forum: https://weedoglinux.rockedge.org/viewforum.php?f=4
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1993
Location: not Bulgaria

PostPosted: Thu 03 Oct 2019, 08:15    Post subject: build_weedog_initramfs05_s204.sh uploaded
Subject description: implemented seaside's wait on bootpartition idea
 

build_weedog_initramfs05_s204.sh uploaded to usual "Downloads" post here:

http://www.murga-linux.com/puppy/viewtopic.php?p=1035524#1035524

CHANGES

# Revision 2.0.4 Date: 03 Oct 2019
# YMD 20191003: implemented seaside's wait on bootpartition idea

Thanks for the idea seaside, which I implemented only slightly differently:
To get variable seek, simply do not enter ANY usbwait=NN grub kernel commandline parameter. If you do specify any usbwait=NN parameter, the resultant delay will be fixed at NN seconds (including NN=0 case). I have also hard-coded in a timeout value of 30 seconds for the variable delay - if timeout occurs the boot process will immediately drop to a debug sh.

NOTE WELL: rdsh plugin mechanism has been altered slightly.

Previously needed rdshN on grub kernel line to activate related rdshN.plug. Now, the mere existence of the rdshN.plug results in it being sourced at relevant position in the initramfs/init script.

Owing to the new mechanism, you can now both source the rdshN.plug (if it exists) and immediately after that force a debug sh. The debug sh will occur in the usual fashion if the rdshN argument is provided on the grub kernel line.

wiak

_________________
WeeDogLinux forum: https://weedoglinux.rockedge.org/viewforum.php?f=4
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3721

PostPosted: Thu 03 Oct 2019, 11:51    Post subject:  

I've been looking at ways to implement storing the 01firstrib_rootfs.sfs along with 02changes.sfs and any plugins within a ext3 file filesystem that's potentially stored on a ntfs/fat partition, with vmlinuz and initramfs on a boot usb. Will have to grab the newer version now!
_________________
( ͡° ͜ʖ ͡°) :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 
seaside

Joined: 11 Apr 2007
Posts: 937

PostPosted: Thu 03 Oct 2019, 12:29    Post subject: Re: build_weedog_initramfs05_s204.sh uploaded
Subject description: implemented seaside's wait on bootpartition idea
 

wiak wrote:
build_weedog_initramfs05_s204.sh uploaded to usual "Downloads" post here:

http://www.murga-linux.com/puppy/viewtopic.php?p=1035524#1035524

CHANGES

# Revision 2.0.4 Date: 03 Oct 2019
# YMD 20191003: implemented seaside's wait on bootpartition idea

Thanks for the idea seaside, which I implemented only slightly differently:
To get variable seek, simply do not enter ANY usbwait=NN grub kernel commandline parameter. If you do specify any usbwait=NN parameter, the resultant delay will be fixed at NN seconds (including NN=0 case). I have also hard-coded in a timeout value of 30 seconds for the variable delay - if timeout occurs the boot process will immediately drop to a debug sh.



wiak


Wiak,

Nice implementation - if no "usbwait" on the commandline, try to mount for 15 seconds, then abort. This will allow most usb devices time enough, and for the really slow ones an actual "usbwait=(above 15)" time is available. Other devices load immediately.

I think "snoozing" agrees with you....

Regards and thanks,
s
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3721

PostPosted: Thu 03 Oct 2019, 12:52    Post subject:  

I had a rdsh1 kernel boot parameter specified as I have a rdsh1.plug that I want run at each boot (I do md5sum checks on the main and changes sfs files stored on hdd as a intrusion detection measure). I did a build with the new script and removed the rdsh1 kernel boot parameter (as it now auto-detects and runs .plug's) and to my surprise at bootup it stops at a cli asking to 'exit to continue' and when I run 'exit' only then is my rdsh1.plug sourced file actually run. I had expected it to just automatically run, without having to 'exit' from the initramfs cli. Yes if rdsh1 is specified as a kernel boot parameter only then would have expected that drop to shell behaviour. ??? My misunderstanding of the newer design perhaps ???

Ahh! Its because immediately after the _rdsh rdsh1 there's also a _rdsh inram action and as I have inram_sz=100% as a kernel boot parameter _rdsh function is picking that up in its grep inram /proc/cmdline search, finding inram_sz=100% and dropping to shell

Code:
_rdsh (){
        [ -s "${mountfrom}"/${1}.plug ] && . "${mountfrom}"/${1}.plug
        if grep -q $1 /proc/cmdline || [ "$2" == "debug" ]; then
                        # Start a busybox job control debug shell at initramfs/init rdsh break po
                        echo "In initramfs/init at $1. Enter exit to continue boot:"
                        setsid cttyhack sh
        fi
}

Needs perhaps a translate or sed to filter out "inram_sz"

_________________
( ͡° ͜ʖ ͡°) :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 44 of 54 [800 Posts]   Goto page: Previous 1, 2, 3, ..., 42, 43, 44, 45, 46, ..., 52, 53, 54 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.0973s ][ Queries: 12 (0.0399s) ][ GZIP on ]