Advertising
- Anonymous
- 2012 year 7 month 6 day Friday 17:48:02 MDT
- % witchcraft
- VERSION: gentoo install test v0.00
- (means dont try to run it yet, for the sake of your computer. retreat while you can.)
- Hi, "root".
- welcome to the latest incarnation of the witchcraft script.
- what do you want to do?
- A. write iso of current operating system (rewic)
- B. install a new operating system (cauldren)
- C. do it all yourself
- b
- Choice was b. sorry, this part of the script is still under construction. running it in a couple seconds anyway
- ok, so you want to install some hardcore 'nix.
- this script presumes you have already prepared your hard drive partitions, and know where you will install to.
- what do you want to do?
- A. simple install - less choices, control, flexibility. just presets.
- B. proper install - pick which metadistro, and which desktop config.
- C. v leet install - do it all yourself
- b
- Choice was "b". sorry, this part of the script is still under construction. running it in a couple seconds anyway
- what meta-distro do you want your witch based on?
- 1) Gentoo
- 2) Funtoo
- 3) Exherbo
- 4) Gentoo/BSD
- 5) Gentoo/Hurd
- 6) FreeBSD
- 7) combo
- 8) other
- enter number preference of preference:
- 1
- Choice was 1, sorry, this part of the script is incomplete
- this is where you get taken to the gentoo bit
- setting editor to mcedit
- so when you use your browser to find and select your stage, package manager, kernel, etc later on in this script, it will use your proxy, if you need it.
- will you need to use a http-proxy to access the web? (y)(if not sure, probably not):
- n
- enter name for your distro/mount-point and press [ENTER]. (this will make a directory of that name in /mnt/___.):
- tooti
- do you need to partition? (y/n):
- n
- ok, ready to go so...
- where ya putting your root dir? (e.g. sda3):
- sda3
- mount: /dev/sda3 already mounted or /mnt/tooti busy
- mount: according to mtab, /dev/sda3 is already mounted on /mnt/tooti
- you want a separate boot right? (y):
- y
- where ya putting your boot dir? (e.g. sda1):
- sda2
- mount: /dev/sda2 already mounted or /mnt/tooti/boot busy
- mount: according to mtab, /dev/sda2 is already mounted on /mnt/tooti/boot
- you want a separate home too? (y):
- y
- where ya putting your home dir? (e.g. sda1):
- sda4
- mount: /dev/sda4 already mounted or /mnt/tooti/home busy
- mount: according to mtab, /dev/sda4 is already mounted on /mnt/tooti/home
- drive prep complete
- witchcraft can use browsers to download vital parts (and less vital parts too)
- which browser would you like to use? (make sure you have it available to use)
- enter the name of your chosen browser now:midori
- great, you have decided to use "midori"
- ok
- READ INSTRUCTIONS CAREFULLY ~ here you need to download a stage3 compressed tarball to /mnt/tooti/ ~ once you've read these instructions, press y (and enter) to use "midori" web browser to navigate http://www.gentoo.org/main/en/mirrors2.xml to downalod your stage3 tarball for the base system.
- Once the page loads and you've found a nearby mirror, navigate to the releases/x86/autobuilds/ directory. There you should see all available stage files for your architecture (they might be stored within subdirectories named after the individual subarchitectures). if using links text browser: Select one and press D to download. Otherwise, download however you wish. This may take some time. When it has finished, quit the browser (press q in links browser) (or just close the tab) and the rest of this script will resume.
- ready to do find your stage3? (y - yes) (p - yes, with proxy support ~ may not work)
- y
- excellent you seem to have got your stage3 downloaded successfully.
- unpacking your stage3. this may take some time, please wait.
- that's as much as we can do for that now. are you enjoying this so far?y
- /bin/witchcraft: line 190: [: missing `]'
- Now that the stage is installed, we continue to installing Portage, the package manager. READ CAREFULLY:
- Press y to use " midori " to navigate http://www.gentoo.org/main/en/mirrors2.xml to the snapshots directory in a mirror close to you.
- in the snapshots directory, download the latest Portage snapshot (portage-latest.tar.bz2) by selecting it and pressing D. When it finishes downloading, exit the browser by pressing q.
- ready to download your portage (y - yes) (p - yes, with proxy support)y
- excellent you seem to have got your package manager (portage) gubbins downloaded successfully.
- just uncompressing your portage now, have a little wait.
- made backup make.conf
- how do you wanna handle configuring your /etc/make.conf file? (or rather, your /mnt/tooti/etc/make.conf file, since we have not chrooted into your new system yet.)
- m - manually edit
- d - dont care, do it for me, default it. (warning, incomplete! overwrites!)
- w - wget from _____
- c - copy from _____
- v - vanilla - dont touch it!
- u - use the fully commented one from /mnt/tooti/usr/share/portage/config/make.confv
- well that is easily done. ... done.
- not finished with your make.conf yet. wanna pick a fast portage-mirror?
- m - manually edit
- d - dont care, auto-pick, default it with mirrorselect.
- v - vanilla - dont touch it.d
- * Downloading a list of mirrors... Got 240 mirrors.
- ┌─────────────────────────────────────────Gentoo Download Mirrors───────────────────────────────────────────┐
- │ Please select your desired mirrors: │
- │ * = supports ipv6 │
- │ ┌────↑(-)───────────────────────────────────────────────────────────────────────────────────────────────┐ │
- │ │[*] rsync://rsync.mirrorservice.org/www.ibiblio.org/ge UK: The UK Mirror Service │ │
- │ │[*] http://www.mirrorservice.org/sites/www.ibiblio.org UK: The UK Mirror Service │ │
- │ │[*] ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/ UK: The UK Mirror Service │ │
- │ │[ ] rsync://gentoo.kiev.ua/gentoo-distfiles Ukraine: gentoo.kiev.ua │ │
- │ │[ ] ftp://gentoo.kiev.ua/ Ukraine: gentoo.kiev.ua │ │
- │ │[ ] http://gentoo.kiev.ua/ftp/ Ukraine: gentoo.kiev.ua │ │
- │ │[ ] http://gentoo.iteam.net.ua/ Ukraine: ITEAM gentoo mirror │ │
- │ │[ ] ftp://portage.org.ua/ * Ukraine: portage.org.ua │ │
- │ │[ ] http://portage.org.ua/ * Ukraine: portage.org.ua │ │
- │ │[ ] http://mirror.mcs.anl.gov/pub/gentoo/ * USA: Argonne National Laboratory │ │
- │ │[ ] rsync://mirror.mcs.anl.gov/gentoo/ * USA: Argonne National Laboratory │ │
- │ │[ ] ftp://mirror.mcs.anl.gov/pub/gentoo/ * USA: Argonne National Laboratory │ │
- │ │[ ] http://mirror.datapipe.net/gentoo USA: Datapipe Managed Hosting │ │
- │ └────↓(+)───────────────────────────────────────────────────────────────────────────────────────85%─────┘ │
- ├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
- │ < OK > <Cancel> │
- └───────────────────────────────────────────────────────────────────────────────────────────────────────────┘
- * Downloading a list of mirrors... Got 240 mirrors.
- ┌─────────────────────────────────────────Gentoo Download Mirrors───────────────────────────────────────────┐
- │ Please select your desired mirrors: │
- │ * = supports ipv6 │
- │ ┌───────────────────────────────────────────────────────────────────────────────────────────────────────┐ │
- │ │[ ] http://gentoo.localhost.net.ar/ Argentina: LocalHost Soluciones Innovadoras │ │
- │ │[ ] ftp://mirrors.localhost.net.ar/pub/mirrors/gentoo/ Argentina: LocalHost Soluciones Innovadoras │ │
- │ │[ ] http://ftp.swin.edu.au/gentoo Australia: Swinburne University of Technology │ │
- │ │[ ] ftp://ftp.swin.edu.au/gentoo Australia: Swinburne University of Technology │ │
- │ │[ ] http://gentoo.inode.at/ Austria: Inode │ │
- │ │[ ] ftp://gentoo.inode.at/source/ Austria: Inode │ │
- │ │[ ] rsync://gentoo.lagis.at/gentoo-distfiles/ * Austria: Lagis │ │
- │ │[ ] http://gentoo.lagis.at/ * Austria: Lagis │ │
- │ │[ ] ftp://gentoo.lagis.at/ * Austria: Lagis │ │
- │ │[ ] http://gd.tuwien.ac.at/opsys/linux/gentoo/ Austria: Vienna Univ. of Technology │ │
- │ │[ ] ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ Austria: Vienna Univ. of Technology │ │
- │ │[ ] rsync://gd.tuwien.ac.at/opsys/linux/gentoo/ Austria: Vienna Univ. of Technology │ │
- │ │[ ] rsync://gentoo.c3sl.ufpr.br/gentoo/ * Brazil: C3SL, Federal University of Paraná │ │
- │ └────↓(+)───────────────────────────────────────────────────────────────────────────────────────5%──────┘ │
- ├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
- │ < OK > <Cancel> │
- └───────────────────────────────────────────────────────────────────────────────────────────────────────────┘
- look at this and make sure it looks right (and then press q to continue once you have looked)
- did that look right? (y/n)
- y
- well if it is not sorted as you want, you can always tweak it later.
- copying your net connection dns stuffs to your tooti with
- "cp -L /etc/resolv.conf /mnt/tooti/etc/resolv.conf" cp -L /etc/resolv.conf
- /bin/witchcraft: line 307: /mnt/tooti/etc/resolv.conf: No such file or directory
- TO THE CHROOT
- In a few moments, we will change the Linux root towards the new location. To make sure that the new environment works properly, we need to make certain file systems available there as
- well.
- you should be running this from a clean non-borked system (systemrescuecd is a good choice), if not... pray.
- mount -t proc none /mnt/tooti/proc
- mount --rbind /dev /mnt/tooti/dev
- ENTER THE CHROOT
- chroot /mnt/tooti /bin/bash citchroot
- creating a new environment using env-update, which essentially creates environment variables, then loading those variables into memory using source.
- env-update
- >>> Regenerating /etc/ld.so.cache...
- source /etc/profile
- export PS1="(tooti chroot) "
- making sure tooti's portage tree is up to date with "emerge --sync" quietly. may take several minutes...
- !!! getaddrinfo failed for 'rsync.gentoo.org': [Errno -2] Name or service not known
- rsync: getaddrinfo: rsync.gentoo.org 873: Name or service not known
- rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9]
- >>> Retrying...
- !!! Exhausted addresses for rsync.gentoo.org
- portage up to date.
- First, a small definition is in place.
- A profile is a building block for any Gentoo system. Not only does it specify default values for USE, CFLAGS and other important variables, it also locks the system to a certain range of package versions. This is all maintained by the Gentoo developers.
- Previously, such a profile was untouched by the users. However, there may be certain situations in which you may decide a profile change is necessary.
- You can see what profile you are currently using (the one with an asterisk next to it)
- eselect profile list
- Available profile symlink targets:
- [1] default/linux/x86/10.0 *
- [2] default/linux/x86/10.0/selinux
- [3] default/linux/x86/10.0/desktop
- [4] default/linux/x86/10.0/desktop/gnome
- [5] default/linux/x86/10.0/desktop/kde
- [6] default/linux/x86/10.0/developer
- [7] default/linux/x86/10.0/server
- [8] hardened/linux/x86
- [9] hardened/linux/x86/selinux
- pick a number of profile you'd like to switch to, if any, careful not to select a number that doesnt exist. (type letter and hit enter)
- a=1, b=2, c=3, d=4, e=5, f=6, g=7, h=8, i=9, j=10, k=11, l=12, m=13, n=14, o=15
- c
- you can always try changing this later, using eselect.
- you should have already made a make.conf file, and depending on what option you picked, and what you did, you may have already configured your USE flags, if you havn't, not to worry, we can do that now, or even change them later.
- make sure the useflags look right (and then press q to continue once you've looked)
- sh: /bin/zsh: No such file or directory
- what would you like to do for your useflags in make.conf?
- m - manually edit
- d - dont care, do it for me, default it. (warning, incomplete! overwrites!)
- w - wget from _____ (warning this will overwrite existing make.conf)
- c - copy from _____ (warning this will overwrite existing make.conf)
- v - vanilla - dont touch it! leave as is now.
- u - use the fully commented one from /mnt/tooti/usr/share/portage/config/make.conf (warning, this will overwrite existing make.conf)
- enter letter of preference:
- v
- You will probably only use one or maybe two locales on your system. You can specify locales you will need in /etc/locale.gen
- e.g.
- en_GB ISO-8859-1
- en_GB.UTF-8 UTF-8
- en_US ISO-8859-1
- en_US.UTF-8 UTF-8
- m - manually edit
- d - dont care, do it for me, default it. (warning, incomplete! overwrites!)
- w - wget from _____ (warning this will overwrite existing locale.gen)
- c - copy from _____ (warning this will overwrite existing locale.gen)
- v - vanilla - dont touch it! leave as is now.
- m
- now running local-gen
- /bin/witchroot: line 197: local-gen: command not found
- now you'll likely need a kernel too
- let's get your timezone sorted for that...
- Look for your timezone in /usr/share/zoneinfo, then we'll copy it to /etc/localtime
- enter timezone
- e.g:
- GMT
- GMT
- cp: omitting directory `/usr/share/zoneinfo/'
- The core around which all distributions are built is the Linux kernel. It is the layer between the user programs and your system hardware. Gentoo provides its users several possible kernel sources. A full listing with description is available at http://www.gentoo.org/doc/en/gentoo-kernel.xml
- so let's get on with getting you a kernel...
- how would you like to get a kernel?
- g - gentoo-sources + genkernel
- m - manual (incomplete)
- select which option:
- g
- - skipping kernel modules section, due to incompleteness. see 7.e. Kernel Modules here: http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=7#doc_chap5
- _______What is fstab?
- Under Linux, all partitions used by the system must be listed in /etc/fstab. This file contains the mount points of those partitions (where they are seen in the file system structure), how they should be mounted and with what special options (automatically or not, whether users can mount them or not, etc.)
- _______Creating /etc/fstab
- /etc/fstab uses a special syntax. Every line consists of six fields, separated by whitespace (space(s), tabs or a mixture). Each field has its own meaning:
- The first field shows the partition described (the path to the device file)
- The second field shows the mount point at which the partition should be mounted
- The third field shows the filesystem used by the partition
- The fourth field shows the mount options used by mount when it wants to mount the partition. As every filesystem has its own mount options, you are encouraged to read the mount man page (man mount) for a full listing. Multiple mount options are comma-separated.
- The fifth field is used by dump to determine if the partition needs to be dumped or not. You can generally leave this as 0 (zero).
- The sixth field is used by fsck to determine the order in which filesystems should be checked if the system wasn't shut down properly. The root filesystem should have 1 while the rest should have 2 (or 0 if a filesystem check isn't necessary).
- so let's get on with setting up your fstab
- how would you like to configure your fstab?
- m - manual (opens in editor)
- s - skip (manual later)
- g - guided (warning incomplete)
- select which option:
- s
- you'll wanna be online too right?
- what do you want to do about your hostname (in /etc/conf.d/hostname)
- m - manually edit
- d - dont care, do it for me, default it. (overwrites!)
- w - wget from _____ (warning this will overwrite existing /etc/conf.d/hostname)
- c - copy from _____ (warning this will overwrite existing /etc/conf.d/hostname)
- v - vanilla - dont touch it! leave as is now.
- e - enter hostname now. (warning this will overwrite existing /etc/conf.d/hostname)
- e
- ok, so that should be your /etc/conf.d/hostname configured so it has your hostname.
- what do you want to do about your domain name (in /etc/conf.d/net)
- m - RECOMMENDED: manually edit
- d - dont care, do it for me, default it. (adds ns_domain_lo="witchnet")
- w - wget from _____ (warning this will overwrite existing /etc/conf.d/net)
- c - copy from _____ (warning this will overwrite existing /etc/conf.d/net)
- v - RECOMMENDED: vanilla - dont touch it! leave as is now.
- e - enter hostname now. (warning this will overwrite existing /etc/conf.d/net)
- d
- u wanna use dhcp right? y/n:
- y
- and u want to have networking activated at boot automatically for you, of course, right? y/n:
- y
- ok..
- cd /etc/init.d
- ln -s net.lo net.eth0
- this next bit is clever. you should learn about rc-update. a nice feature of gentoo.
- rc-update add net.eth0 default
- * service net.eth0 added to runlevel default
- If you have several network interfaces, you need to create the appropriate net.eth1, net.eth2 etc. just like you did with net.eth0.
- now we inform linux about your network. in /etc/hosts
- do you need PCMCIA? y/n:
- y
- Performing Global Updates:
- (Could take a couple of minutes if you have a lot of binary packages.)
- .='update pass' *='binary update' #='/var/db update' @='/var/db move'
- s='/var/db SLOT move' %='binary move' S='binary SLOT move'
- p='update /etc/portage/package.*'
- /usr/portage/profiles/updates/2Q-2012........................
- * IMPORTANT: 3 news items need reading for repository 'gentoo'.
- * Use eselect news to read news items.
- Calculating dependencies... done!
- >>> Verifying ebuild manifests
- >>> Starting parallel fetch
- >>> Emerging (1 of 15) dev-util/yacc-1.9.1-r4
- * Fetching files in the background. To view fetch progress, run
- * `tail -f /var/log/emerge-fetch.log` in another terminal.
- >>> Downloading 'rsync://rsync.mirrorservice.org/www.ibiblio.org/gentoo/distfiles/yacc-1.9.1.tar.Z'
- rsync: getaddrinfo: rsync.mirrorservice.org 873: Name or service not known
- rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9]
- >>> Downloading 'http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/yacc-1.9.1.tar.Z'
- --2012-07-06 23:02:59-- http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/yacc-1.9.1.tar.Z
- Resolving www.mirrorservice.org... failed: Name or service not known.
- wget: unable to resolve host address `www.mirrorservice.org'
- >>> Downloading 'ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/yacc-1.9.1.tar.Z'
- --2012-07-06 23:03:00-- ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/yacc-1.9.1.tar.Z
- => `/usr/portage/distfiles/yacc-1.9.1.tar.Z'
- Resolving ftp.mirrorservice.org... failed: Name or service not known.
- wget: unable to resolve host address `ftp.mirrorservice.org'
- >>> Downloading 'ftp://metalab.unc.edu/pub/Linux/devel/compiler-tools/yacc-1.9.1.tar.Z'
- --2012-07-06 23:03:00-- ftp://metalab.unc.edu/pub/Linux/devel/compiler-tools/yacc-1.9.1.tar.Z
- => `/usr/portage/distfiles/yacc-1.9.1.tar.Z'
- Resolving metalab.unc.edu... failed: Name or service not known.
- wget: unable to resolve host address `metalab.unc.edu'
- !!! Couldn't download 'yacc-1.9.1.tar.Z'. Aborting.
- * Fetch failed for 'dev-util/yacc-1.9.1-r4', Log file:
- * '/var/tmp/portage/dev-util/yacc-1.9.1-r4/temp/build.log'
- >>> Failed to emerge dev-util/yacc-1.9.1-r4, Log file:
- >>> '/var/tmp/portage/dev-util/yacc-1.9.1-r4/temp/build.log'
- * Messages for package dev-util/yacc-1.9.1-r4:
- * Fetch failed for 'dev-util/yacc-1.9.1-r4', Log file:
- * '/var/tmp/portage/dev-util/yacc-1.9.1-r4/temp/build.log'
- First we set the root password with "passwd"
- New password:
- BAD PASSWORD: it is too short
- BAD PASSWORD: is too simple
- Retype new password:
- passwd: password updated successfully
- that should be your root password configured. dont forget it, remember it.
- Gentoo uses /etc/rc.conf for general, system-wide configuration. Here comes /etc/rc.conf, enjoy all the comments in that file :)
- /bin/witchroot: line 384: mcedit: command not found
- hopefully you've got all you need, sorted in rc.conf. if you changed your editor in rc.conf, this next bit should use it instead now.
- Gentoo uses /etc/conf.d/keymaps to handle keyboard configuration. Edit it to configure your keyboard.
- Take special care with the keymap variable! If you select the wrong keymap, you will get weird results when typing on your keyboard!
- do you need to change your keymap?
- n
- /bin/witchroot: line 395: mcedit: command not found
- Gentoo uses /etc/conf.d/hwclock to set clock options. Edit it according to your needs.
- wanna change time?
- n
- /bin/witchroot: line 400: mcedit: command not found
- Fri Jul 6 23:04:12 Local time zone must be set--see zic manual page 2012
- ok, so you should probably have your network, main config file (rc.conf), keyboard and clock configured.
- now lets get tooled up with a system logger, command scheduler, and more file and network tools.
- Installing Necessary System Tools
- system logger
- system logger
- Some tools are missing from the stage3 archive because several packages provide the same functionality. It is now up to you to choose which ones you want to install.
- The first tool you need to decide on has to provide logging facilities for your system. Unix and Linux have an excellent history of logging capabilities -- if you want you can log everything that happens on your system in logfiles. This happens through the system logger.
- Gentoo offers several system loggers to choose from. There are:
- sysklogd, which is the traditional set of system logging daemons,
- syslog-ng, an advanced system logger,
- and metalog which is a highly-configurable system logger. Others might be available through Portage as well - our number of available packages increases on a daily basis.
- If you plan on using sysklogd or syslog-ng you might want to install logrotate afterwards as those system loggers don't provide any rotation mechanism for the log files.
- To install the system logger of your choice, emerge it and have it added to the default runlevel using rc-update.
- choose a systemlogger to install and add to startup:
- a. emerge syslogd && rc-update add syslogd default
- b. emerge syslog-ng && rc-update add syslog-ng default
- c. emerge metalog && rc-update add metalog default
- d. enter name of other system logger
- e. no thnx (only if you're sure)
- select a,b,c or d and press ENTER.
- b
- /bin/witchroot: witchroot: line 444: syntax error near unexpected token `&'
- /bin/witchroot: witchroot: line 444: `[ "y" == "d" ] && read -p "enter name of your choice of system logger: " SYSLOGA && emerge && & rc-update add default #add a sort of failsafe, so that if the emerge fails because no such package exists, user can then choose a,b,c,d or e again. ~ yes, see this is an example where putting this into functions makes sense. ...but i'll carry on with this rudimentary version for now.'
- deskfigselector is temporarily out of order while fixing main install
- sorry no deskfig selection yet
Paste Details
Tags: witch
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.