(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 28 Sep 2020, 18:56
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
BusterDog + build system (no-systemd)
Moderators: Flash, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 15 of 24 [360 Posts]   Goto page: Previous 1, 2, 3, ..., 13, 14, 15, 16, 17, ..., 22, 23, 24 Next
Author Message
fredx181


Joined: 11 Dec 2013
Posts: 4481
Location: holland

PostPosted: Mon 10 Feb 2020, 12:05    Post subject:  

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

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
keniv

Joined: 06 Oct 2009
Posts: 607
Location: Scotland

PostPosted: Mon 10 Feb 2020, 16:39    Post subject:  

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-multi-boot-your-raspberry-pi-with-berryboot/
The instructions are at the bottom of the page. To allow easier comparison with what I've done I've quoted them below.
Quote:
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:
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.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 13129
Location: Stratford, Ontario

PostPosted: Mon 10 Feb 2020, 17:50    Post subject:  

Try this:
Code:
mkdir /tmp/mntpnt
mount -o loop xxx.img /tmp/mntpnt

Then go to /tmp and see what's in the mntpnt folder.
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4481
Location: holland

PostPosted: Mon 10 Feb 2020, 17:57    Post subject:  

Hi Ken,

Quote:
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:
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

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
ras

Joined: 30 Oct 2019
Posts: 100

PostPosted: Mon 10 Feb 2020, 21:06    Post subject: Porteus boot cheatcodes  

Quote:
Porteus boot :

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


Yes, and see also http://www.porteus.org/tutorials/26-general-info-tutorials/117-cheatcodes-what-they-are-and-how-to-use-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
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1555

PostPosted: Mon 10 Feb 2020, 21:59    Post subject: Re: Porteus boot cheatcodes  

ras wrote:
Quote:
Porteus boot :

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


Yes, and see also http://www.porteus.org/tutorials/26-general-info-tutorials/117-cheatcodes-what-they-are-and-how-to-use-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.
Back to top
View user's profile Send private message 
rameshiyer

Joined: 17 Sep 2009
Posts: 296
Location: Calicut, Kerala, India

PostPosted: Mon 10 Feb 2020, 23:35    Post subject: Buterdog
Subject description: Installation support
 

How to install harddisk ?.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger 
rcrsn51


Joined: 05 Sep 2006
Posts: 13129
Location: Stratford, Ontario

PostPosted: Tue 11 Feb 2020, 04:07    Post subject: Re: Porteus boot cheatcodes  

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

Quote:
...your best bet for booting off an eMMC drive is Buster with a "live-boot" install.
Back to top
View user's profile Send private message 
keniv

Joined: 06 Oct 2009
Posts: 607
Location: Scotland

PostPosted: Tue 11 Feb 2020, 16:08    Post subject:  

rcrsn51 wrote:
Try this:
Code:
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:
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
Quote:
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:
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:
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.
Back to top
View user's profile Send private message 
ras

Joined: 30 Oct 2019
Posts: 100

PostPosted: Tue 11 Feb 2020, 22:20    Post subject:  

fredx181 wrote:
Hi ras,

backi wrote:
Porteus boot :

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


Yes, and see also http://www.porteus.org/tutorials/26-general-info-tutorials/117-cheatcodes-what-they-are-and-how-to-use-them.html
But note that NOT all of these cheatcodes will work with busterdog.



Fred


from the link above
Quote:
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
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1555

PostPosted: Tue 11 Feb 2020, 23:06    Post subject:  

ras wrote:
fredx181 wrote:
Hi ras,

backi wrote:
Porteus boot :

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


Yes, and see also http://www.porteus.org/tutorials/26-general-info-tutorials/117-cheatcodes-what-they-are-and-how-to-use-them.html
But note that NOT all of these cheatcodes will work with busterdog.



Fred


from the link above
Quote:
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?


I don't know if that cheat code works with busterdog, but the easiest way to accomplish the same effect is to remaster your installation and then just boot without any changes at all.

I don't know it will help, but here are the 4 standard menu.1st entries I use:

Quote:

==> standard save on exit
title BabyBuster (sda2) noauto from=/BabyBuster/ changes=EXIT:/BabyBuster/
root (hd0,1)
kernel (hd0,1)/BabyBuster/live/vmlinuz1 noauto from=/BabyBuster/ changes=EXIT:/BabyBuster/
initrd (hd0,1)/BabyBuster/live/initrd1.xz

===>save on exit, copy to ram
title BabyBuster copy2ram (sda2) noauto from=/BabyBuster/ changes=EXIT:/BabyBuster/
root (hd0,1)
kernel (hd0,1)/BabyBuster/live/vmlinuz1 noauto copy2ram from=/BabyBuster/ changes=EXIT:/BabyBuster/
initrd (hd0,1)/BabyBuster/live/initrd1.xz


==>save as you go directly to changes file
title BabyBuster for upgrade (sda2) noauto from=/BabyBuster/ changes=/BabyBuster/
root (hd0,1)
kernel (hd0,1)/BabyBuster/live/vmlinuz1 noauto from=/BabyBuster/ changes=/BabyBuster/
initrd (hd0,1)/BabyBuster/live/initrd1.xz


==>boot without changes file
title BabyBuster (sda2) No Changes from=/BabyBuster/
root (hd0,1)
kernel (hd0,1)/BabyBuster/live/vmlinuz1 noauto from=/BabyBuster/
initrd (hd0,1)/BabyBuster/live/initrd1.xz
Back to top
View user's profile Send private message 
ras

Joined: 30 Oct 2019
Posts: 100

PostPosted: Wed 12 Feb 2020, 00:14    Post subject:
Subject description: porteus cheatcodes for BusterDog
 

Thanks for sharing your menu.lst ,Dan.

I suppose while cheatcodes are being discussed, I should ask if there is a way to specify different save options once you are already booted.

One Example: Unexpectedly, something goes poorly during a session and you wish to exit without any changes.

Possibly one could backup /changes before shutdown, presuming it is possible to copy the changes folder while it is being used.


A related but different question: Is there a way to manually initiate a save during a session, if one has initially booted without calling for any changes to be saved during or at the end of that session ?

Question edited for clarity.

_________________
RAS
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1555

PostPosted: Thu 13 Feb 2020, 02:17    Post subject:  

Quote:
One Example: Unexpectedly, something goes poorly during a session and you wish to exit without any changes.

Possibly one could backup /changes before shutdown, presuming it is possible to copy the changes folder while it is being used.


Not sure I understand your question, but if you are in Porteus Boot Save Changes on Exit mode you can manually save anytime you want by running /usr/bin/save2flash.

I make a link to it on the desktop and save2flash anytime I do something that I want to keep. If I mess something up, I can just reboot without saving.
Back to top
View user's profile Send private message 
ras

Joined: 30 Oct 2019
Posts: 100

PostPosted: Thu 13 Feb 2020, 20:03    Post subject:  

I shouldn't try to ask two different questions in the same post so I will see if I can clarify.

if you were to boot into a session with the changes=EXIT:/BabyBuster/ parameter, but then wish for the save to not occur because of a problem or behaviour you don't wish to keep, is there a way of exiting clean with no changes, (short of a hard poweroff)?


the second question is answered well having the ability to run "save2flash" on demand.
A strategy that would in effect cover both situations would be to just operate with the no changes parameters as default, and always remember to save when needed

thanks for your help :)

_________________
RAS
Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 1555

PostPosted: Thu 13 Feb 2020, 22:43    Post subject:  

Quote:
if you were to boot into a session with the changes=EXIT:/BabyBuster/ parameter, but then wish for the save to not occur because of a problem or behaviour you don't wish to keep, is there a way of exiting clean with no changes, (short of a hard poweroff)?


Just reboot and say "no" when it asks if you want to save.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 15 of 24 [360 Posts]   Goto page: Previous 1, 2, 3, ..., 13, 14, 15, 16, 17, ..., 22, 23, 24 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. 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.1201s ][ Queries: 12 (0.0545s) ][ GZIP on ]