Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Automatic basic configuration process after clean install

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
sanjibukai
Posts: 29
Joined: 2015-05-11 01:22

Automatic basic configuration process after clean install

#1 Post by sanjibukai »

Hi everyone,

This is my first post on this forum and I am also a new debian (and linux) user..
But let me introduce my situation (I apologize for my bad english) (see below for the TL;DR;)

Few months ago a friend of me gave me a broken macbook air laptop.. After repairing it I decided to use it as my testing, learning and development platform.
Based on what I have heard, OS X is a much better development platform than windows (the os I'm used to develop on) at least for web development.
But I don't know why, despite that I prefered to do the jump in the linux world and wanted to start doing development under linux..
And after a very long time of wondering which distro to choose I finally choose debian..
So I'm here...

But to be honest, in fact, I failed to get many other distros (ubuntu, fedora, linuxmint) working on the macbook (nvidia driver problem).
But after many attempts (alternatively using external dvd and usb key as installation media) I accidentally ended up with a 100% functionnal (including graphic driver) setup based on a debian release. It was a debian 8 (jessie) before it was officially released, and I even don't know how I stumble on that release...

Some days ago after I noticed the official release of debian 8 I tried to update the system but the laptop switched off during the process (didn't noticed that AC was not plugged)...
After this the macbook didn't boot anymore... It said an XFS corruption problem.. (Yes, I installed debian on XFS partitions since ext4 was oddly not possible based on the version of the installer I had).

So I completely reinstall debian based on a fresh debian 8 iso..
But this time I don't succeed to get the nvidia driver to be working.
After each attempt of installing the nvidia driver I ended up with a non booting system forcing me to fresh install again debian (I'm not advanced enough to troubleshoot the blackscreen issue upon startup)...

Now I content myself with the default nouveau driver even if it seems to be consuming more energy and lead to more heat..
Since, I made some customization on some dot files (inputrc, bashrc etc..) and I also installed some basic software (chrome etc..)
But I think that I will soon retry to install the nvidia driver.. But I don't want to make my changes over and over again every time I will reinstall linux..

So (finally the question !) :
How can I automate the process of installing some basic softwares (chrome etc..) and configuring some basic files (inputrc, bashrc...) and also configuring some basic settings like keyboard layout (which is a french macintosh version) and touchpad (e.g. for natural scrolling) for a debian system ?

TL;DR;
I will test many clean installations of debian and of nvidia driver in order to get the driver working (it's for a macbook).
Thus I'm looking for a way to automatically configure and install basic softwares.

Thank you in advance...

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Automatic basic configuration process after clean instal

#2 Post by Head_on_a_Stick »

sanjibukai wrote:Thus I'm looking for a way to automatically configure and install basic softwares.
http://linuxmint.com/
deadbang

sanjibukai
Posts: 29
Joined: 2015-05-11 01:22

Re: Automatic basic configuration process after clean instal

#3 Post by sanjibukai »

Hi,
I appreciate the fact that you answerd me..
But this is absolutely not what I'm looking for..
First linuxmint do not work on my macbook with efi (at least I didn't succeed to get it to work)..
Second, even with linuxmint all of my problem still remain since all the stuff I'm trying to automate are still needeed with another distro..
When I wrote "a way to automatically configure.." I mean automatically configure (or retrieve previously made config files) the linux os itself (.rc files, os settings like keyboard layout and so on..)

So I think this answer is a bit useless...

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: Automatic basic configuration process after clean instal

#4 Post by dilberts_left_nut »

So back up your config files and restore them as required.
AdrianTM wrote:There's no hacker in my grandma...

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Automatic basic configuration process after clean instal

#5 Post by Head_on_a_Stick »

^ Or use github.

I must admit I was in a bit of a hurry this morning & I only read the "TL;DR" bit...

EDIT: When you get the black screen, switch to a console with <Ctrl>+<Alt>+F2 and delete the xorg.conf file.

You're probably just using the wrong version or something but I've never used NVIDIA so I should probably stop spouting nonsense now.
deadbang

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Automatic basic configuration process after clean instal

#6 Post by dasein »

sanjibukai wrote:How can I automate the process of installing some basic softwares (chrome etc..) and configuring some basic files (inputrc, bashrc...) and also configuring some basic settings like keyboard layout (which is a french macintosh version) and touchpad (e.g. for natural scrolling) for a debian system ?
Automating software installation is a matter of writing a simple script. That script would contain verbatim the exact same apt-get commands used to install the software in the first place.

A script-based solution can also be used for config files, using commands like echo, sed, etc. But as d_l_n noted above, a quicker way is simply to back up these files onto a separate medium and then copy them to the fresh install.

sanjibukai
Posts: 29
Joined: 2015-05-11 01:22

Re: Automatic basic configuration process after clean instal

#7 Post by sanjibukai »

Hello,
Head_on_a_Stick wrote: EDIT: When you get the black screen, switch to a console with <Ctrl>+<Alt>+F2 and delete the xorg.conf file.
When the black screen occurs in the booting process (between 5 and 10 second later) I am unable to make anything (none of the terminal shortcut works)..
I'm only able to hard-shutdown (holding power button).. But same thing appear at every startup..
I can access to the grub menu, but it seems too complex for me to investigate and repair the boot process (I already tried to follow some guides without success) so I prefer to clean install..
But as I said at the moment I'm happy with nouveau.. There are "only" three problems with it :
#1 no 3d acceleration but this is completely not a problem (only terminal and internet)
#2 seems to have high power consumption (about 4 hours of autonomy)
#3 despite the lcd dimming works fine with the fn keys (even by completely turning off the backlight when pressing the "down lcd key" few time), the screen do not switch off after some time of inactivity. I mean after a moment of inactivity when the laptop should "blacken the screen" the only thing that occurs is that the screen go blank (and black) but I can clearly see that the backlight remain enabled... And I don't think that this help to lower the power consumption...
Edit: I confuse "suspend mode" and "inactivty mode" which is what I mean here...

Of course all of these backdraws are not very important since I'm actually not using the laptop for work but only to learn..
But I hope that linux become quickly my working environment..

Going back to the point..
Head_on_a_Stick wrote: ^ Or use github.
This is actually what I looked for...
Since I hate GUI (at least I think that mouse is not enough efficient) I'm looking for a way to getting a script that enable all the settings and installation I can made upon every fresh install..
All the .rc config file could be retrieved using git for example..
And many of the settings, I guess, are able to be done by script (settings like keyboard or touchpad etc..)
I also discovered that I can export all the package that are installed and retrieving them using dpkg...
All of this stuff could be grouped in one script.. After all, before knowing Linux, I though that everything is possible in linux..
Thus I will only need to type manually one command which is git installation and then retrieving the script that contains all other stuff even some more git backup...

To be honest, even if I have not enough knowledge regarding linux, I was pretty sure that all that stuff would be possible...
And now after some research I have the certitude...
But the problem stills remain... I don't know how to do it...
Is anyone already did such a script ?
Since english is not my native language (and even not good enough) I don't know how to research that on google..
I get many result about automatic scripting... for proxy connection for example..
But I miss something...
I found a great article concerning archlinux.. And it seems to be exactly what I'm looking for but I do not want to dive right now on arch linux..
And I think that about 5000 lines (in two files) is a little bit more difficult to grasp than trying to make some very little configuration..

I still want to learn by doing...

Thank you..

sanjibukai
Posts: 29
Joined: 2015-05-11 01:22

Re: Automatic basic configuration process after clean instal

#8 Post by sanjibukai »

Hi everyone..
I found a little simpler method that the archlinux one in order to do my customization.
This script actually does only some software installation which is one part of what I want to achieve in the automation process.

As I said before I would to automatize :
  • #1 some software installation
  • #2 some config files (.rc files)
  • #3 some system settings (mouse, keyboard layout, touchpad etc..)
Thus this script is well adapted for the first case.
For the second I plan to just grab some files from git (read somewhere a trick about simlinking the .rc files in a git tracked folder... Is there any good advice about that ?)
About the third point I have no idea how to achieve it. I guess that all of the settings available in the GUI (e.g. touchpad settings, keyboard layout etc..) are actually store somewhere, but how to access and edit them ? Are there some config files (like the xorg.conf file is for graphic setting) ?

Thank you..

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Automatic basic configuration process after clean instal

#9 Post by Head_on_a_Stick »

sanjibukai wrote:I guess that all of the settings available in the GUI (e.g. touchpad settings, keyboard layout etc..) are actually store somewhere, but how to access and edit them ? Are there some config files (like the xorg.conf file is for graphic setting) ?
Different desktop environments will use different methods.

If you stick to a stripped-down pure window manager environment (eg, OpenBox) then it all becomes much simpler -- most configuration is then stored in /etc/X11/xorg.conf.d
deadbang

sanjibukai
Posts: 29
Joined: 2015-05-11 01:22

Re: Automatic basic configuration process after clean instal

#10 Post by sanjibukai »

Head_on_a_Stick wrote: Different desktop environments will use different methods.
I didn't think that this was dependent of the desktop environment since some of this configuration is system wide.
For example like the keyboard layout which is available early in the login screen (which desktop environment seems to be not yet started) and even in the single user boot or in tty1-6 terminals...
Head_on_a_Stick wrote: If you stick to a stripped-down pure window manager environment (eg, OpenBox) then it all becomes much simpler -- most configuration is then stored in /etc/X11/xorg.conf.d
What does it mean exactly ?
Is it possible to disable any desktop environment (I'm using by default cinnamon and I unchecked the others upon the installation) and then only use a "window manager" ?
I understand that in this way all the configuration will go in a single (or some) files.. This seems to be exactly what I expected from a linux OS: a fully customizable, parametric and file-configured system..
But in some explanation I cannot figure out why this is different ? I mean why using a desktop environment and a windows manager is different regarding the system settings ?
In other words after installing the window manager, do all the configuration will suddenly appear in some files ?

I any case I will continu to learn about all of these linux parts..

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Automatic basic configuration process after clean instal

#11 Post by Head_on_a_Stick »

sanjibukai wrote:I didn't think that this was dependent of the desktop environment since some of this configuration is system wide.
For example like the keyboard layout which is available early in the login screen (which desktop environment seems to be not yet started) and even in the single user boot or in tty1-6 terminals...
Certainly, but some desktop environments will over-ride the system settings with their own methods.
https://wiki.debian.org/Keyboard
sanjibukai wrote:
Head_on_a_Stick wrote: If you stick to a stripped-down pure window manager environment (eg, OpenBox) then it all becomes much simpler -- most configuration is then stored in /etc/X11/xorg.conf.d
What does it mean exactly ?
Is it possible to disable any desktop environment (I'm using by default cinnamon and I unchecked the others upon the installation) and then only use a "window manager" ?
I understand that in this way all the configuration will go in a single (or some) files.. This seems to be exactly what I expected from a linux OS: a fully customizable, parametric and file-configured system..
But in some explanation I cannot figure out why this is different ? I mean why using a desktop environment and a windows manager is different regarding the system settings ?
In other words after installing the window manager, do all the configuration will suddenly appear in some files ?
The point I was trying to make is that the "heavier" desktop environments (ie, GNOME, KDE, Cinnamon, etc) all try to "help" the user by applying an extra layer of abstraction (and obfuscation) over the basic system configuration files.

Pure window manager environments do not do this and as a result are (IMO) actually *easier* to configure and certainly more universal in their configuration methods.

Having said that, these configuration files do not "suddenly appear" -- they must be created by the user and tailored to the user's needs.

I recommend OpenBox -- if installed, an "openbox-session" option will show up in your display manager options and desired startup programs (such as a panel) can be added to ~/.config/openbox/autostart

And finally -- do not use that script you have linked to install Arch (if you decide to try that), it is utter nonsense and entirely contrary to the whole point of using Arch.
https://wiki.archlinux.org/index.php/The_Arch_Way

Follow this method instead:
https://wiki.archlinux.org/index.php/Beginners%27_guide
deadbang

sanjibukai
Posts: 29
Joined: 2015-05-11 01:22

Re: Automatic basic configuration process after clean instal

#12 Post by sanjibukai »

Thank you for these precisions...

But I will continue to learn in debian before going forward with arch..
I prefer try and play with those windows managers...

Post Reply