Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Easy Gentoo - Gentoo Installation Script
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Mon Feb 11, 2013 10:57 pm    Post subject: Easy Gentoo - Gentoo Installation Script Reply with quote

Hi everyone,
I was trying to find an easier Gentoo install method for years. I ran into outdated scripts, read tons of pages, had too many headaches and I started writing a script for myself when i lost hope :) Finally I have a script that gets me what I need. This bash script is basically a group of commands listed in Gentoo Handbook but does more than just executing them all. It does every little configuration change that is necessary.
I was targeting Turkish Gentoo users at first so it had all echos etc in Turkish. But I translated (at least I tried ^^) it to English because I decided to stop improving it. I don't have enough time to test, fix, update it anymore. Someone else may do that from now on. That's why I'm writing this post.

So what does that script do?
Easy Gentoo uses a profile to get information it needs from you and installs Genoo based on that profile. Installation is automated, you won't need to interfere. Script does its job and in the end it executes a shutdown. It is even easier than it sounds.
I tried to make every little detail as good as possible and there are lots of things that Easy Gentoo does. The best way to inspect them all is to give it a try i guess.
For example: I did 3-4 installs today on a virtual machine using Easy Gentoo; one of them was a 64bit install with a ready to use Xfce desktop using vesa at 1920x1080, another one was a 32bit basic install which doesn't have X.

Note: Script uses stable packages, it doesn't/can't do an unstable install.

It is important for you to read this before using Easy Gentoo: https://github.com/shdcn/easygentoo/blob/master/README.md

These are some of the main steps (to give you an idea about installation).
For more information please take a look at https://github.com/shdcn/easygentoo/blob/master/installation_steps.txt

*** Steps for basic install ***
1- Check if necessary tools/commands are available to continue (like cut, grep, wc, sed, awk, mkfs.foo)
2- Format partitions
3- Mount partitions
4- Check mirrors (not a mirrorselect)
5- Download and extract latest stage3 tarball and portage snapshot
6- Continue inside chroot
7- Create a temporary make.conf
8- Emerge portage and some tools
9- Create locale.gen
10- Update make.conf and create package.use
11- Do a controlled "emerge -e system"
12- Kernel compilation (genkernel) with lots of needed settings/drivers
13- Emerge grub and create grub.conf
14- Create/update configuration files (localtime, keymaps, hostname, etc)
15- Change locale based on keymap
16- Change root password and create user
17- Update /etc/sudoers and .bashrc
18- Unmerge unnecessary packages and do "emerge -uDN world"
*** Steps for normal install ***
--- Emerge xorg-server and create xorg.conf
--- Emerge and configure Xfce
--- Emerge and configure LightDM Login Manager
--- Configure evdev
--- Emerge NetworkManager
--- Emerge and configure Alsa
19- Purge unnecessary man pages etc. (localepurge)
20- Create a small report about whole process.
21- Delete temporary files that were created by script
22- Shutdown computer

Script is located at https://github.com/shdcn/easygentoo repository.

Direct download link: https://raw.githubusercontent.com/shdcn/easygentoo/master/easygentoo
Profile description: https://github.com/shdcn/easygentoo/blob/master/profile

Example profiles:
https://github.com/shdcn/easygentoo/blob/master/profile.example.1
https://github.com/shdcn/easygentoo/blob/master/profile.example.2
https://github.com/shdcn/easygentoo/blob/master/profile.example.3

Screenshots:
http://imgur.com/a/OgWLN#0
http://imgur.com/a/ujDdT#0

Update (29.05.2014):
Easy Gentoo is now using systemd, grub2, genkernel-next and lightdm
improved stage tarball and network adapter handling
added a new profile setting: autonet (yes/no) - enables or disables network connection handling (ping check, reconnect), disable if you want to handle your connection on your own when a problem pops out

Edit (11.03.2012):
Added detailed installation steps

Edit (15.02.2013):
I have added some tested changes to script. Pulseaudio is disabled, Alsa replaced it. It compiles 36 less packages than before (previous tests had a total of 440 packages included in a normal install, now it is 404) and has improved config file handling now. Added some screenshots. README had some changes too.


Last edited by shdcn on Thu May 29, 2014 2:59 pm; edited 4 times in total
Back to top
View user's profile Send private message
windex
n00b
n00b


Joined: 09 Dec 2012
Posts: 70

PostPosted: Tue Feb 12, 2013 6:25 am    Post subject: Reply with quote

Thanks! I'll have to give this a shot!
Back to top
View user's profile Send private message
rookieljw
n00b
n00b


Joined: 15 Jan 2013
Posts: 12
Location: China

PostPosted: Thu Feb 14, 2013 7:14 pm    Post subject: Reply with quote

:P thx but I recommand that do original way to do it,because we can learn something during install gentoo :wink:
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Thu Feb 14, 2013 8:18 pm    Post subject: Reply with quote

I agree that normal Gentoo installation procedure is very educating but it takes too much user input to get a system working. This is a little tiring if you don't have enough time or when you need multiple installations in a short period.
I believe this script may save the user a lot of time. I did some improvements/cleaning since my first post here and still trying to make it better. It's still not perfect but installing Gentoo with "2-3 commands + 10-15 words of config" is very entertaining from my point of view ^^
Besides that, normal way is always there to teach us more :)
Back to top
View user's profile Send private message
justabrain
n00b
n00b


Joined: 14 Feb 2013
Posts: 2

PostPosted: Thu Feb 14, 2013 11:52 pm    Post subject: Reply with quote

i make my register just to say thank you !

amazing job, im new in linux world, but im learning, and i never can install gentoo before, but with your script, its very easy !

thank you very much !!!
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Fri Feb 15, 2013 12:42 am    Post subject: Reply with quote

You're welcome :) Hope it serves you well.
Back to top
View user's profile Send private message
justabrain
n00b
n00b


Joined: 14 Feb 2013
Posts: 2

PostPosted: Fri Feb 15, 2013 6:37 pm    Post subject: Reply with quote

very well ! thank you ! im in love with gentoo :]
Back to top
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Fri Feb 15, 2013 7:20 pm    Post subject: Reply with quote

Hmm,
one day too late. :)

I switched a box from debian to gentoo some days ago ... so I can't test your script now. :)
_________________
- born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Sat Feb 16, 2013 10:52 am    Post subject: Reply with quote

My bad, I should post earlier ^^ Hope you use your new Gentoo for a long time and won't need my script :)
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Sat Feb 16, 2013 11:38 am    Post subject: Reply with quote

You might want to write up your work on the wiki, and link to it from this page.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Sat Feb 16, 2013 11:48 am    Post subject: Reply with quote

Nice idea Hypnos, I'll do it as soon as possible. Thanks for reminding me.
Back to top
View user's profile Send private message
cryptosteve
Veteran
Veteran


Joined: 04 Jan 2004
Posts: 1169
Location: GER

PostPosted: Sat Feb 16, 2013 1:11 pm    Post subject: Reply with quote

shdcn wrote:
Hope you use your new Gentoo for a long time and won't need my script :)

Sure I will use my new Gentoo for a long time but I have new machines from time to time which calls for new Gentoo installations :)
_________________
- born to create drama -
gpg: 0x9B6C7E15
CS Virtual Travel Bug: VF6G5D
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Mon Mar 04, 2013 10:39 am    Post subject: Reply with quote

I'm trying to create a modified version for Dell XPS 15z as justabrain requested and it includes Brazilian (pt_BR) localization.
I added pt_BR related parts to the original script too. So the script can handle three locales now; English, Brazilian and Turkish.
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Sat Mar 16, 2013 12:57 pm    Post subject: Reply with quote

Easygentoo works fine on a PC but it needs some tinkering for laptops (to get a ready to use system). Because I couldn't find a laptop for testing until yesterday. Now I'm torturing poor little thing with endless compiles to make sure everything is fine.
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Mon Mar 25, 2013 8:44 pm    Post subject: Reply with quote

I made some little changes (kernel config, USE flags, packages etc.) and had some installs on my laptop to test them all. Everything is working fine.
Back to top
View user's profile Send private message
dataking
Apprentice
Apprentice


Joined: 20 Apr 2005
Posts: 251

PostPosted: Wed Mar 27, 2013 1:53 am    Post subject: Reply with quote

rookieljw wrote:
:P thx but I recommand that do original way to do it,because we can learn something during install gentoo :wink:


In situations where one is building multiple gentoo boxen and/or VMs, something like this is quite handy. The assumption there is that the education is over, and you just need the system(s) built. I've built my own script for this purpose, though it really isn't as robust as this one.

Although, it does do the disk partitioning. ;-) Not sure why the original author doesn't handle that.
_________________
-= the D@7@k|n& =-
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Wed Mar 27, 2013 10:23 am    Post subject: Reply with quote

dataking wrote:
Not sure why the original author doesn't handle that.

Actually I don't know why I didn't include disk partitioning but I'll try to do that. :) Is it possible for you to share your partitioning code with me to make it an easier job?
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Wed Mar 27, 2013 4:06 pm    Post subject: Reply with quote

Looks like some changes were made to mirrors (directory layout) and now my script is having problems while trying to download stage3 tarball and portage snapshot. Trying to fix it at the moment.

Edit: Fixed it temporarily. Looking for a better solution but script is working for now.
Back to top
View user's profile Send private message
dataking
Apprentice
Apprentice


Joined: 20 Apr 2005
Posts: 251

PostPosted: Wed Mar 27, 2013 6:16 pm    Post subject: Reply with quote

shdcn wrote:
dataking wrote:
Not sure why the original author doesn't handle that.

Actually I don't know why I didn't include disk partitioning but I'll try to do that. :) Is it possible for you to share your partitioning code with me to make it an easier job?

Sent you a PM.
_________________
-= the D@7@k|n& =-
Back to top
View user's profile Send private message
maxim.251
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jul 2012
Posts: 127

PostPosted: Mon Aug 19, 2013 10:27 am    Post subject: Reply with quote

Can you show me the script that performs the chroot command on?
Because I'm going to write my own script setup similar to yours. But I can not understand how to get work from reading or writing the script for further work in chroot.

Quote:
6- Continue inside chroot
Back to top
View user's profile Send private message
maxim.251
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jul 2012
Posts: 127

PostPosted: Mon Aug 19, 2013 11:15 am    Post subject: Reply with quote

I think I have found. Is this command, go to the root and it takes next operations?

Code:
start() {
    export SHELL=$(which bash); setterm -blank 0; cl
   
    eg="easygentoo"; profile="profile"; vl="variables"; mnt="/mnt/gentoo"
    lt="latest-stage3.txt"; compiled="compiled.txt"
   
    [[ -e "/chroot.eg" ]] && inside || { intro; check; prepare; get_tar; move; }

    exit 0
}
[/code]
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 27
Location: Istanbul/Turkey

PostPosted: Mon Aug 19, 2013 11:35 am    Post subject: Reply with quote

First of all Easy Gentoo has a two main parts; before chroot and after chroot. I may change some parts/names in the code to make it simpler to understand. So you won't be able to find below lines inside the original code. Here are the details:

When executed, script checks if we are inside chroot or not. This is the code that runs first and does this check:
Code:
[[ -e "/chroot.eg" ]] && after || before

(if chroot.eg file exists, it means we are inside chroot)

If chroot.eg doesn't exist, it executes before part and when that part finishes, script does three things:
1) copies itself with
Code:
cp easygentoo /mnt/gentoo &>/dev/null

2) creates an empty file in the root dir of installation with
Code:
touch /mnt/gentoo/chroot.eg &>/dev/null

3) executes its copy from new target with
Code:
chroot /mnt/gentoo $(which env) -i TERM=$TERM sh easygentoo


The second instance of script confirms that chroot.eg exists and executes after part.

That part you just wrote is the first function that runs when script is executed and checks if we are inside chroot (as i explained above).
Back to top
View user's profile Send private message
maxim.251
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jul 2012
Posts: 127

PostPosted: Mon Aug 19, 2013 1:08 pm    Post subject: Reply with quote

Thank you very much. This is very helpful.
Even I did not understand how is make start script in the chroot, but this explanation is fast approaching me to understand.
Thank you for your response. :)

it seems to me that your installation script is the first ever made. Because nowhere in the network have not found similar.
Back to top
View user's profile Send private message
maxim.251
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jul 2012
Posts: 127

PostPosted: Mon Aug 19, 2013 2:42 pm    Post subject: Reply with quote

Also, I noticed an interesting way to install packages.
Is not that a problem for you if you described to me the action in short? As the above?
Back to top
View user's profile Send private message
siljrath
n00b
n00b


Joined: 21 Oct 2009
Posts: 22
Location: the sovereign state of my mostly brown slip on shoes.

PostPosted: Mon Aug 19, 2013 7:42 pm    Post subject: Reply with quote

thnx, nice to see some other people's efforts.

i made (amidst other grander plans) an interactive installation script for gentoo (with intent of adding others too). when it started, the idea was a simple interactive handbook walkthrough, so that the user would still be learning the handbook content through the interactive installation process.

the priority of inclusion of handbook content got a little lost in the wild fray of other aspirations, but a lot of it is still in there.

it was working on last test... but who knows after subsequent changes (i know the step-by-step testing guide no longer fits since the refactoring, but i'm sure if you're interested enough you can figure it out)

https://github.com/Digit/witch

i'll definately be having more looks into these other ways, profiles, and so on.
_________________
SpaceShips For EveryBody
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum