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

Closed
opened 2017-02-12 16:22:40 +00:00 by oberon · 25 comments
oberon commented 2017-02-12 16:22:40 +00:00 (Migrated from gitlab2.manjaro.org)

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.

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 commented 2017-02-12 16:35:16 +00:00 (Migrated from gitlab2.manjaro.org)

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?

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 commented 2017-02-12 16:46:25 +00:00 (Migrated from gitlab2.manjaro.org)

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.

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 commented 2017-02-12 16:46:55 +00:00 (Migrated from gitlab2.manjaro.org)

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

Root has no password you did not crate any users fstab was not generated
oberon commented 2017-02-12 16:59:47 +00:00 (Migrated from gitlab2.manjaro.org)

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 ;)

> 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 commented 2017-02-12 17:05:08 +00:00 (Migrated from gitlab2.manjaro.org)

Weird. For me it recognizes the already installed base.

Weird. For me it recognizes the already installed base.
oberon commented 2017-02-15 18:40:26 +00:00 (Migrated from gitlab2.manjaro.org)

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!

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 commented 2017-02-15 22:36:43 +00:00 (Migrated from gitlab2.manjaro.org)

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

It is possible, but if you chose skip/none then it was not formatted. Skip/none does not format, everything else does.
Chrysostomus commented 2017-02-15 22:42:01 +00:00 (Migrated from gitlab2.manjaro.org)

But how would we check if warning is needed?

But how would we check if warning is needed?
oberon commented 2017-02-15 22:46:04 +00:00 (Migrated from gitlab2.manjaro.org)

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

I'll think about it and will propose something... - need to dive into the code a little more still ... :wink:
oberon commented 2017-02-16 22:04:28 +00:00 (Migrated from gitlab2.manjaro.org)

I just added it to the existing feedback 😃

⚠️

I just added it to the existing feedback :smiley: ![](http://imgur.com/UvycAY0.png) :warning:
Chrysostomus commented 2017-02-16 23:25:58 +00:00 (Migrated from gitlab2.manjaro.org)

Nice. Informative and unintrusive.

Nice. Informative and unintrusive.
Chrysostomus commented 2017-02-27 02:06:32 +00:00 (Migrated from gitlab2.manjaro.org)

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

We should also check if locales have been generated. Failure to do so breaks stuff like tmux.
Chrysostomus commented 2017-02-27 02:10:40 +00:00 (Migrated from gitlab2.manjaro.org)

Things to check:

  1. base
  2. bootloader
  3. mkinitcpio
  4. root password
  5. users
  6. locales
  7. fstab
Things to check: 1) base 2) bootloader 3) mkinitcpio 4) root password 5) users 6) locales 7) fstab
oberon commented 2017-02-27 09:46:45 +00:00 (Migrated from gitlab2.manjaro.org)

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

Also we should clean up all those temp files ... :wink:
Chrysostomus commented 2017-02-27 11:27:31 +00:00 (Migrated from gitlab2.manjaro.org)

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?

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 commented 2017-02-27 11:36:21 +00:00 (Migrated from gitlab2.manjaro.org)

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

My idea is: When quitting installer, if ${CHECKLIST} is not empty, display it as a part of the "Close installer?"-dialog
Chrysostomus commented 2017-02-27 17:26:06 +00:00 (Migrated from gitlab2.manjaro.org)

There is now rudimentary final_check function implemented

There is now rudimentary final_check function implemented
oberon commented 2017-03-04 20:23:50 +00:00 (Migrated from gitlab2.manjaro.org)

quite satisfying for now I would say :)

quite satisfying for now I would say :)
oberon commented 2017-03-08 23:30:03 +00:00 (Migrated from gitlab2.manjaro.org)

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

Should we also check if a video-driver has been installed - since it will leave the target unbootable to desktop if not?
oberon commented 2017-03-10 19:59:54 +00:00 (Migrated from gitlab2.manjaro.org)

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... ?

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 commented 2017-03-10 23:32:55 +00:00 (Migrated from gitlab2.manjaro.org)

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

I don't know, there are also valid reasons for not installing any driver... Need to look into It further
oberon commented 2017-03-11 00:41:00 +00:00 (Migrated from gitlab2.manjaro.org)

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?

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 :wink: 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 commented 2017-03-11 00:42:13 +00:00 (Migrated from gitlab2.manjaro.org)

Touch it only if mhwd command is successful? & &

Touch it only if mhwd command is successful? & &
oberon commented 2017-03-11 00:56:51 +00:00 (Migrated from gitlab2.manjaro.org)

yes. something like that.

yes. something like that.
oberon commented 2017-03-11 18:51:41 +00:00 (Migrated from gitlab2.manjaro.org)

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.

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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
applications/manjaro-architect#22
No description provided.