Refracta Development, Scripts, etc.
Post a reply

Re: Refracta Installer on Debian Distro - Makululinux

Wed Nov 20, 2013 10:54 am

Someone might want to refer to that list when they're entering a disk label for fstab, which happens later in the installation process. In this latest version (9.0.9beta4) the terminal has been replaced with a yad text-info window that has a "Close window" button. (Looks like I forgot to do it in the zenity version.)

Re: Refracta Installer on Debian Distro - Makululinux

Thu Nov 21, 2013 3:07 am

Code:
#!/usr/bin/env bash
# loc-timezn.sh



if  [[ $DISPLAY ]] ; then
   chroot /target dpkg-reconfigure -fgnome tzdata || chroot /target dpkg-reconfigure tzdata
   chroot /target dpkg-reconfigure -fgnome locales || chroot /target dpkg-reconfigure locales
#   chroot /target dpkg-reconfigure -fgnome tzdata || chroot /target dpkg-reconfigure keyboard-configuration
else
   echo -e "\n\tSet time zone and locales.\n"
   sleep 2
   chroot /target dpkg-reconfigure tzdata
   chroot /target dpkg-reconfigure locales
#   chroot /target dpkg-reconfigure keyboard-configuration
fi




exit 0

I can't get that to work. The installer freezes and debconf gets locked in the chroot by an open process which can't complete.

The chroot's gnome-frontend can't use the display. Then it switches to dialog and can't use that either because (gui installer) there's no terminal

It only works here like this (or similar):

Code:
x-terminal-emulator -title "Refracta Installer" -e "chroot /target dpkg-reconfigure tzdata"


The installer desktop icon was successfully removed.

Re: Refracta Installer on Debian Distro - Makululinux

Thu Nov 21, 2013 8:49 am

ok, after i installed the latest beta debs, my installer crashes right after i select install mode... all windows just close :(

this wouldnt be because i ticked "run in terminal" ?

Re: Refracta Installer on Debian Distro - Makululinux

Thu Nov 21, 2013 10:18 am

Let's make sure we're all on the same page.
md5sums:
Code:
1f5e062bfcc1e8d15eee18a8078bc5a5  refractainstaller-base_9.0.9beta4_all.deb
0bda29eda3266f4572e0976bf064bf14  refractainstaller-gui_9.0.9beta4_all.deb

Re: Refracta Installer on Debian Distro - Makululinux

Thu Nov 21, 2013 12:38 pm

md5sums match here.

I just did a successful (live-usb sid mix, no virtualbox) install with a postinst script like I said

installer crashes right after i select install mode... all windows just close

what is "install mode"?

/usr/share//applications/refractainstaller.desktop incudes "Terminal=false" (unless changed manually, most users would just click from the menu)

Re: Refracta Installer on Debian Distro - Makululinux

Thu Nov 21, 2013 3:55 pm

Don't worry about the terminal setting in the desktop file. I changed the wrapper script, so it always starts in a terminal, and I did away with the xterms that were scattered throughout the script.

Added pre-install scripts and put loc-timezn.sh in there. No problems running it before the install (no chroot needed and makes it like most other installers I've used.)

Also removed refractainstaller_config function, so now the gui scripts require the config file.

Testing the yad script now (again). First time I used simple install and mke2fs threw an error, claiming that sda1 was in use. I exited, checked it out, it was not in use. Ran it again, hit "Continue" on the error window, and it installed successfully. This last time, I used expert install and didn't get the error. Can't see a reason why that would make a difference.

Anyway, I'll upload beta5 if this last test works. I didn't test the zenity script, but it should be ok.

Take that back - still have to change a few things, like un-redirect error messages when it asks you for new password.

Re: Refracta Installer on Debian Distro - Makululinux

Thu Nov 21, 2013 5:09 pm

beta5 - http://distro.ibiblio.org/refracta/files/Testing/

It seems to be working. Partially tested the zenity script. Tested yad again with simple install, and got no error.

Pre and post install scripts are working, but you have to enable them in the config file first.

Re: Refracta Installer on Debian Distro - Makululinux

Thu Nov 21, 2013 8:17 pm

Thanks fsmithred for all your work on this. The pre- and post-install stuff now works fine! This is the best installer yet.

I note the terminal is now always there. I like that, it's also a status window. Lets you know it's doing it's stuff whether or not you actually understand or want to understand the details.

Would be nice to see instead of just "Terminal" as a title, e.g. "Installer Terminal.. Do not close this window".

My preference (only) is actually the traditional way to do dpkg-reconfigure.

Wishlist : sack the sudoers nano window.. sudo is simple to automate, allowing it (if one really must) by group
Code:
chroot /target usermod -a -G sudo $user

In sudoers (it might already be there):
Code:
# Allow members of group sudo to execute any command
%sudo  ALL=(ALL:ALL) ALL

Re: Refracta Installer on Debian Distro - Makululinux

Fri Nov 22, 2013 4:57 pm

Beta 5 installer crashes, ( closes just as its about to start copying files ) this is from the error log :

(zenity:3624): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:19: Theming engine 'adwaita' not found

Current default time zone: 'Africa/Johannesburg'
Local time is now: Fri Nov 22 18:53:07 SAST 2013.
Universal Time is now: Fri Nov 22 16:53:07 UTC 2013.


(zenity:3704): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:19: Theming engine 'adwaita' not found

(zenity:3876): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:19: Theming engine 'adwaita' not found

(zenity:3882): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:19: Theming engine 'adwaita' not found

(zenity:3882): GLib-WARNING **: /build/glib2.0-Ot8bbC/glib2.0-2.36.4/./glib/giounix.c:412Error while getting flags for FD: Bad file descriptor (9)


(zenity:3883): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:19: Theming engine 'adwaita' not found
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
mke2fs 1.42.8 (20-Jun-2013)
/usr/bin/refractainstaller-gui: line 1403: syntax error: unexpected end of file


any idea how to fix it ?

Re: Refracta Installer on Debian Distro - Makululinux

Fri Nov 22, 2013 5:21 pm

Add "fi" to line 975. Sorry about that.
Code:
nano +975 /usr/bin/refractainstaller-gui


That section should look like this, but the final fi was missing.
Code:
# make mount point for separate /boot if needed
# and add /boot/* to the excludes list if it's not already there
# allow default for reserved blocks (don't need tune2fs here)
if [[ -n $boot_dev ]] ; then
    mkdir /target_boot ; check_exit
    if [[ $no_format != "yes" ]]; then
      mke2fs -t $fs_type_boot $boot_dev ; check_exit
    fi
    mount $boot_dev /target_boot
    sep_boot_opt="--exclude=/boot/*"
fi


And while you're in there, you might want to add an ampersand at the end of line 470, like this:
Code:
blkid -c /dev/null | zenity --text-info --title="Partition List" --text="Partition list (for reference.)  You may need this later." \
--width 820 --height 400 &


Edit: Or, you could download the deb file again, I just fixed and uploaded it without changing the version number. (Yeah, not a great thing to do, but it's quick). Just the beta5 gui package is changed.
Post a reply