Refracta Development, Scripts, etc.
Post a reply

Can't change host name with refractainstaller

Sat May 10, 2014 1:50 am

This is the only thing in the installer that doesn't work. My configuration is debian testing (jessie works great). When the installer gets to where i can change the host name. It lets me know of illegal names. It doesn't matter what i type in; it's all illegal according to it. It would complain if even typed "arf".

Another thing i believe should be added to the expert install portion aside from changing the host name is also being able to change the domain.

Is this something i can take care of with the current refracta installer?

Re: Can't change host name with refractainstaller

Sat May 10, 2014 10:52 am

Which version of the installer are you using? For jessie/sid, you should be using 9.1.0.
http://distro.ibiblio.org/refracta/files/Testing/

There's nothing in the script to handle domain name. My installations always get the correct domain name from the router. I'm not sure how debian does that.

Re: Can't change host name with refractainstaller

Sat May 10, 2014 8:28 pm

Thanks for pointing out newer versions of these tools. I'll test it out and respin my isos with it.

Re: Can't change host name with refractainstaller

Sun May 11, 2014 1:49 am

I'm back, i had fun. I've tested refractasnapshot 9.1.0 and refractainstaller 9.1.0

Refractasnapshot leads to confusing entries in the live grub menu (entries that aren't descriptive whereas they were in 9.0.9-7; boot ro ram etc. kind of descriptors). The descriptors are there; however boot to ram, or default boot, etc is overpowered by gnu/linux and the kernel version. A good example would be the default install line “gnu/linux 3.13-1-amd64 (d”, and all is the same down through the boot option line with (t, (n, (l, (n. I'll be falling back to previous version (the previous version i didn't have to edit the boot menu everytime since the defaults boot menu wording was great).

Refractainstaller has a few things to it.The first thing i can nitpick about the new installer is when it comes time to change passwords in expert install. It gave me no indication which password i was changing first, or which i was changing second, whether it be the root or user, or user then root. Apparently it's asking for the root password to be changed first and the user second. Other than this nitpick, expert install is flawless.

Simple install is a different story. It works fine up until it says it's setting up swap. And then it just sits there with the last thing in terminal being mentioned setting up swap. No indication that the install has finished (I tried to replicate this in expert install by not specifying a swap partition, but expert install didn't hang on creation of a swap file). Also no prompt for changing user and root passwords. I chose to reboot and see (after i saw for a while that the hard drive light was not lighting up for a while) if i could get into a working system. And i was able to boot into an installed system with some boot up errors (a finished installation didn't have these errors that otherwise still lead to a working system). I took a look at the partition i installed too. No swap. The installer on simple install just hangs on swap creation. And of course with that hang, there was no prompt for username or password changing of any kind. I suspect if the installer didn't hang at swap creation in simple install, that it would have gotten to the next part of it's job asking for user name creation and user and root password changing.

The new installer improved on so many areas i never thought about that it would include like localization and time. Also, it does indeed successfully change the host name.

I liked the inclusion of disabling sudo. On my distribution sudo i have disabled entirely since it's a requirement for the very handy gksu program. I delete the sudoers file and it doesn't rear it's head anywhere, but that turns sudo into sort of a false positive for the installer. I just click disable sudo, however, clicking enable sudo on my distro still leaves it non-functional since the installer apparently relies on an existing sudoers file to be present. This is fine by me. However, I believe the sudo question should be asked whether to enable or disable it if the installer is ready to create a newly configured sudoers file on demand if enable sudo is selected. On the expert install side of things, have an option in expert install called “no sudo”. If no sudo isn't selected, then the prompt for enabling sudo should appear in expert install. That'll solve a good deal with those of us who will be using mostly expert install to have a choice before hand.

Re: Can't change host name with refractainstaller

Sun May 11, 2014 3:26 am

Thanks for testing and reporting. We can't find all the bugs by ourselves.

The distribution name in the boot menu should automatically be Refracta if etc/issue contains "Refracta" or else it will default to lsb_release (Debian) or else it'll be whatever you type in when a text entry box pops up that says, "This is the distribution name that will appear in the boot menu
for the live image. If it's blank, the menu entries will just say
GNU/Linux (kernel-version)"

I see that default entry text is blank in that window, and it shouldn't be. There's a typo on line 550 of /usr/bin/refractasnapshot-gui. A space needs to be added between the last double-quote and the backslash at the end of the line. Change this:
Code:
\"GNU/Linux (kernel-version)\" "\
to this
Code:
\"GNU/Linux (kernel-version)\" " \
to fix it. If you don't want to do that, then type in a name when it asks.

Simple install does not give you the option to change user name, and I think it does not ask for new passwords. I haven't done a simple install in a long time. I'll have to run it and see what it does and if I have a problem with the creation of the swap file. Please check /var/log/refractainstaller_errors.log for any error messages.
The sudo question is handled better in code that dzz wrote, but it hasn't been incorporated into the installer yet.
There should be text in the password entry boxes to tell you if it wants a new root or new user password. I'll make sure that's clear in the next version. (I think maybe dzz's code already did that.)

Re: Can't change host name with refractainstaller

Mon May 12, 2014 1:05 am

I added that fix to line 550 of refractasnapshot-gui in usr. It still did the same thing as last with being hard to tell what each boot menu entry was starting out with gnu/linux kernel name etc... I fell back to the older version of refractasnapshot for the mean time.

I messed around with the installer some more. I believe an entry for not using sudo should be added to expert install, as opposed to assigning a root password and then asking if sudo should be enabled or disabled shortly after.

Concerning the simple installer, using UUID for fstab should be enabled for it. This will mitigate accidentally leaving a usb drive plugged in upon booting up and needing to hit ctrl-d or fixing the boot order every time in fstab, or just needing to restart with said mass storage unplugged after a restart. As far as expert install goes, leaving as an option the way it is right now is just fine, however in my own opinion, leaving it pre-checked on the list would be best. If someone doesn't want UUID for fstab in expert mode, then they can uncheck it.

I also experimented with sudo by putting the old sudoers file back in etc. Then telling the installer to enable sudo. Worked like a charm for enabling sudo. I still opted for the sudoers file being removed in the end since that makes things confusing assigning a root password and then enabling sudo.

I would have gotten back to you sooner as I really hoped I could. But, fixing and investigating an error in lxsession lead to some pretty cool stuff. Moving debian completely over to systemd is just awesome. It's way more efficient than sysvinit (faster bootup and shutdown). Removing lightdm in favor of slim lead to a much less convoluted mess of when the screen gets locked (lightdm locks the screen, and then later xscreensaver will lock it too; slim just falls to xscreensaver for screen locking).

EDIT: forgot some tidbits. Indeed simple install doesn't ask for username or password change. Regarding expert install password change windows; that doesn't really happen unless you're talking about terminal asking for the password changes. No password change windows show up. It pops up for me in the terminal emulator. That's where i'm asked for changing passwords. Which really isn't a problem. I really like how a terminal emulator pops up when needed, and disappears when tasks are completed. It sure beat having the drive listing hanging around.

Re: Can't change host name with refractainstaller

Mon May 12, 2014 10:16 am

Don't leave the text-entry box blank when it asks for the linux distribution name. Give it a short name, so that the boot menu entries don't run off screen. This window comes up after rsync runs and before the filesystem gets squashed.

After editing line 550, it looks like this when I run it. (text-entry was blank before the edit) .

Image

Using uuid as the default in simple install is probably a good idea and should be easy to do. Having the box pre-checked on expert install might get weird if the user wants something other than uuid (like filesystem labels). I'll have to look at that - I don't remember what happens if you check both.

Password entry in terminal is gone in newer version(s) and has been replaced with a graphical entry box.

Re: Can't change host name with refractainstaller

Mon May 12, 2014 12:04 pm

Thanks shamil for testing this stuff. It generally works well already but bug-squashing and ideas for improvement are always welcome.

I agree uuid is the sensible default. The text does say "If you don't understand an option, you probably don't need it". In my latest experimental installer deviant uuid is pre-checked (also is "Disable automatic login"). It a user checks labels but forgot to uncheck uuid, labels will be used because that's what (s)he chose.. The installer already adjusts this if luks is also chosen.

You should edit sudoers to suit not remove the file, it's part of a package. Remember sudo can be used for selected commands only (what it was originally designed for?) Permitting sudo (best by adding user to group) does not necessarily mean use as default for everything, like ubuntu does. There is also sudoers.d (which live-config uses). Gksu default behaviour is set by ~.gconf/apps/gksu/%gconf.xml not if/how sudo is permitted.

You don't have to use screen lock for lightdm/xfce, I dont. Lightdm makes simple e.g. switching sessions and language without the bloat of gdm3/kdm.

Re: Can't change host name with refractainstaller

Mon May 12, 2014 11:02 pm

I was wondering what you were talking about with that name distribution box. I tried it again today. And it just doesn't pop up for me at all after fixing line 550 adding that extra space. I am using zenity with the snapshot tool for just messing around with it for now. Would zenity possibly be the cause of my problem? I'll try out yad just for the hell of it.

Re: Can't change host name with refractainstaller

Tue May 13, 2014 12:18 am

Oops! My mistake. Lines 548-551 of refractasnapshot-gui look like this in 9.1.0. It works with yad, because it calls yad. It certainly won't work with zenity.
Code:
   DISTRO=$(yad --entry --title="Linux Distribution" --text="This is the distribution name that will appear in the boot menu
for the live image. If it's blank, the menu entries will just say
\"GNU/Linux (kernel-version)\" " \
   --entry-text="$DISTRO" --width=500 --button="OK":0)


It should be this, which will work with yad or zenity:
Code:
   DISTRO=$($DIALOG --entry --title="Linux Distribution" --text="This is the distribution name that will appear in the boot menu
for the live image. If it's blank, the menu entries will just say
\"GNU/Linux (kernel-version)\" " \
   --entry-text="$DISTRO" --width=500 --${BUTTON0}="OK"${BUTTON0NUM})


Sorry about that. Thanks for sticking with it until we solved it.
Post a reply