sb combiner

Programming issues and discussion
Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 28 Nov 2013, 19:45

Created PKGBUILD and "fixed" repo

see first post

9arkb0y
Apprentice
Posts: 12
Joined: 08 Jan 2014, 13:49

Re: sb combiner

Postby 9arkb0y » 11 Jan 2014, 03:48

its posible make this great script for alphaos64bits?

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 11 Jan 2014, 09:01

Yep, It is a bash script so it should run fine on 64.

A new version is in the works but for now just use
https://bitbucket.org/Scoby/sbcomb/downloads/sbcomb-0.6.tar.xz

If there is any problems please report.

9arkb0y
Apprentice
Posts: 12
Joined: 08 Jan 2014, 13:49

Re: sb combiner

Postby 9arkb0y » 11 Jan 2014, 13:40

ok, i copied the script to /usr/bin/
and now can run in terminal but im a little confuse about how to convert changes.fs4 to xxxx.sb i tried diferents ways like sbcomb -h examples said but always get this message

Code: Select all

Only *.sb files allowed! xxxx.sb was passed as parameter.
Or the file may not exist at all?


can you post a example how you convert your changes.fs4 to xxxx.sb

thankx.

pd:xxxx.sb is any name

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 11 Jan 2014, 17:25

9arkb0y wrote:ok, i copied the script to /usr/bin/
and now can run in terminal but im a little confuse about how to convert changes.fs4 to xxxx.sb i tried diferents ways like sbcomb -h examples said but always get this message

Code: Select all

Only *.sb files allowed! xxxx.sb was passed as parameter.
Or the file may not exist at all?



No problems,

sbcomb doesnt support naming of outfile.
If you do sbcomb --savefile changes.fs4 xxxx.sb
its interpreted as you want to combine savefile with already existing squashfile xxxx.sb
into a new squash file that will be named changes_xxxx.sb

If you just want to turn savefile into a squashfile then do
sbcomb --savefile changes.fs4
and the result will be a squash file named changes.sb

Then of course you can rename it to whatever you want
mv changes.sb xxxx.sb

9arkb0y
Apprentice
Posts: 12
Joined: 08 Jan 2014, 13:49

Re: sb combiner

Postby 9arkb0y » 11 Jan 2014, 21:08

works great!
1000 thankx!!

john3voltas
Expert
Posts: 266
Joined: 19 May 2013, 21:53

Re: sb combiner

Postby john3voltas » 23 Mar 2014, 18:51

What exactly is the proper way to use sbcomb to convert changes.fs4 to changes.sb?
For instance, I tried to:
a) boot a new vanila frugal alphaOS 14.5 x64 without savefile
b) then did a couple of changes (conky/tint2 fine tuning) and added a couple of packages with pacman
c) then without rebooting I created a savefile
d) then without rebooting I ran sbcomb to convert the changes.fs4 to changes.sb
e) then I moved changes.sb to the modules folder
f) then I rebooted
The system seemed to boot fine up until loading Xorg. Then I got a black screen with a mouse cursor and that's it, nothing else worked.
I had to reboot and remove changes.sb from modules and then it all worked properly again.

So, I've got many questions:
- Should I have rebooted after c) to allow for changes to be written to the changes.fs4 file and only after that should I run sbcomb?
- Imagine that it worked fine. After f) the system boots with changes.sb and changes fs4 both at the same time. Is that ok?
- When I ran c) it created a savefile which is supposedly "opened" from thereon, right? If so, is it ok to run sbcomb on a changes.fs4 file that is in open state? Or is it (changes.fs4) in fact closed all the time and is only opened when I shutdown/reboot? If so, I could be sbcombing a changes.fs4 that still doesn't have all the changes that I've made since last bootup, right?

Sorry for all these questions, Scooby.
And thanks in advance. :)

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 23 Mar 2014, 19:31

john3voltas wrote:a) boot a new vanila frugal alphaOS 14.5 x64 without savefile
b) then did a couple of changes (conky/tint2 fine tuning) and added a couple of packages with pacman
c) then without rebooting I created a savefile
d) then without rebooting I ran sbcomb to convert the changes.fs4 to changes.sb
e) then I moved changes.sb to the modules folder
f) then I rebooted
The system seemed to boot fine up until loading Xorg. Then I got a black screen with a mouse cursor and that's it, nothing else worked.
I had to reboot and remove changes.sb from modules and then it all worked properly again.

The problem with the above is that the first time you create savefile it is not mounted writable at the top-layer in AUFS
In fact it is not mounted at all untill you do reboot/poweroff so what you did should have been a empty changes.sb

The first time you create savefile, when you do reboot/poweroff changes.fs4 is mounted then data is copied from
/mnt/live/memory/changes (which is a tmpfs residing in ram) to changes.fs4. On next startup savefile will be mounted
at /mnt/live/memory/changes.


john3voltas wrote:- Should I have rebooted after c) to allow for changes to be written to the changes.fs4 file and only after that should I run sbcomb?

yes or you could have squashed the data in /mnt/live/memory/changes like

Code: Select all

cd /mnt/live/memory/changes
mkdir /tmp/john3voltas
cp -r {etc,root,usr,home} /tmp/john3voltas
sbcomb -m /tmp/john3voltas


This is foxed from a function I use in my .bashrc see here
viewtopic.php?f=6&t=1038&start=10#p2539

john3voltas wrote:- Imagine that it worked fine. After f) the system boots with changes.sb and changes fs4 both at the same time. Is that ok?

Yes since savefile is always the top-layer of aufs, it would be visible. And since every file in changes.sb also exists in changes.fs4
The ones in changes.fs4 would shadow over the ones in changes.sb and be the one's visible in system.

You could boot with fresh to not load savefile,

john3voltas wrote:is it ok to run sbcomb on a changes.fs4 file that is in open state?

Yeah, I'ts ok

john3voltas wrote:Or is it (changes.fs4) in fact closed all the time and is only opened when I shutdown/reboot? If so, I could be sbcombing a changes.fs4 that still doesn't have all the changes that I've made since last bootup, right?

Yeah thats what you did above.

I list three scenarios

1.) savefile created in current session.
changes.fs4 mounted at reboot/poweroff and data is copied over from RAM /mnt/live/memory/changes
Not good to sbcomb changes.fs4 here

2.) Boot with savefile, this is the usual way
changes.fs4 mounted at /mnt/live/memory/changes in write mode and then added to aufs top-layer.
Every change you make is instantly written to changes.fs4
OK to sbcomb changes.fs4 at any time

3.) boot with boot code USBMODE and savefile
savefile is mounted at /mnt/live/memory/bundles/changes.fs4 (writable) at boot time and
is added in readonly mode at the second highest layer in AUFS.
At poweroff/reboot data is copied over from RAM /mnt/live/memory/changes to
/mnt/live/memory/bundles/changes.fs4
Not good to sbcomb changes.fs4 here

This is not always so easy to explain, If got more questions, keep em comin.

john3voltas
Expert
Posts: 266
Joined: 19 May 2013, 21:53

Re: sb combiner

Postby john3voltas » 23 Mar 2014, 23:11

Scooby, you're great because I asked maybe 20 questions and you answered all 20 of them.
Usually people forget to answer stuff because it will need a big post to answer everything.
Now I'm starting to understand how it all works in the backstage.
Thanks a bunch mate.
Cheers


Return to “Scripting and Programming”

Who is online

Users browsing this forum: No registered users and 1 guest

cron