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 Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
maxim.251
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jul 2012
Posts: 86

PostPosted: Tue Aug 20, 2013 5:20 am    Post subject: Reply with quote

Welcome.
Yesterday I did a little change. I tested the ruler to learn how the code works.
I had a small problem, but solved it in this way.
Now showing all programs that are in the system or not.
I can later add, what program does not exist, and then to be written to the file.
And later mising programs can be inslalate.

Code:
#!/bin/bash

# here is programs what I need. Gentoo is word what I want to be a test. to see what happend if one program will be mising.
potrzebne="awk bash cat gentoo chmod chroot clear cp cut fdisk free grep ip loadkeys md5sum mkdir mount mv rm sed setterm sha512sum sleep swapoff swapon tar touch tr umount wc wget"
exist() {
   
    which ${1} &>/dev/null && (echo "  * ${1} exists ";sleep 0.5s ) || (echo "  * ${1} not" )
    #echo $prog
}
for b in ${potrzebne}
    do
        exist "${b}"
done


Last edited by maxim.251 on Tue Aug 20, 2013 6:07 am; edited 1 time in total
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: 86

PostPosted: Tue Aug 20, 2013 6:05 am    Post subject: Reply with quote

siljrath wrote:
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.



Nicely.
Your script needs a lot of work.
I have a simpler idea for a script, but targeted only for Gentoo.
I want to make the installation process which will no wrong. And every time on each computer will install.
  And you can select multiple variables during installation.
Such as "user" "password", etc..
And most importantly, show the ruler of each executed task, in order to accurately track the installation process. If something goes wrong, you will know the moment when an error occurs.
  I hope it will not be that.
  Now I need a lot of learning, I just started writing scripts.

I'm thinking on how make config automatically kernel.config for drivers.
  For me, it has always been a problem to find what driver I need .
  "lsmod" I think the ideal solution.
I do not know if lsmod is enough.
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: 86

PostPosted: Tue Aug 20, 2013 8:56 am    Post subject: Reply with quote

I add function what is make file whit programs mising on system.
Later I write line whit "emerge" this programs.
File what make i call "brakuje.sh" - in english "missing.sh"
In this file is written programs what is missing.

This line can be using to emerge all package needed for complate install gentoo.
I hope that some one else use my script in his one instalation. :)

Code:
#!/bin/bash
rm brakuje.sh
clear
echo "Looking for missing programs"
sleep 3
clear

potrzebne="awk bash cat gentoo chmod genkernel chroot clear cp cut fdisk free grep ip loadkeys md5sum mkdir mount mv rm sed setterm sha512sum sleep swapoff swapon tar touch tr umount wc wget"
exist() {
   
    which ${1} &>/dev/null && (echo "  * ${1} exists ";sleep 0.5s ) || (echo "  * ${1} not";echo ${1} >> brakuje.sh )
    #echo $prog
}
for b in ${potrzebne}
    do
        exist "${b}"
done
d=`cat  brakuje.sh`
sleep 3
clear
echo "Find missing programs:..."
echo ""
sleep 2
#echo "Programs what missing is: $d"
for c in $d
  do
  #echo ""
  sleep 0.5s
  echo $c " :--this program is missing"
done


Just today I got the idea to write a script that will append new file to which tasks have been completed, so that the next time you start your computer, the script will be able to perform the next command.

These are all ideas that have been inspired by EasyGentoo and creator called "shdcn" :D
Back to top
View user's profile Send private message
shdcn
n00b
n00b


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

PostPosted: Fri Aug 23, 2013 8:16 pm    Post subject: Reply with quote

Hi maxim.251,

1) Package installation
I will try to explain the package installation without codes because this part has lots of details and may easily confuse you more. Hope it helps.

I use a combination of functions to install packages. make_list function creates a list of packages that will be installed by current command. Then the fetch function starts to download the packages in the background, one by one, according to that list. fetch function creates an other list of succesfully downloaded packages. At the same time, the compile function monitors that second list and waits until there is a package name. If it detects a package name (which means that this one is downloaded and ready to be compiled), it starts compiling it. If compilation is succesful, the name of the compiled package will be removed from the first packages list. This goes on until the list ends and there are no packages to install for current command.

2) Kernel config
I use a template kernel config for EasyGentoo (https://raw.github.com/shdcn/easygentoo/master/easygentoo.config). It is easier to have a working kernel this way.

3) Your code
I guess you are trying to create a script which will be used to detect missing packages and you want it to log these. If that is the case I would write your script like this:
Code:
#!/bin/bash

exist() {
    which ${1} &>/dev/null && { echo "  * ${1} exists"; sleep 0.2s; } || { echo "  * ${1} doesn't exist"; echo "${1}" >> brakuje.log; }
}

rm -rf brakuje.log
clear; echo; echo "Looking for missing programs"; echo; sleep 3s

potrzebne="awk bash cat gentoo chmod genkernel chroot clear cp cut fdisk free grep ip loadkeys md5sum mkdir mount mv rm sed setterm sha512sum sleep swapoff swapon tar touch tr umount wc wget"

for m in ${potrzebne}
do
    exist "${m}"
done

exit 0

This code prints every existing/missing package to screen and writes every missing package to brakuje.log. If you want to install these missing packages, then you may add something like this before the "exit 0" line:
Code:
while read package_name
do
    emerge -q ${package_name}
done < brakuje.log

But remember this; the name of a command and the name of its package may not be the same.
Back to top
View user's profile Send private message
shdcn
n00b
n00b


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

PostPosted: Fri Aug 23, 2013 8:30 pm    Post subject: Reply with quote

Hi siljrath,
Looks like I walked the same path as you while creating mine :) I will definitely take a look in your script and I'm pretty sure that I will learn more from it. Thanks for sharing.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32336
Location: 56N 3W

PostPosted: Fri Aug 23, 2013 8:54 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Documentation, Tips & Tricks.

Moved here from Installing Gentoo as its not a support request
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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: 86

PostPosted: Sat Aug 24, 2013 8:50 am    Post subject: Reply with quote

I needed this file brakuje.sh to retrieve the name of the program to be installed.
and used for the subsequent installation

Well your code looks interesting.


Especially this line

Code:
while read package_name
to
     emerge-q $ {package_name}
done <brakuje.log


Code:
done <brakuje.log

I did not know that it is possible to write to directly read from the file.
For this use the variable $ d to read from the file and did not know that it is simpler way.

And thank you for writing to me about the installation of packages.
is a interesting way.
I already wrote my kind of code.

Test of instaling missing programs.
At the time of installation Press "n"
the script will think that the program is installed.
I did it just for a test to see how the code behaves if the installation is successful.
Code:
#!/bin/bash

time=1 #put the time of wait

start()
{

  rm brakuje.sh
  clear
  echo "Looking for missing programs"
  sleep 3
  clear

  potrzebne="awk bash genkernel ufed cat coreutils dialog chmod chroot clear cp cut fdisk free grep gparted loadkeys lm_sensors md5sum mkdir mount mv rm sed setterm      sha512sum sleep swapoff swapon tar touch tr umount wc wget"

  exist()
{
   which ${1} &>/dev/null && (echo "  * ${1} exists ";sleep 0.5s ) || (echo "  * ${1} not";echo ${1} >> brakuje.sh )
      
}

for b in ${potrzebne}
do
   exist "${b}"
done

d=`cat  brakuje.sh`
sleep 3
clear
echo "Find missing programs:..."
echo ""
sleep 2

for c in $d
do
   
   sleep 0.5s
   echo $c " :--this program is missing"
done
sleep 2
instalacja
}

emergeProgr()
{
   emerge -av $1 #| grep "jest już"  #tr -s '[:blank:]' ' '| grep Budowanie #2> /dev/null #??
   #echo "test, tak na prawdę teraz nic się nie intsaluje z powodów bezpieczeństwa"
   sleep $((time+1)) 
}

clear

pobieranie()
{
   clear
   echo "I take program from file to be install"
   prog=`cat brakuje.sh`

}

doinstalowania()
{
for zs in $prog
do
   echo "Pakage to be installed is : $zs"
   sleep $time
done
}
clear

instal()
{
   echo "Instaling package start"
   sleep $time
   for zm in $prog
   do
      clear
      echo "instalowanie $zm"
      sleep $time
      emergeProgr $zm #instaling from list $prog
   done
   #clear
   echo "Instaling is finish"
   sleep $time
}

koniec_instal(){
   clear
   zainstalowane=$prog
   echo "Package what is instaled is : $zainstalowane"
}

start
pobieranie
doinstalowania
instal
koniec_instal


What do you think?
If you run it please tell me what you think about this code?
Back to top
View user's profile Send private message
PsykoNerd
n00b
n00b


Joined: 20 Dec 2011
Posts: 6
Location: There !

PostPosted: Tue Aug 27, 2013 5:32 am    Post subject: virtualbox Reply with quote

if you made a script for virtualbox that would help folks too
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: 86

PostPosted: Tue Aug 27, 2013 10:35 am    Post subject: Reply with quote

I found something interesting. I know this is off topic.
But I think anyone looking for an easy way to install the whole environment.
Toorox is a great replacement for those who do not have time to bother with commands. A system then adjusts himself.
  Of course, you still need to recompile the whole system. But the work is in the final environment
Here is the link.

http://toorox.de/index.php/en/

It is for these reasons I was looking for an easier way. I learned to write in bash to make simpler to install gentoo.

But it still does not stop me from writing the script. Because it's fun for me. :D
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: 86

PostPosted: Tue Aug 27, 2013 10:41 am    Post subject: Re: virtualbox Reply with quote

PsykoNerd wrote:
if you made a script for virtualbox that would help folks too


Never tested on virtualbox.
I do not like this program and always tested in the real machine.
It seems to me that it should work on virtual box if you have an Internet connection.
It's finally a set of commands in a single file.
Back to top
View user's profile Send private message
seqizz
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2008
Posts: 101
Location: Turkey

PostPosted: Mon Sep 09, 2013 2:27 am    Post subject: Reply with quote

Nice to see gentoo users from turkey. It'd be better if I can help. I'll be looking. Hope I won't have seizures from bash overload.
_________________
what about an answer here?
Back to top
View user's profile Send private message
NY152
n00b
n00b


Joined: 23 Sep 2013
Posts: 1

PostPosted: Mon Sep 23, 2013 9:32 am    Post subject: Reply with quote

Bonjour,

Je voulais me lancer en douceur sur Gentoo alors j'ai voulu tenter l'installation avec votre script.

Chose étrange il me dit ceci :

Looks like there aren't any network adaptaters. Setup is unable to continue. Exit now...

Je dis étrange car Internet est fonctionnel sur la machine où je tente l'installation.

Une idée pour éviter ce message ?
________________________________________________________________________________________

Hello,

I wanted to start me gently on Gentoo so I wanted to try installing your script.

Strange thing he said to me:

Looks like there arent any network adaptaters. Setup is Unable to continue. Exit now ...

I say strange because the Internet is functional on the machine where I attempt the installation.

An idea to avoid this message?
_________________
.:NY152:.
Back to top
View user's profile Send private message
seqizz
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2008
Posts: 101
Location: Turkey

PostPosted: Wed Oct 02, 2013 2:43 pm    Post subject: Reply with quote

NY152 wrote:
Bonjour,

Je voulais me lancer en douceur sur Gentoo alors j'ai voulu tenter l'installation avec votre script.

Chose étrange il me dit ceci :

Looks like there aren't any network adaptaters. Setup is unable to continue. Exit now...

Je dis étrange car Internet est fonctionnel sur la machine où je tente l'installation.

Une idée pour éviter ce message ?
________________________________________________________________________________________

Hello,

I wanted to start me gently on Gentoo so I wanted to try installing your script.

Strange thing he said to me:

Looks like there arent any network adaptaters. Setup is Unable to continue. Exit now ...

I say strange because the Internet is functional on the machine where I attempt the installation.

An idea to avoid this message?


try adding your interface name (you can see with "ip link" or "ifconfig" commands) to script's 1344. line (whatever it is, not in the list: eth0 eth1 eth2 eth3 eth4 eth5)

// edit: typo
_________________
what about an answer here?
Back to top
View user's profile Send private message
bartos
n00b
n00b


Joined: 05 Dec 2009
Posts: 5

PostPosted: Wed Oct 02, 2013 7:27 pm    Post subject: install Reply with quote

Hi
I want to use your script to install gentoo to a spare partition. I would like to be able to run it from my arch install and then boot into Gentoo.

A question.
It says "Please move the script to /root and start it again". when i run it from arch partition. Is this the /root on the partition i want to use cause I tried it from my arch /root and nothing happened.

Thanks
Back to top
View user's profile Send private message
HardenedMetapod
n00b
n00b


Joined: 18 Nov 2013
Posts: 1
Location: United States

PostPosted: Mon Nov 18, 2013 12:41 am    Post subject: Reply with quote

For me the script locks up after "Getting latest tarball name..." Any ideas?

Code:

* Getting latest tarball name...
   Latest tarball:   stage3-amd64-20130620
20131010
20131031
20131024
20131031.tar.bz2
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: 86

PostPosted: Thu Dec 12, 2013 1:43 pm    Post subject: Reply with quote

Hello, the last time I wrote a few months ago. I see that have made a fix and wrote partitioning. but there is one problem, because when the root partition the disk, it cleans the entire disk and it is time-consuming. Do you can change fast partitioning the root partition?
Back to top
View user's profile Send private message
vhristev
n00b
n00b


Joined: 08 Jan 2014
Posts: 6

PostPosted: Wed Jan 08, 2014 7:56 am    Post subject: Reply with quote

HardenedMetapod wrote:
For me the script locks up after "Getting latest tarball name..." Any ideas?

Code:

* Getting latest tarball name...
   Latest tarball:   stage3-amd64-20130620
20131010
20131031
20131024
20131031.tar.bz2


I'm not sure if there is something wrong with new script version but you can fix it by hand. Go to Line 1751:

tarball="stage3-${arch}-$(grep ${arch} ${lt} | cut -d'/' -f1 | uniq).tar.bz2"

and change it to

tarball="stage3-amd64-20131226.tar.bz2" ( OR what ever stage3 you want )

save the script and run it again.

Also if you want to use different mirror you can change for example US keyboard. Go to Line 1727:

trq|trf keyb line 1724
br|us keyb line 1727

Here is example for US keyb

br|us)
mirrorlist="http://gentoo.supp.name ftp://mirrors.linuxant.fr/distfiles.gentoo.org http://ftp.linux.org.tr/gentoo ftp://ftp.linux.org.tr/gentoo"
;;

and change it to :

br|us)
mirrorlist="YOUR_MIRROR_HERE"
;;
_________________
Being lazy means being smart
Back to top
View user's profile Send private message
vhristev
n00b
n00b


Joined: 08 Jan 2014
Posts: 6

PostPosted: Wed Jan 08, 2014 12:37 pm    Post subject: Reply with quote

Hello ,

I have other problem here is what i'm doing.

Those tests was made in VM.

1. Boot minimal gentoo CD
2. Download eazyinstall + profile ( edit profile by my needs ). In easyinstall only edit is mirror list and tarball variable because it hangs if i do not edit it.
3. Start eazyinstall
4. When stages are downloading my space is filled and there is NOT enough space .

There is a step when script is telling me that disk is formated then mounted but those actions was not made. When i check disk is still not formated and there is no mounted partitions ( because there is no partitions ).


Any ideas ?
BR
_________________
Being lazy means being smart
Back to top
View user's profile Send private message
moisespedro
n00b
n00b


Joined: 01 Jan 2014
Posts: 71

PostPosted: Fri Jan 31, 2014 3:53 pm    Post subject: Reply with quote

Thanks :) You have no idea how I am happy to find this. I tried gentoo once, completed the install process (minimal), got mad at it and went back to slackware lol. You have no idea how confusing portage can be for a noob xD
Gonna try it again with this script
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: 86

PostPosted: Wed Feb 05, 2014 2:00 pm    Post subject: Reply with quote

I found an interesting script, and in it a very interesting way to make chroot. I did not know that too, so you can do.
# chroot /mnt/gentoo emerge --sync
# echo '#!/bin/bash' > /mnt/gentoo/portage
# chroot /mnt/gentoo emerge syslog-ng vixie-cron slocate dhcpcd
# chroot /mnt/gentoo rc-update add syslog-ng default
# chroot /mnt/gentoo rc-update add vixie-cron

HAH!!! I found a bug in the script: D
the script is not mine, but someone else, but that I test it, and I'm looking for interesting commands.

Bug is already fixed.
otherwise the file was not to fully script.
The difference between the "xxx" and 'xxx' is such that "xx" performs special characters such as #
and 'xxx' special characters are treated as normal

echo "#!/bin/bash" > /mnt/gentoo/portage -> echo '#!/bin/bash' > /mnt/gentoo/portage

Code:
#!/bin/bash
# GENTOO INSTALL SCRIPT FROM BASE INSTALL AND DEFAULT CONFIGS
# Created by: Morpheus (YYC)
#

# Display Introduction
echo "Welcome to the GENTOO install script, please note you must be at your system for instructions"
echo "this script will perform a majority of the configurations for you however certain interaction"
echo "may be required on your part."
echo
echo
echo "NOTE: THIS WILL RESULT IN DATA LOSS OF THE CURRENT DRIVE"
echo "Please press enter when your ready to continue."
read

# Configure hard disk
echo "The following is a list of found Hard Disk devices (sda/hda):"
ls /dev/ | grep -E [s:h]da$
echo
echo "Please enter the device you would like to install to:"
read HD_DEVICE
HDD="/dev/${HD_DEVICE}"

# warn user last time
echo
echo "THIS IS YOUR LAST CHANCE TO CANCEL, Press CTRL+C to cancel this install or ENTER to continue"
read
echo "p" | fdisk $HDD
echo "Please specifiy the total number of partitions:"
read PARTS

#TODO: add integer checking
echo -n "Generating fdisk operation file"
# Create fdisc auto file
((i = 1))
while (( i < PARTS ))
do
echo "d" >> fdisc.in
echo "$i" >> fdisc.in
((i += 1))
done
echo "d"    >> fdisc.in   # Delete last sector
echo "n"    >> fdisc.in   # New Partiton
echo "p"    >> fdisc.in   # Primary
echo "1"    >> fdisc.in   # Partion 1
echo ""    >> fdisc.in   # default
echo "+32M"    >> fdisc.in   # 32 MB size
echo "a"    >> fdisc.in   # Set flag
echo "1"    >> fdisc.in   # bootable
echo -n "."
echo "n"    >> fdisc.in   # New Partion
echo "p"    >> fdisc.in   # Primary
echo "2"    >> fdisc.in   # Partion 2
echo ""    >> fdisc.in   # default
echo "+512M"    >> fdisc.in   # 512 MB size
echo "t"    >> fdisc.in   # Set partition type
echo "2"    >> fdisc.in   # Partition 2
echo "82"    >> fdisc.in   # 82 = SWAP
echo -n "."
echo "n"    >> fdisc.in   # New Partition
echo "p"    >> fdisc.in   # Primary
echo "3"    >> fdisc.in   # Partition 2
echo ""    >> fdisc.in   # default
echo ""    >> fdisc.in   # new Line
echo -n "."
echo "w"    >> fdisc.in   # Write partion table
echo "q"    >> fdisc.in   # Quit
echo ". Done"
# Execute file
echo "Executing fdisk script ..."
echo
fdisk $HDD < fdisc.in
#clean up
rm -f fdisc.in
echo ""
echo "Partions created"
echo "Applying filesystem to partitions"
mke2fs /dev/${HD_DEVICE}1
mke2fs -j /dev/${HD_DEVICE}3
mkswap /dev/${HD_DEVICE}2
echo "Activating swap partition"
swapon /dev/${HD_DEVICE}2
echo ""
echo "Mounting partitions"
mount /dev/${HD_DEVICE}3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/${HD_DEVICE}1 /mnt/gentoo/boot
echo "Starting STAGE 3 Install"
echo ""
cd /mnt/gentoo
wget http://gentoo.osuosl.org/releases/x86/current/stages/stage3-x86-2008.0.tar.bz2
tar xvjpf stage3-*.tar.bz2
echo ""
echo "Installing portage..."
cd /mnt/gentoo
wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2
tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
echo "Cleaning up..."
rm -f portage-latest.tar.bz2
rm -f stage3-x86-2006.1.tar.bz2
echo ""
echo "Getting ready to CHROOT"
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
echo "Chrooted"
echo "Updating portage..."
sleep 2
chroot /mnt/gentoo emerge --sync
echo "Patching portage..."
chroot /mnt/gentoo emerge portage
echo "Portage updated, downloading kernel source..."
sleep 2

echo '#!/bin/bash' > /mnt/gentoo/portage    # hire was a bug ( echo "#!/bin/bash" > /mnt/gentoo/portage )
echo 'USE="-doc symlink" emerge gentoo-sources' >> /mnt/gentoo/portage
chmod 700 /mnt/gentoo/portage
chroot /mnt/gentoo ./portage
rm -f /mnt/gentoo/portage

echo "#!/bin/bash" > /mnt/gentoo/portage
echo 'cd /usr/src/linux' >> /mnt/gentoo/portage
echo 'echo ""' >> /mnt/gentoo/portage
echo 'echo "***************************************************"' >> /mnt/gentoo/portage
echo 'echo "**            KERNEL CONFIGURATION               **"' >> /mnt/gentoo/portage
echo 'echo "***************************************************"' >> /mnt/gentoo/portage
echo 'echo "* You will now be prompted with the linux kernel  *"' >> /mnt/gentoo/portage
echo 'echo "*menu configurator, please ensure that you specify*"' >> /mnt/gentoo/portage
echo 'echo "*the right settings, as once you exit this script *"' >> /mnt/gentoo/portage
echo 'echo "*will compile and install the new kernel          *"' >> /mnt/gentoo/portage
echo 'echo "***************************************************"' >> /mnt/gentoo/portage
echo 'echo ""' >> /mnt/gentoo/portage
echo 'echo "Please press enter to continue"' >> /mnt/gentoo/portage
echo 'read' >> /mnt/gentoo/portage
echo 'make menuconfig' >> /mnt/gentoo/portage
echo 'make && make modules_install' >> /mnt/gentoo/portage
echo 'cp arch/i386/boot/bzImage /boot/originalKernel' >> /mnt/gentoo/portage
echo 'echo ""' >> /mnt/gentoo/portage
chmod 700 /mnt/gentoo/portage
chroot /mnt/gentoo ./portage
rm -f /mnt/gentoo/portage

echo "Generating FSTAB"
#GENERATE FSTAB
echo "# /etc/fstab: static file system information." > /mnt/gentoo/etc/fstab
echo "#" >> /mnt/gentoo/etc/fstab
echo "# noatime turns off atimes for increased performance (atimes normally aren't" >> /mnt/gentoo/etc/fstab
echo "# needed; notail increases performance of ReiserFS (at the expense of storage" >> /mnt/gentoo/etc/fstab
echo "# efficiency).  It's safe to drop the noatime options if you want and to" >> /mnt/gentoo/etc/fstab
echo "# switch between notail / tail freely." >> /mnt/gentoo/etc/fstab
echo "#" >> /mnt/gentoo/etc/fstab
echo "# The root filesystem should have a pass number of either 0 or 1." >> /mnt/gentoo/etc/fstab
echo "# All other filesystems should have a pass number of 0 or greater than 1." >> /mnt/gentoo/etc/fstab
echo "#" >> /mnt/gentoo/etc/fstab
echo "# See the manpage fstab(5) for more information." >> /mnt/gentoo/etc/fstab
echo "#" >> /mnt/gentoo/etc/fstab
echo "" >> /mnt/gentoo/etc/fstab
echo "# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>" >> /mnt/gentoo/etc/fstab
echo "" >> /mnt/gentoo/etc/fstab
echo "# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts." >> /mnt/gentoo/etc/fstab
echo "/dev/${HD_DEVICE}1               /boot           ext2            noauto,noatime  1 2" >> /mnt/gentoo/etc/fstab
echo "/dev/${HD_DEVICE}3               /               ext3            noatime         0 1" >> /mnt/gentoo/etc/fstab
echo "/dev/${HD_DEVICE}2               none            swap            sw              0 0" >> /mnt/gentoo/etc/fstab
echo "#/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0" >> /mnt/gentoo/etc/fstab
echo "#/dev/fd0               /mnt/floppy     auto            noauto          0 0" >> /mnt/gentoo/etc/fstab
echo "" >> /mnt/gentoo/etc/fstab
echo "# NOTE: The next line is critical for boot!" >> /mnt/gentoo/etc/fstab
echo "proc                    /proc           proc            defaults        0 0" >> /mnt/gentoo/etc/fstab
echo "" >> /mnt/gentoo/etc/fstab
echo "# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for" >> /mnt/gentoo/etc/fstab
echo "# POSIX shared memory (shm_open, shm_unlink)." >> /mnt/gentoo/etc/fstab
echo "# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will" >> /mnt/gentoo/etc/fstab
echo "#  use almost no memory if not populated with files)" >> /mnt/gentoo/etc/fstab
echo "shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0" >> /mnt/gentoo/etc/fstab
cat /mnt/gentoo/etc/fstab
echo ""
echo "Configuring rc scripts"
chroot /mnt/gentoo rc-update add net.eth0 default
chroot /mnt/gentoo rc-update add sshd default
echo "*************** ROOT PASSWORD ********************"
echo "YOU ARE NOW REQUIRED TO ENTER A NEW ROOT PASSWORD "
echo "**************************************************"
chroot /mnt/gentoo passwd
echo "Installing tools..."
chroot /mnt/gentoo emerge syslog-ng vixie-cron slocate dhcpcd
chroot /mnt/gentoo rc-update add syslog-ng default
chroot /mnt/gentoo rc-update add vixie-cron
echo ""
echo ""
echo "Installing LILO"
chroot /mnt/gentoo emerge lilo
echo "boot=/dev/${HD_DEVICE}       # Install LILO in the MBR" >> /mnt/gentoo/etc/lilo.conf
echo "prompt                    # Give the user the chance to select another section" >> /mnt/gentoo/etc/lilo.conf
echo "timeout=50                # Wait 5 (five) seconds before booting the default section" >> /mnt/gentoo/etc/lilo.conf
echo "default=gentoo            # When the timeout has passed, boot the "gentoo" section" >> /mnt/gentoo/etc/lilo.conf
echo "" >> /mnt/gentoo/etc/lilo.conf
echo "# For non-genkernel users" >> /mnt/gentoo/etc/lilo.conf
echo "image=/boot/originalKernel" >> /mnt/gentoo/etc/lilo.conf
echo "        label=gentoo            # Name we give to this section" >> /mnt/gentoo/etc/lilo.conf
echo "        read-only               # Start with a read-only root. Do not alter!" >> /mnt/gentoo/etc/lilo.conf
echo "        root=/dev/${HD_DEVICE}3          # Location of the root filesystem" >> /mnt/gentoo/etc/lilo.conf
chroot /mnt/gentoo lilo
cd /
umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
echo "Done"
echo "****************************"
echo "****************************"
echo "** SYSTEM WILL NOW REBOOT **"
echo "****************************"
echo "****************************"
sleep 5
reboot
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: 86

PostPosted: Thu Feb 13, 2014 4:48 pm    Post subject: Reply with quote

I was working on my installer.
The difference is that I shared facilities into categories, where it is easier to change at any case of any problems.
I decided that I did not I turn to the installation partition, but still I think about it.
But it seems to me that geparted enough for it to partition your hard drive.
  My installation will be more focus on versatility and simplicity.
I do not want to create the installer that the construction will be difficult.
The installation will continue until xorg.


I want to thank for everything shdcn, is that thanks to him I myself started to create something of mine.
That through his script, I myself decided to create something of mine.
Thank you shdcn


Due to the fact that my post is long, I moved it to a new topic.
Please look at my plants and write what you think.
http://forums.gentoo.org/viewtopic-p-7509528.html?sid=5afec088554ed5441bcadea3feecbe18

This is a Gentoo installation process. Based on the Gentoo Wiki and updates made ​​by me.
The installation process has made ​​our lives easier. Since anyway we all need to install exactly the same way. So why bother clicking on the keyboard 3 days, if you can set the basic data and enable the auto installations, which will take one day.
Back to top
View user's profile Send private message
shdcn
n00b
n00b


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

PostPosted: Tue Mar 04, 2014 11:51 am    Post subject: Reply with quote

Hi everyone, I appreciate your valuable comments and efforts. Thanks a lot.
I was away from home for 5-6 months and couldn't keep an eye on Easy Gentoo. Looks like it needs some maintenance to work properly. Really sorry for all errors you had. I will control each single line of code in there and let you know when it's working again.

maxim.251 you're welcome, I'm happy to see you create your own script, congratulations!
Back to top
View user's profile Send private message
Polyatomic
n00b
n00b


Joined: 18 May 2014
Posts: 25
Location: Adelaide , South Australia

PostPosted: Wed May 21, 2014 9:58 am    Post subject: Reply with quote

shdcn wrote:
Hi everyone, I appreciate your valuable comments and efforts. Thanks a lot.
I was away from home for 5-6 months and couldn't keep an eye on Easy Gentoo. Looks like it needs some maintenance to work properly. Really sorry for all errors you had. I will control each single line of code in there and let you know when it's working again.

maxim.251 you're welcome, I'm happy to see you create your own script, congratulations!


How are you man. I would like to try this script to get Gentoo on one of my hard drives. I noticed the thread is over a year old... >.> and was wondering if changes are required before I go ahead. Anyway I'll do some research and comeback later. Excellent script man. :D 0/
Back to top
View user's profile Send private message
shdcn
n00b
n00b


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

PostPosted: Fri May 23, 2014 2:36 pm    Post subject: Reply with quote

Hi Polyatomic, thank you :) Script is not working right now and needs some modification because of the changes in Gentoo. I have been working on that for a while and looks like script is almost ready. There are only a few little things left (for ex. systemd settings). Hope to finish it really soon. Will let you know as soon as it is ready to use ^^
Back to top
View user's profile Send private message
shdcn
n00b
n00b


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

PostPosted: Thu May 29, 2014 3:11 pm    Post subject: Reply with quote

Finally I fixed some important errors and made little improvements. To sum it up: "Easy Gentoo is now using systemd, grub2, genkernel-next and lightdm. It has better stage tarball and network adapter handling. We have a new profile setting: autonet"
Updated first post and uploaded script to github. Hope it serves you well. I'm still testing with different setups, let me know if you see anything that goes wrong. Just in case, use this script on a virtual machine first ^^
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 Previous  1, 2, 3  Next
Page 2 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