BusterDog + build system (no-systemd)

A home for all kinds of Puppy related projects
Message
Author
ras
Posts: 96
Joined: Thu 31 Oct 2019, 00:07

#201 Post by ras »

fredx181 wrote:*** New option "+EXIT" added for porteus-boot ***

See also Here (and posts above it)
In short:
When using "+EXIT" the changes will NOT run in memory, which can be an advantage, specially when you have small amount of RAM.
(with the "normal" EXIT: configuration, the amount of space in / is limited to 60% (default) of the amount of RAM you have).

To be able to use "+EXIT", a new initrd1.xz must be created, therefore:
- Install latest "upgrade-kernel" v1.0.0
https://github.com/doglinux/busterdog/r ... .0_all.deb
- Run from menu > System > Make initrd (see pic below)
- When done, copy /tmp/initrd1.xz to your "live" frugal install folder and replace the existing initrd1.xz
- Reboot and use for example on the kernel boot line:

Code: Select all

changes=+EXIT:/buster_dog/live
Fred

Hi Fred and all BusterDog forumites,

I am just getting my feet wet with BusterDog after using various other puppys for years. I appreciate the detailed explanation of the new boot option, and was hoping someone could point to a resource that explains the various other porteus boot options possible for using with BusterDog.

When reading back through the threads of earlier Dogs, it is sometimes hard to know what advice or features are still current and what may have been depreciated. In any event, there is a lot of pages of older threads to read through....

Can anyone recall a discussion on some of the practical uses for the various options available? There may be new ways to do things that I haven't yet considered?

Also, I used the mklive buster64 appimage from a puppy to build with. Is there an advantage is using mklive buster script once I get my new busterdog up and running?

Thanks
RAS

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#202 Post by backi »


User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#203 Post by fredx181 »

Hi ras,
Yes, and see also http://www.porteus.org/tutorials/26-gen ... -them.html
But note that NOT all of these cheatcodes will work with busterdog.
Also, I used the mklive buster64 appimage from a puppy to build with. Is there an advantage is using mklive buster script once I get my new busterdog up and running?

No , not really, the appimage is just for convenience to use on Puppy (dependencies are inside already), the bare script can be used on Busterdog (will install any missing dependencies) for the rest there's no difference.

Fred

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#204 Post by backi »

Hi Fred !
So..... changes=+EXIT:/buster_dog/ .....is the Equivalent of.....pfix=nocopy
in Puppy Linux for use on the kernel boot line in the menu.lst .........right?

Edit:
No ...it is not !
Last edited by backi on Mon 10 Feb 2020, 14:21, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#205 Post by rcrsn51 »

In Puppy, the "pfix=nocopy" option prevents the main .sfs file from loading into RAM. This frees up RAM but works a bit slower.

To my knowledge, the Debian-Live system NEVER loads the 01-filesystem module into RAM. The EXIT options control how the "changes" data is handled.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#206 Post by backi »

Hi rcrsn51 !
Makes me a bit confused .
Since i am posting now from Bionic Dog .....the " copy2ram" in my kernel Line...does load the 01-filesystem.squashfs into Ram .

Example of my menu.lst Entry for Bionic Dog .
kernel /bionicdog64ohnenvidia/casper/vmlinuz from=/bionicdog64ohnenvidia noauto intel_pstate=passive changes=EXIT:/bionicdog64ohnenvidia/casper/ copy2ram .

Maybe naive question :
Since i am mostly using the "Bionic (or Xenial) Dogs"......want to ask ....
what does the "pfix=copy or pfix=nocopy " in Puppy Linux exactly load (or not)?.......
Any influence on loading (or not) "save File" or "save Folder ?.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#207 Post by rcrsn51 »

backi wrote:Since i am posting now from Bionic Dog .....the " copy2ram" in my kernel Line...does load the 01-filesystem.squashfs into Ram .
My mistake. You are correct.
Since i am mostly using the "Bionic (or Xenial) Dogs"......want to ask ....
what does the "pfix=copy or pfix=nocopy " in Puppy Linux exactly load (or not)?
I really don't know anymore. There has been discussion about changing how "pfix=copy/nocopy/ram" work.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#208 Post by backi »

rcrsn51 !
The EXIT options control how the "changes" data is handled.
Got it....
and the "copy2ram" causes. 01-filesystem.squashfs loaded into Ram ....

But how load or not load save file/Folder into ram in Puppy Linux ?
Possible or not ?
I am somehow a bit confused and outdated .
Can anybody explain ?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#209 Post by rcrsn51 »

backi wrote:But how load or not load save file/Folder into ram in Puppy Linux ? Possible or not ?
In old Puppies, that was IMPOSSIBLE, because the save file was likely bigger than the available RAM. I don't know about new Puppies.

I believe that the Puppy "pmedia=usbflash" option is equivalent to the Porteus "changes=EXIT" option. They hold the current changes in a RAM layer, then flush them back to the permanent storage.

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#210 Post by backi »

Thanks !

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#211 Post by fredx181 »

rcrsn51 wrote:I believe that the Puppy "pmedia=usbflash" option is equivalent to the Porteus "changes=EXIT" option. They hold the current changes in a RAM layer, then flush them back to the permanent storage.
I think so too.
backi wrote:But how load or not load save file/Folder into ram in Puppy Linux ?
Possible or not ?
Possible, yes, same as "changes=EXIT" changes in RAM, but, as far as I know, in Puppy there's no equivalent of "+EXIT" (changes NOT in RAM, and only save on demand or at shutdown).

Fred

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#212 Post by keniv »

Hi All,
I a am trying to convert a .img file to a .squashfs file on busterdog using the instructions here.
https://www.howtogeek.com/141325/how-to ... berryboot/
The instructions are at the bottom of the page. To allow easier comparison with what I've done I've quoted them below.
If your distribution doesn’t have SquashFS installed already (Raspbian doesn’t ship with it by default), enter the following command at the terminal to grab a copy:

sudo apt-get install squashfs-tools

To convert the the .IMG, plug an SD card or USB device containing the file into your Linux machine. We’re going to refer to the image file as NewBerryBoot.img in the commands. Open up the terminal and run the following command on the .IMG:

sudo kpartx -av NewBerryBoot.img

The kpartx command creates device maps from partition tables and, with the –av switch, it will add the mappings and operate verbosely so we can read the output. The output should look something like this:

add map loop0p1 (252:5): 0 117187 linear /dev/loop0 1
add map loop0p2 (252:6): 0 3493888 linear /dev/loop0 118784

The second and larger partition, loop0p2, is the one we’re interested in. In your image, the loop might be different (i.e. loop3p2), so make note of the name for the next commands. Enter the following commands:

sudo mount /dev/mapper/loop0p2 /mnt
sudo sed -i ‘s/^\/dev\/mmcblk/#\0/g’ /mnt/etc/fstab
sudo mksquashfs /mnt converted_image_for_berryboot.img -comp lzo -e lib/modules
sudo umount /mnt
sudo kpartx -d NewBerryBoot.img

This series of commands mounts the partition, edits out the file systems table in the original partition, optimizes the image with SquashFS (leaving out the lib/modules which are shared among the distributions in BerryBoot), and then unmounts and deletes the partition mappings.

After all this command line magic, we can now go back to the comfort of the BerryBoot GUI. Whether you downloaded an already optimized .IMG or you created your own, it’s time to take that .IMG and add it to BerryBoot.
Busterdog does have the squashfs-tools installed but not kpartx which I installed. I removed the sudo from each line of code and exicuted them one at a time.
Here is the output I got from a terminal.

Code: Select all

root@live:~# kpartx -av /mnt/sdd1/LibreELEC-RPi4.img                 

add map loop2p1 (254:0): 0 1048576 linear 7:2 8192
add map loop2p2 (254:1): 0 65536 linear 7:2 1056768

root@live:~# mount /dev/mapper/loop2p1 /mnt

root@live:~# sed -i ‘s/^\/dev\/mmcblk/#\0/g’ /mnt/etc/fstabsed: -e expression #1, char 1: unknown command: `�'

root@live:~# 
The output for the first line was as expected. Based on this I changed the second line in the instructions to include "loop2p1". Executing this line, as you can see, gave a error. From then I had no access to any partition on my drives telling me that the "directories were not valid". Luckily, when I rebooted everything was back to normal. Similar instructions to do this appear elsewhere on the net so I guess it is possible to do this, however, I don't understand the code or what happened. I am hoping some body here can point me in the right direction with this. Perhaps somebody has tried this themselves.

Regards,

Ken.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#213 Post by rcrsn51 »

Try this:

Code: Select all

mkdir /tmp/mntpnt
mount -o loop xxx.img /tmp/mntpnt
Then go to /tmp and see what's in the mntpnt folder.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#214 Post by fredx181 »

Hi Ken,
mount /dev/mapper/loop2p1 /mnt
I cannot help much, but need to say: don't mount on /mnt because /mnt is already in use for other mounts, instead mount on /media (if empty, it should be) or on another empty folder (create it)

I did this with LibreELEC-RPi4.arm-9.2.0.img found on the web

Code: Select all

root@live:~# kpartx -av '/mnt/sda7/LibreELEC-RPi4.arm-9.2.0.img'
add map loop2p1 (254:0): 0 1048576 linear 7:2 8192
add map loop2p2 (254:1): 0 65536 linear 7:2 1056768
root@live:~# mount /dev/mapper/loop2p2 /media
On "/mnt/dm 0/" and "/mnt/dm 1/" I found the mounts

Maybe this helps a bit, don't know further how to convert to squashfs ("/mnt/dm 0/" doesn't look like something usable), I guess the tutorial is for doing inside a booted raspberry PI ?
(expecting /etc/fstab with mmcblk entry inside, Busterdog doesn't have)

EDIT: Btw, why not install LibreELEC to USB the official way and boot it ?

Fred

ras
Posts: 96
Joined: Thu 31 Oct 2019, 00:07

Porteus boot cheatcodes

#215 Post by ras »

Porteus boot :

https://github.com/DebianDog/Jessie/wiki/Porteus-boot


Yes, and see also http://www.porteus.org/tutorials/26-gen ... -them.html
But note that NOT all of these cheatcodes will work with busterdog.


and if I boot with live-boot 3x, is there any additional functionality to be had?

Thanks again Fred and Backi
RAS

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

Re: Porteus boot cheatcodes

#216 Post by dancytron »

ras wrote:
Porteus boot :

https://github.com/DebianDog/Jessie/wiki/Porteus-boot


Yes, and see also http://www.porteus.org/tutorials/26-gen ... -them.html
But note that NOT all of these cheatcodes will work with busterdog.


and if I boot with live-boot 3x, is there any additional functionality to be had?

Thanks again Fred and Backi
Not really. Unless you have a specific reason, it's better to stick with Porteus boot imho.

rameshiyer

Buterdog

#217 Post by rameshiyer »

How to install harddisk ?.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: Porteus boot cheatcodes

#218 Post by rcrsn51 »

ras wrote:and if I boot with live-boot 3x, is there any additional functionality to be had?
...your best bet for booting off an eMMC drive is Buster with a "live-boot" install.

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#219 Post by keniv »

rcrsn51 wrote:Try this:

Code: Select all

mkdir /tmp/mntpnt
mount -o loop xxx.img /tmp/mntpnt
Then go to /tmp and see what's in the mntpnt folder.
Tried the above. Below is the output. First try was with the path to the .img file. Second was without the path.

Code: Select all

root@live:~# mkdir /tmp/mntpnt
root@live:~# mount -o loop /mnt/sdd1/LibreELECC-RPi4.img /tmp/mntpnt
mount: /tmp/mntpnt: failed to setup loop device for /mnt/sdd1/LibreELECC-RPi4.img.
root@live:~# mount -o loop LibreELECC-RPi4.img /tmp/mntpnt
mount: /tmp/mntpnt: failed to setup loop device for LibreELECC-RPi4.img.
root@live:~# 
Also checked /tmp/mnlpnt and it exists but not surprisingly contains nothing. Have I done something wrong?

@fredx181
I guess the tutorial is for doing inside a booted raspberry PI ?
I think you're correct here. I looked again at the code in the instructions and in this line,

Code: Select all

sudo sed -i ‘s/^\/dev\/mmcblk/#\0/g’ /mnt/etc/fstab
"mmcblk" a bit like the name given to the sd card/partition when the image is written to an sd card. I am trying to do this in order to run two os from the same sd card for a RaspPi4 4GB that Santa brought me for Christmas. I got it to run GQRX, a software defined radio program. It is quite memory hungry and it only ran on previous Pi's if throttled back a bit. It runs well on this one though. Previously I might just have written the the LibreELEC.img to another sd card and swapped them about but the sd card socket on this Pi is not of the best quality and I did not fancy taking cards out and in. However I think I will write the LibreELEC.img to another card to try it before I have another go at converting it to squashfs. In that respect can I as about another line of the instructions.

Code: Select all

sudo mksquashfs /mnt converted_image_for_berryboot.img -comp lzo -e lib/modules
Should "converted_image_for_berryboot.img" in the above line be given a name of my choice or would it work as is? If I do try it again I will do it on a Pi.

Regards,

Ken.

ras
Posts: 96
Joined: Thu 31 Oct 2019, 00:07

#220 Post by ras »

fredx181 wrote:Hi ras,
Yes, and see also http://www.porteus.org/tutorials/26-gen ... -them.html
But note that NOT all of these cheatcodes will work with busterdog.



Fred
from the link above
changes-ro

... Keep saved changes in a read-only state. This is useful when
you have your system set up exactly how you like it and do not
want to save any other changes you might make during a live
session. This cheatcode should be used in conjunction with the
'changes=' or 'changes=EXIT:' cheatcodes.
Example: 'changes=/path/file.dat changes-ro'
NOTE: remove the 'changes-ro' cheatcode from the bootloader config
to start saving changes as normal (effective after a reboot).
Is this a usable cheat with busterdog? Or is there a better way to accomplish the same?
RAS

Post Reply