Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation and settings need to be ckecked before the installer quits #22

Closed
oberon-manjaro opened this issue Feb 12, 2017 · 25 comments
Closed

Comments

@oberon-manjaro
Copy link
Collaborator

The installer should not just quit without complaining if something essential has been forgotten, like for example right now you can just quit after installing base and a DE but without installing a bootloader (ok, might make sense) or without having created a user or installing a video-driver ...
It's quite annoying if you have forgotten something and you have to start over again with installing base and so on. You should be warned at least in that case.

@Chrysostomus
Copy link
Owner

Yeah, warning might be good. I would not prevent quitting though, because it can be useful.

Why would you start over from beginning though? Just mount the partitions without formatting and continue from where you left?

@Chrysostomus
Copy link
Owner

I wonder if there is a way to make some kind of checklist in the main menu. Just having mention in the exit menu would be easier to code though.

Are you sure you want to quit?
You have not installed the base.
You have not installed the bootloader.
You did not install any graphical environment.

@Chrysostomus
Copy link
Owner

Root has no password
you did not crate any users
fstab was not generated

@oberon-manjaro
Copy link
Collaborator Author

Why would you start over from beginning though?

When I try that m-a will not allow me to install a DE directly. It demands to install base first. Maybe that's also something to reconsider ;)

@Chrysostomus
Copy link
Owner

Weird. For me it recognizes the already installed base.

@oberon-manjaro
Copy link
Collaborator Author

Is it possible that I destroyed the existing base install by just having it mounted as ext4??
It says "IMPORTANT: Partitions can be mounted without formatting them by selecting the "SKIP / NONE" option" If that really means that an existing parition is destroyed at that point we'd definitely add another warning during mount!

@Chrysostomus
Copy link
Owner

It is possible, but if you chose skip/none then it was not formatted. Skip/none does not format, everything else does.

@Chrysostomus
Copy link
Owner

But how would we check if warning is needed?

@oberon-manjaro
Copy link
Collaborator Author

I'll think about it and will propose something... - need to dive into the code a little more still ... 😉

oberon-manjaro pushed a commit that referenced this issue Feb 16, 2017
@oberon-manjaro
Copy link
Collaborator Author

oberon-manjaro commented Feb 16, 2017

I just added it to the existing feedback 😃

⚠️

@Chrysostomus
Copy link
Owner

Nice. Informative and unintrusive.

@Chrysostomus
Copy link
Owner

We should also check if locales have been generated. Failure to do so breaks stuff like tmux.

@Chrysostomus
Copy link
Owner

Things to check:

  1. base
  2. bootloader
  3. mkinitcpio
  4. root password
  5. users
  6. locales
  7. fstab

@oberon-manjaro
Copy link
Collaborator Author

Also we should clean up all those temp files ... 😉

@Chrysostomus
Copy link
Owner

I started to write the final check:

final_check()
{
    # Empty the list
    echo "" > ${CHECKLIST}
    # Check if base is installed
    [[ -e /mnt/etc ]] || echo "- Base is not installed" >> ${CHECKLIST}
    # Check if bootloader is installed
    [[ -e /mnt/etc ]] || echo "- Bootloader is not installed" >> ${CHECKLIST}
    # Check if fstab is generated
    [[ -e /mnt/etc/fstab ]] || echo "- Fstab has not been generated" >> ${CHECKLIST}
    # Check if locales have been generated
    [[ ]] || echo "- Locales have not been generated" >> ${CHECKLIST}
    # Check if root password has been set
    $(grep -q -e 'root:!:' -e 'root:\*:' /mnt/etc/shadow) || echo "- Root password is not set" >> ${CHECKLIST}
    # check if user account has been generated
    [[ $(ls /mnt/home) == "" ]] || echo "- No user accounts have been generated" >> ${CHECKLIST}
}

What would be good way to check if locales have been generated?

@Chrysostomus
Copy link
Owner

My idea is: When quitting installer, if ${CHECKLIST} is not empty, display it as a part of the "Close installer?"-dialog

@Chrysostomus
Copy link
Owner

There is now rudimentary final_check function implemented

@oberon-manjaro
Copy link
Collaborator Author

quite satisfying for now I would say :)

@oberon-manjaro
Copy link
Collaborator Author

oberon-manjaro commented Mar 8, 2017

Should we also check if a video-driver has been installed - since it will leave the target unbootable to desktop if not?

@oberon-manjaro oberon-manjaro reopened this Mar 8, 2017
@oberon-manjaro
Copy link
Collaborator Author

Any idea how we could do that? Do we need to touch another marker file in /mnt ?
I can't think of a way how to grep output of mhwd -li in a helpful way... ?

@Chrysostomus
Copy link
Owner

I don't know, there are also valid reasons for not installing any driver... Need to look into It further

@oberon-manjaro
Copy link
Collaborator Author

Sure you might want to install no video-driver. You'd will simply confirm when the installer exits.
The concern is more that you might have missed to install one when you wanted to 😉
touching a /mnt/.video_installed or so will work of course, although - like our .base_installed will not guarantee that installation was successful. But it would at least be some kind of a reminder and effictive in most cases.
Not perfect - but not too bad?

@Chrysostomus
Copy link
Owner

Touch it only if mhwd command is successful? & &

@oberon-manjaro
Copy link
Collaborator Author

yes. something like that.

@oberon-manjaro
Copy link
Collaborator Author

I've just added it after the check_for_error functions, so nothing should be touched when error check aborts.
Added to final check now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants