Welcome
Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

Refracta installer and snapshot used on other distros

Stuff that has not yet gone into the official build.

Re: Refracta installer and snapshot used on other distros

Postby fsmithred » Mon Mar 16, 2015 12:22 am

Latest versions of refractasnapshot.
http://sourceforge.net/projects/refract ... b/download
http://sourceforge.net/projects/refract ... b/download

It's best not to mix different versions of -base and -gui packages, because there may be changes in the config file that don't match the version of -gui. 9.1.2 and 9.1.6 are too far away from each other.

And I just noticed that the change in the code that looks for isohdpfx.bin didn't make it into the -base package. I'll fix that in a few minutes, but the latest gui package will work.

Edit: Fixed link for -base package above so it points to the corrected version.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Refracta installer and snapshot used on other distros

Postby greenjeans » Tue Sep 06, 2016 11:08 pm

Hey guys, first post here, wanted to post a quick note to say huge thanks and kudos for refractasnapshot and installer!! Let me know where and i'll send ya some beer money. ;)

Used both on a Devuan install with the Mate desktop (i386), also had to install yad manually as it's not currently in the Devuan repo. Only problem I had was I couldn't seem to find a list of dependencies, so I dpkg'ed and used the error list. :mrgreen:

On the install the only issue I ran into, was if I unchecked the "disable autologin" box during install, it basically broke the install, possibly a conflict with slim somewhere, it would start x but only give a blackscreen, no input of any kind was possible so no dropping back to terminal, no shutdown etc. I could get it to boot in recovery mode and start x but only for the root account and no ability to logout from there and login to the user account.

No biggie, works great as long as you don't uncheck that box, but maybe a stern warning about it in the dialog might be good.

Cheers!
~greenjeans
http://www.mrgreenjeans.net/opensource
Devuan-mate-minimal hybrid-iso, made with Refractasnapshot.
User avatar
greenjeans
 
Posts: 68
Joined: Tue Sep 06, 2016 10:57 pm
Location: inna woods

Re: Refracta installer and snapshot used on other distros

Postby fsmithred » Wed Sep 07, 2016 4:18 am

An even easier way to deal with the missing dependencies is:
Code: Select all
dpkg -i refracta*.deb
apt-get -f install
Except for yad, they all come from the main repo. If you can't get yad, you can use the cli script.

Sorry about the slim problem. If you happen to install it again, please run in debug mode, and let me see the error log.
Code: Select all
refractainstaller-yad -d
or
refractainstaller -d


Error log is /var/log/refractainstaller_error.log. Worth checking it even if you didn't run in debug.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Refracta installer and snapshot used on other distros

Postby greenjeans » Wed Sep 07, 2016 8:36 pm

fsmithred wrote:An even easier way to deal with the missing dependencies is:
Code: Select all
dpkg -i refracta*.deb
apt-get -f install
Except for yad, they all come from the main repo. If you can't get yad, you can use the cli script.

Sorry about the slim problem. If you happen to install it again, please run in debug mode, and let me see the error log.
Code: Select all
refractainstaller-yad -d
or
refractainstaller -d


Error log is /var/log/refractainstaller_error.log. Worth checking it even if you didn't run in debug.


Great info, thanks! Yeah, I figured there was probably an easier way to get the dependencies, but i'm not a real coder by any stretch of the imagination, no formal training or anything, almost 7 years using linux and i'm still learning and just barely scratching the surface of all there is to know, thanks for bearing with me.

I started a "build" partition a couple days ago, did a netinstall of Devuan+mate, and did a hard stripdown to just the bare essentials, added snapshot and installer and depends, and ran a test iso last night using xz, and got a 410 mb iso. I got some conflicting numbers regarding what I had leftover after stripping it down in the partition, folder properties and mate monitor were showing me 1.2 gigs, but others showed me 1.3 gigs which would explain my next question, but I remember from a few years ago when I was doing this that 1.2 gb usually got me around a 350 mb iso using xz, this was with the old Mandriva/Pclinuxos mylivecd script so I don't know if it's even comparable, but does that sound about right size-wise?

Might there be some variables in squashfs or xz that I could look into to reduce size further? I looked through the snapshot log but didn't see anything that looked out of the ordinary, but again my knowledge is limited.

The slim thing is kinda strange, I actually tried Refracta too when I first tried Devuan, but had the same problem occur trying to boot the livecd, don't know if it had anything to do with slim, and both issues could just be my machine which is older and pretty low spec.

I'll be doing some test installs later today and will give it a go in debug mode and post the log.

Gonna try to find a place I can upload some iso's for testing if you're interested in checking them out, snapshot is an awesome tool, and the installer is seriously a breath of fresh air after sitting through a couple of hour-long Debian installs, Refractainstaller takes about 5-10 minutes and it's up and running. :D
http://www.mrgreenjeans.net/opensource
Devuan-mate-minimal hybrid-iso, made with Refractasnapshot.
User avatar
greenjeans
 
Posts: 68
Joined: Tue Sep 06, 2016 10:57 pm
Location: inna woods

Re: Refracta installer and snapshot used on other distros

Postby fsmithred » Thu Sep 08, 2016 4:56 pm

The sizes sound about right. I'm not really sure, because I always keep the copy of the file system in the work dir and a couple of snaphots. So my total used space is misleading. I don't think you can compress it any more than it is.

The thing that would probably make the most difference in size would be to install and run localepurge to get rid of any locales you won't be using. See this discussion -
refracta-8-jessie-based-on-devuan-t529-40.html#p5595

Also, too late if you didn't already do it, set apt so it does not install Recommends.
Create (/)etc/apt/apt.conf.d/00norecommends with the following content:
Code: Select all
APT::Install-Recommends "no";
APT::Install-Suggests "no";


Other commands that might help you:
Code: Select all
aptitude -s install <some packages>
apt-get autoremove     
aptitude search ~c       # shows you removed packages that left behind config files.
aptitude purge ~c         # removes those leftover configs
deborphan
aptitude why <package>
aptitude show <package>
apt-cache depends <package>
apt-cache rdepends <package>
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Refracta installer and snapshot used on other distros

Postby greenjeans » Thu Sep 08, 2016 7:19 pm

Perfect, I forgot about deborphan and some of those other commands I didn't know at all. I did see the other thread and read quite a bit as it's along the lines of what i'm trying to do, so after I posted yesterday I spent a couple of hours learning more about xz and mksquashfs, and I did come up with some answers and one partial solution that helped me cut size down about 3% or so, it's not much, dropped my iso size down from 410 to 398.5, but may help on the larger iso's you're working on, forgive me if you already know this stuff but here it is:

Xz does have variable compression levels, they are numbered 1-9 with 9 being the highest (most) compression level, and if you are using xz just standalone to compress something, you can add the option of choosing compression level, - <1-9>, the default setting is 6.

The problem is that when used inside mksquashfs, you can't use xz options (unless there is some way to "nest" options, but the mksquashfs man page says you can't), so you are stuck with the default setting of 6.

But there are a couple of options that mksquashfs has when using xz, the "Xdict-size -<dictionary-size> option, but this didn't do much as you can only set it to a maximum of 100% of block size, and I don't know if you can increase block size? In practice, setting it to 75% gave me the exact same size iso (410 mb) and setting it to 100% only made the size a fraction smaller, 408.9 mb.

The other option did some good though, it's : -Xbcj <filter> , "filter" referring to the achitecture you're compressing for, x86, arm, etc. It says in the man page that it then optimizes it basically and gives you "the best compression", that doesn't mean the most compression because I know it can go smaller, so I guess they use the term to express some arbitrary balance of factors.

So I edited Refractasnapshot.conf on the line you uncomment to enable xz, here is what mine reads now:

Code: Select all
mksq_opt="-comp xz -Xbcj x86"


And this got me the reduction I mentioned above, about 3%, but that's roughly 30 mb or better uncompressed, on a full size iso that you're trying to keep under 700 mb that's 20 mb or better compressed and possibly 60mb or more uncompressed, might be enough to make a difference.

I tried using both options together, but got no further reduction doing so, so I dropped the Xdict-size option.

I don't see any other way of getting xz off of that level 6 default other than re-compiling from source and changing it, although that might not be a big deal for somebody who's familiar with the process, i'm not myself (yet) or I would do it, never did learn how to package either and I know that's even easier so I need to get to that soon too.



fsmithred wrote:The sizes sound about right. I'm not really sure, because I always keep the copy of the file system in the work dir and a couple of snaphots. So my total used space is misleading. I don't think you can compress it any more than it is.

The thing that would probably make the most difference in size would be to install and run localepurge to get rid of any locales you won't be using. See this discussion -
refracta-8-jessie-based-on-devuan-t529-40.html#p5595

Also, too late if you didn't already do it, set apt so it does not install Recommends.
Create (/)etc/apt/apt.conf.d/00norecommends with the following content:
Code: Select all
APT::Install-Recommends "no";
APT::Install-Suggests "no";


Other commands that might help you:
Code: Select all
aptitude -s install <some packages>
apt-get autoremove     
aptitude search ~c       # shows you removed packages that left behind config files.
aptitude purge ~c         # removes those leftover configs
deborphan
aptitude why <package>
aptitude show <package>
apt-cache depends <package>
apt-cache rdepends <package>
http://www.mrgreenjeans.net/opensource
Devuan-mate-minimal hybrid-iso, made with Refractasnapshot.
User avatar
greenjeans
 
Posts: 68
Joined: Tue Sep 06, 2016 10:57 pm
Location: inna woods

Re: Refracta installer and snapshot used on other distros

Postby fsmithred » Sun Sep 11, 2016 11:54 am

Code: Select all
mksq_opt="-comp xz -Xbcj x86"


Thanks for that! It knocked 14MB off an iso, and that's pretty significant when we're trying to fit on a CD.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Refracta installer and snapshot used on other distros

Postby greenjeans » Tue Sep 13, 2016 11:16 pm

fsmithred wrote:
Code: Select all
mksq_opt="-comp xz -Xbcj x86"


Thanks for that! It knocked 14MB off an iso, and that's pretty significant when we're trying to fit on a CD.


Sweet, every little bit helps!

So I kinda figured out the slim thing but no elegant solution.

When you uncheck the boxes on the installer so you can autologin, it seems like it's uncommenting the default username and autologin lines in slim.conf as it should and checking yes for autologin (I need to go back and verify that yet, I added an 'else' command at one point that most definitely resulted in an uncomment-and-give-yes for autologin).

But the problem is that it's not changing the old username to the new one , it's leaving whatever was there to start with, so when you do an install if you change the username then the system tries on first boot to log you into an account that doesn't exist anymore, and you get black screen.

The refractainstaller-yad script does access and write the autologin info early in the script (around line 300 or so) if you leave the box checked to disable autologin, basically just re-writing those lines with a comment hash in front of them, and that works fine.

But the actual re-naming of the new user comes later in the script, so you couldn't even re-write with the new user name ($newname) to slim.conf at the same time autologin is written, because it hasn't been done yet. Would have to come after setting the new user name. Maybe even in post-install? A time-out, open slim.conf with text editor, with dialog box that prompts to edit the config file?

The easy shortcut to avoid this of course is setting whatever username you intend to use in slim.conf before you run snapshot to make an installable iso. But that's not too elegant, and it's upstream so to speak, any new input to the slim program might wipe out your custom slim.conf at some point, seems better to edit the script to do it, so it will always re-write properly whatever input is given it.

Wish I were better at bash, i'd already have the fix, any ideas and i'll be happy to test them.
http://www.mrgreenjeans.net/opensource
Devuan-mate-minimal hybrid-iso, made with Refractasnapshot.
User avatar
greenjeans
 
Posts: 68
Joined: Tue Sep 06, 2016 10:57 pm
Location: inna woods

Re: Refracta installer and snapshot used on other distros

Postby fsmithred » Wed Sep 14, 2016 1:23 am

Thanks for diagnosing the bug. Pretty sure I can fix that. Just search the dm's config file for the old name and replace it with the new. I'd do that on /target, along with the other files that get the new username.


More data on squashing. I timed both methods. Exact same system, different compressions. I actually didn't know it was taking me an hour to make a snapshot. Never timed it before. Smaller is slower, once again. I'll be moving the builds to a faster machine. (currently on 10yo athlon-X2 2GHz.)

Code: Select all
compression: mksq_opt="-comp xz"

size   639MB
real   60m28.951s
user   28m55.612s
sys   3m47.704s


compression: mksq_opt="-comp xz -Xbcj x86"

size   624MB
real   140m27.322s
user   56m52.100s
sys   6m7.188s
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

Re: Refracta installer and snapshot used on other distros

Postby fsmithred » Wed Sep 14, 2016 4:57 pm

Not as easy as I expected. I think I fixed the autologin with a new name problem, and maybe another problem, too. I fixed autologin to desktop, but it wouldn't work in the installation. Apparently, you have to have autologin to console working, and that wasn't working, because /lib/live/config/0160-sysvinit was not running. That's the script that changes the getty lines in (/)etc/inittab. It looks for the package, sysvinit, which no longer exists. So I made a new script, 0161-sysvinit-core, that does the same thing if sysvinit-core is installed. I hope that's the right way to do it. It works here.

0161-sysvinit-core Copy this file to /lib/live/config/ before you make the snapshot. Make sure it's executable.
https://gist.github.com/fsmithred/3157a ... 7e5062da9f

refractainstaller-yad-username Run this one instead of refractainstaller-yad. You can replace /usr/bin/refractainstaller-yad with this one, if you want, or just run it from your home or anywhere in root's path. I'll put the changes in the next release of refractainstaller-gui.
I didn't test it with slim, but I think it will work. It does work with lightdm.
https://gist.github.com/fsmithred/967e1 ... 53759b0a05

Run it with the -d option, in case there are problems. Then there will be lots of information in the error log. Let me know how it works for you.
User avatar
fsmithred
 
Posts: 2101
Joined: Wed Mar 09, 2011 9:13 pm

PreviousNext

Return to Experimental

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred