Auto_Install_Index not honored in dietpi.txt

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
maelcum

Auto_Install_Index not honored in dietpi.txt

Post by maelcum »

Hello,

trying to automate the installation of vim during the initial setup, the option to install VIMFULL was set along with the AUTO_Install_Index-Trigger/Flag.

Code: Select all

root@dietpi:~# sed -n '/^AUTO_Install/p;/VIM/p' /DietPi/dietpi.txt
AUTO_Install_Index=1
AUTO_DietpiSoftware_Install_VIMFULL=1
AUTO_DietpiSoftware_Install_VIMTINY=0
It was expected that VIM would have been installed. Unfortunately, that did not work. No vim (neither tiny nor full, not even vi) was installed.

Code: Select all

root@dietpi:/DietPi/dietpi# vi dietpi-config 
-bash: vi: command not found

root@dietpi:/DietPi/dietpi# vim dietpi-config
-bash: vim: command not found

root@dietpi:/DietPi/dietpi# apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libgpm2 vim-common vim-runtime
Suggested packages:
  gpm ctags vim-doc vim-scripts
The following NEW packages will be installed:
  libgpm2 vim vim-common vim-runtime
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 6076 kB of archives.
After this operation, 28.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgpm2 armhf 1.20.4-6.1 [35.1 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main vim-runtime all 2:7.4.488-7 [5047 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main vim-common armhf 2:7.4.488-7 [184 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main vim armhf 2:7.4.488-7 [809 kB]
Fetched 6076 kB in 6s (1001 kB/s)                                                                                                                                                                                                           
Selecting previously unselected package libgpm2:armhf.
(Reading database ... 19525 files and directories currently installed.)
Preparing to unpack .../libgpm2_1.20.4-6.1_armhf.deb ...
Unpacking libgpm2:armhf (1.20.4-6.1) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../vim-common_2%3a7.4.488-7_armhf.deb ...
Unpacking vim-common (2:7.4.488-7) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../vim-runtime_2%3a7.4.488-7_all.deb ...
Adding 'diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:7.4.488-7) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a7.4.488-7_armhf.deb ...
Unpacking vim (2:7.4.488-7) ...
Setting up libgpm2:armhf (1.20.4-6.1) ...
Setting up vim-common (2:7.4.488-7) ...
Setting up vim-runtime (2:7.4.488-7) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.4.488-7) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: warning: forcing reinstallation of alternative /bin/nano because link group editor is broken
update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/nano.1.gz (of link group editor) doesn't exist
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Is there another parameter that needs to be set for VIM to be installed automatically?
maelcum

Re: Auto_Install_Index not honored in dietpi.txt

Post by maelcum »

I think I already found the problem:
In the version update note it says:
-Automation | Simplified automation code. One variable to enable automated installation "AUTO_Install_Index=1" in dietpi.txt. This will now enable a completely automated installation, with no user inputs. This feature requires a v126 image or higher, v126+ images will be available at a later date.
Since I am using a v119 image, that can't work, right?
For this to work I need a v126 image, which has not yet been made available, correct?
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Auto_Install_Index not honored in dietpi.txt

Post by Fourdee »

maelcum wrote:I think I already found the problem:
In the version update note it says:
-Automation | Simplified automation code. One variable to enable automated installation "AUTO_Install_Index=1" in dietpi.txt. This will now enable a completely automated installation, with no user inputs. This feature requires a v126 image or higher, v126+ images will be available at a later date.
Since I am using a v119 image, that can't work, right?
For this to work I need a v126 image, which has not yet been made available, correct?
Hi Maelcum,

Automation is having a complete overhaul in v127, part of this work was completed in v126.
You will need to wait for the v127 release, as i'll update all the images at that time.

Heres what to expect in dietpi.txt for v127: https://github.com/Fourdee/DietPi/blob/ ... pi.txt#L34

The main changes are:
AUTO_Install_Enable=1 will run a completely automated installation with no user inputs.

As DietPi v127 now uses software index's, you can flag software for installation with AUTO_DietpiSoftware_Install_ID=23. List of software is here: https://github.com/Fourdee/DietPi/issue ... -236569744
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Auto_Install_Index not honored in dietpi.txt

Post by k-plan »

Hi,
maelcum wrote:... trying to automate the installation of vim during the initial setup, ...
maelcum wrote:Since I am using a v119 image, that can't work, right?
DietPi v119 image "dietpi.txt" have a different structure.

If you want a full automated setup with automated software installation, you have to edit this:

https://github.com/Fourdee/DietPi/blob/ ... pi.txt#L34

edit "dietpi.txt" on FAT partition after burning image to sd card before you first boot up like:

Code: Select all

# >> Automation Options -----------------------------
#Automation Overrides for user inputs | Set these all to 1 if you want fully automated.
#   1=Automatically logs the root user in after filesystem expansion to start 1st run setup. Set to 0 if you want to install $
AUTO_AutoLogin=1
#   1=Disable GPLv2 license information
AUTO_SkipLicensePrompt=1
#   1=Reboot automatically once DietPi-Update has completed.
AUTO_DietpiSoftware_SkipUpdateRebootPrompt=1
#   1=Disables question prompts.
AUTO_DietpiSoftware_SkipQuestions=1
#   1=Disables user prompt to setup a dedicated USB drive for use on this system. Use "#Dedicated USB drive automation" below$
AUTO_DietpiSoftware_SkipUsbDrive=1
#   0=Onscreen prompt if error occurs | 1=Ignore errors, no prompts. (logs errors to /root/DietPi-Automation.log)
AUTO_DietpiSoftware_IgnoreErrors=1

#Automated Software Installations:
#       0=Disabled
#       1=DietPi-Automation (use software lists below to select the software you require)
AUTO_Install_Index=1

#DietPi-Optimized Software to automatically install | Requires AUTO_Install_Index=1
#   1=install

...


#Linux Additional Software to automatically install | Requires AUTO_Install_Index=1
#   1=install
AUTO_DietpiSoftware_Install_VIMFULL=0
....


Important: make sure you have a network connection before you run on power and a proper working internet connection.
If not, full automated update and software installation will fail.

After two auto reboots you have a up-to date DietPi v.126 with VIM full installed. You can watch this process on a connected display.

Auto Update will never update (overwrite) "dietpi.txt", until now.
If you want to use the "new" feature, you have to wait for a new image based on v.127 or Fourdee will change something ...

cu
k-plan
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Post Reply