Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I have decided to write two foolproof install commands ..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
cravengemetzel
n00b
n00b


Joined: 12 Mar 2012
Posts: 40

PostPosted: Wed Jul 18, 2012 7:12 pm    Post subject: I have decided to write two foolproof install commands .. Reply with quote

Today is a summer day, and hating the heat I decided to stay indoors and do a fresh, clean, minimal install of gentoo . While doing so, and along with notes that I've taken during my seven or eight previous installs, I've written down all the commands that I've used, along with quick reference information about them . I give to you my notes so that you may feel free to do as you will with them, let others use it as a good, clean reference for the seasoned Gentoo user just wishing for a quick refresher . I know I sure use my notes a lot, and they save me hours upon hours otherwise spent critically scrutinizing every detail and option of the amazing Gentoo Handbook - AMD64 :: http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml

My love for Gentoo is enormous . It has helped me keep my sanity in difficult circumstances, if only as something to look forward to doing and working on for my pure enjoyment.
Thank you . I will post my finished oneshot command as soon as I get it done, if only for your pure entertainment .


Ah yes, the inxi script reads for my system, allowing you a glimpse against which hardware my notes are intended to work:

Code:
Machine:   System: Hewlett-Packard product: HP Pavilion dv6 Notebook PC version: 058D
Mobo: Hewlett-Packard model: 358D version: 33.18
Bios: Hewlett-Packard version: F.21 date: 09/13/2011
CPU:       Quad core AMD A8-3510MX APU with Radeon HD Graphics (-MCP-) cache: 4096 KB flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 14373.8
           Clock Speeds: 1: 800.00 MHz 2: 800.00 MHz 3: 800.00 MHz 4: 800.00 MHz
Graphics:  Card-1: Advanced Micro Devices [AMD] nee ATI BeaverCreek [Mobility Radeon HD 6620G] bus-ID: 00:01.0
           Card-2: Advanced Micro Devices [AMD] nee ATI Whistler [AMD Radeon HD 6600M Series] bus-ID: 01:00.0
           X.org: 1.12.1.902 drivers: ati,vesa,radeon (unloaded: fbdev) tty size: 85x17 Advanced Data: N/A for root
Network:   Card-1: Realtek RTL8111/8168B PCI Express Gigabit Ethernet controller
           driver: r8169 ver: 2.3LK-NAPI port: 2000 bus-ID: 02:00.0
Card-2: Broadcom BCM4313 802.11b/g/n Wireless LAN Controller driver: brcmsmac bus-ID: 03:00.0
Drives:    HDD Total Size: 750.2GB (13.1% used) 1: id: /dev/sda model: Hitachi_HTS54757 size: 750.2GB temp: 0C
Info:      Processes: 149 Uptime: 16:41 Memory: 1111.7/7481.5MB Runlevel: 2 Gcc sys: 4.7.1 Client: Shell inxi: 1.8.13




And now the notes, as promised:



Code:
#### INSTALLATION

- mount the partition and copy the stage3 tarball over to it
- cd into the mnt directory
- unpack the tarball with tar xvjpf stage3-*.tar.bz2
- rm the tarball as root
- download the latest portage snapshot with links http://www.gentoo.org/main/en/mirrors.xml (select portage-latest.tar.bz2 and press D)
- unpack the portage snapshot with tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
- nano -w /mnt/gentoo/etc/make.conf (an example configuration file can be found in /mnt/gentoo/usr/share/portage/config/make.conf.example)
- mount the /proc and /dev filesystems with mount -t proc none /mnt/gentoo/proc && mount --rbind /dev /mnt/gentoo/dev
- chroot into the new environment with chroot /mnt/gentoo /bin/bash && env-update && source /etc/profile && export PS1=(chroot) $PS1
- cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
- emerge mirrorselect
- set mirrors with mirrorselect -i -o >> /etc/make.conf && mirrorselect -i -r -o >> /etc/make.conf
- emerge --sync
- eselect profile list && eselect profile set #


- cp /usr/share/zoneinfo/America/Toronto /etc/localtime
- echo America/Toronto > /etc/localtime
- emerge gentoo-sources
- emerge pciutils
- emerge gentoolkit
- lspci && lsmod
- cd /usr/src/linux && make menuconfig
- make && make modules_install
- cp arch/x86_64/boot/bzImage /boot/kernel-3.4.5-gentoo
- find /lib/modules/3.4.5-gentoo/ -type f -iname '*.o' -or -iname '*.ko' | less
- nano -w /etc/fstab
- nano -w /etc/conf.d/hostname

IF YOU WISH TO USE DHCP
- configure network nano -w /etc/conf.d/net and for dhcp append: config_eth0=dhcp
- set network to start at boot cd /etc/init.d && ln -s net.lo net.eth0 && rc-update add net.eth0 default
- inform linux about your network nano -w /etc/hosts if need be

OR IF YOU PREFER TO USE THE TRIED AND TRUE WICD
- install a network manager emerge wicd && rc-update add wicd boot


- passwd
- nano -w /etc/rc.conf
- nano -w /etc/conf.d/keymaps
- nano -w /etc/conf.d/hwclock
- nano -w /etc/locale.gen && locale-gen
- echo America/Toronto > /etc/timezone
- add a system logger emerge syslog-ng logrotate && rc-update add syslog-ng default
- add a cron daemon emerge dcron && rc-update add dcron default && crontab /etc/crontab
- add file indexing emerge mlocate
- nano -w /etc/fstab
- nano -w /etc/conf.d/hostname
- configure network nano -w /etc/conf.d/net and for dhcp append: config_eth0=dhcp
- set network to start at boot cd /etc/init.d && ln -s net.lo net.eth0 && rc-update add net.eth0 default
- inform linux about your network nano -w /etc/hosts
- passwd
- nano -w /etc/rc.conf
- nano -w /etc/conf.d/keymaps
- nano -w /etc/conf.d/hwclock
- nano -w /etc/locale.gen && locale-gen
- echo America/Toronto > /etc/timezone
- emerge dbus && rc-update add dbus default
- emerge consolekit && rc-update add consolekit default
- env-update && source /etc/profile
- emerge gentoolkit
- emerge cups hplip
- nano -w /etc/conf.d/modules
- add a user useradd -m -G users,wheel,audio,cdrom,floppy,games,portage,usb,video -s /bin/bash dante
- exit the chrooted environment and unmount all mounted partitions: exit && cd && umount -l /mnt/gentoo/dev{/shm,/pts,} && umount -l /mnt/gentoo{/boot,/proc,} && reboot


#### START FILE :: /etc/fstab

/dev/sda8 / reiserfs defaults,notail 0 1
/dev/sda6 none swap sw 0 0
/dev/sda3 /home ext4 defaults 0 1
 
/dev/cdrom /mnt/cdrom auto noauto,user 0 0

proc /proc proc defaults 0 0
#shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
tmpfs /dev/shm tmpfs defaults 0 0

#### END FILE :: /etc/fstab


#### START FILE :: /etc/locale.gen

en_US ISO-8859-1
en_US.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
fr_CA.UTF-8 UTF-8
fr_CA ISO-8859-1
ru_RU.UTF-8 UTF-8
ru_RU ISO-8859-5
sv_SE.UTF-8 UTF-8
sv_SE ISO-8859-1

# run 'locale-gen'

#### END FILE :: /etc/locale.gen



#### START FILE :: /etc/make.conf

# These settings were set by the metro build script that automatically built this stage.
# Please consult /etc/make.conf.example for a more detailed example.


# PORTAGE OPTIONS AND FLAGS

ACCEPT_KEYWORDS="~amd64"   
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe" 
CXXFLAGS="-O2 -march=k8 -pipe"

USE="mmx sse sse2 dbus X kde qt4 gtk alsa dvd cdr semantic-desktop doc branding"
VIDEO_CARDS="radeon"
INPUT_DEVIDES="evdev synaptics mouse wacom keyboard"
LINGUAS="en de fr sv ru"

PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
DISTDIR=/usr/portage/distfiles
PKGDIR=/usr/portage/packages

PORT_LOGDIR=/var/log/portage
PORTAGE_ELOG_CLASSES="info log warn error"
PORTAGE_ELOG_SYSTEM="save_summary echo"
 
PORTDIR_OVERLAY=/usr/local/portage
 
INSTALL_MASK=" "

# PORTAGE FEATURES

MAKEOPTS="-j 5"
AUTOCLEAN="yes"
FEATURES="ccache"
CCACHE_SIZE="5G"
CCACHE_DIR="${PORTAGE_TMPDIR}/ccache"
#DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc"

# MIRRORS

# Funtoo
#SYNC="git://github.com/funtoo/ports-2012.git"

# Gentoo
GENTOO_MIRRORS="ftp://gentoo.arcticnetwork.ca/pub/gentoo/ http://gentoo.arcticnetwork.ca/ http://gentoo.gossamerhost.com rsync://gentoo.gossamerhost.com/gentoo-distfilfiles/ rsync://mirror.the-best-hosting.net/gentoo-distfiles http://mirror.the-best-hosting.net ftp://mirrors.tera-byte.com/pub/gentoo http://gentoo.mirrors.tera-byte.com/ rsync://mirrors.tera-byte.com/gentoo http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage"


#### END FILE :: /etc/make.conf



#### POST-INSTALL


- emerge kdebase-meta lxde-base/lxde-meta
- edit the /etc/conf.d/xdm file nano -w /etc/conf.d/xdm
- emerge media-fonts/corefonts media-fonts/ttf-bitstream-vera media-fonts/dejavu
- rc-update add xdm default


possible boot issues:

-rc_sys not defined in rc.conf
-unable to set system clock in a dualboot with Windoze 7



#### PORTAGE


#### PALUDIS


#### TIPS


brcmsmac driver is located here:

   
Location: -> Device Drivers
    -> Network device support
        -> Wireless LAN
            -> < > Broadcom IEEE802.11n PCIe SoftMAC WLAN driver

and you must enable 'BCMA

setting up proprietary fglrx:


Ensure that any old kernel configurations which include DRI or KMS are disabled and the kernel is recompiled.
 
Device Drivers --->
 
 Graphics support --->
 
 < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
 

- echo x11-base/xorg-server udev >> /etc/portage/package.use
- rebuild xorg to pull in the new driver emerge -av1 x11-base/xorg-server
- emerge -av1 x11-base/xorg-drivers
- backup and modify xorg.conf for fglrx /opt/bin/aticonfig --initial --input=/etc/X11/xorg.conf
- tell X.Org about fglrx with eselect eselect opengl set ati
- Fglrx also needs to know what xvmc implementation to use. If you haven't already installed the eselect module, emerge it now: emerge app-admin/eselect-xvmc
- select the ATI xvmc implementation eselect xvmc set ati
- env-update
- source /etc/profile
- restart X


## FINALLY, IN YOUR BOOTLOADER YOU MUST SET EITHER "nomodeset" or "radeon.modeset=0" DEPENDING ON WHICH KERNEL YOU HAVE DECIDED TO USE .


############
############



Feel free to redistribute my notes or do as you please with them, this is a personal contribution to the Gentoo Community .

###########################################


Last edited by cravengemetzel on Wed Jul 18, 2012 7:58 pm; edited 3 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jul 18, 2012 7:28 pm    Post subject: Reply with quote

cravengemetzel,

I would make one detailed change.
Code:
CFLAGS="-O2 -march=k8 -pipe"
is fine if you want to use distributed compiling.
Code:
CFLAGS="-O2 -march=native -pipe"
is more generally useful if you build and run your code on the same hose always. It allows gcc to pick CFLAGS based on the CPU it finds itself on.

Code:
ACCEPT_KEYWORDS="~amd64"
should come with a health warining. Users new to Gentoo should use
Code:
ACCEPT_KEYWORDS="amd64"
or whatever thier arch happend to be.
Code:
FEATURES="ccache"
is also know to be unsafe.

Lastly a tip. Add buildpkg to your FEATURES. It saves a binary package of everythng you build into /usr/portage/packages. After a while, you can use
Code:
emerge -K =<catagory/<package>-<version>

To quickly downgrade to a working virstion from your binaries, what a long compile has broken something.
On a system that took six hours to build a broken open-office, the downgrade time was under ten minutes.
_________________
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
cravengemetzel
n00b
n00b


Joined: 12 Mar 2012
Posts: 40

PostPosted: Wed Jul 18, 2012 7:37 pm    Post subject: Reply with quote

Thank you for the advice, NeddySeagoon . I will revise my notes, but will not update my posted note file . I feel that I have given Gentoo Users a valid starting point in putting together their own reference notes, and they may edit whatever I have posted in whichever way that works for them . Furthermore, if constructive comments like the one you've addressed me are shared, it is not much of an effort to simply take my notes and add details and changes to the Gentoo User's liking .


Here is my finished command for the Gentoo Community's enjoyment:


Quote:
# mount /dev/foo /mnt/gentoo && cp /foo/stage3-*.tar.bz2 /mnt/gentoo && cd /mnt/gentoo && tar xvjpf stage3-*.tar.bz2 && rm stage3-*.tar.bz2 && cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf && links http://www.gentoo.org/main/en/mirrors.xml && tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr && nano -w /mnt/gentoo/etc/make.conf && mount -t proc none /mnt/gentoo/proc && mount --rbind /dev /mnt/gentoo/dev && chroot /mnt/gentoo /bin/bash && env-update && source /etc/profile && emerge mirrorselect && mirrorselect -i -o >> /etc/make.conf && mirrorselect -i -r -o >> /etc/make.conf && emerge --sync && eselect profile set # && cp /usr/share/zoneinfo/America/Toronto /etc/localtime && echo America/Toronto > /etc/localtime && emerge gentoo-sources && emerge pciutils && emerge gentoolkit && cd /usr/src/linux && make menuconfig && make && make modules_install && cp arch/x86_64/boot/bzImage /boot/kernel-3.4.5-gentoo && nano -w /etc/fstab && nano -w /etc/conf.d/hostname && emerge wicd && rc-update add wicd boot && passwd && nano -w /etc/rc.conf && nano -w /etc/conf.d/keymaps && nano -w /etc/conf.d/hwclock && echo America/Toronto > /etc/timezone && emerge syslog-ng logrotate && rc-update add syslog-ng default && emerge dcron && rc-update add dcron default && crontab /etc/crontab && emerge mlocate && nano -w /etc/fstab && nano -w /etc/conf.d/net && nano -w /etc/hosts && nano -w /etc/rc.conf && nano -w /etc/conf.d/keymaps && nano -w /etc/conf.d/hwclock && nano -w /etc/locale.gen && locale-gen && emerge dbus && rc-update add dbus default && emerge consolekit && rc-update add consolekit default && env-update && source /etc/profile && emerge cups hplip && nano -w /etc/conf.d/modules && add a user useradd -m -G users,wheel,audio,cdrom,floppy,games,portage,usb,video -s /bin/bash name && exit && cd && umount -l /mnt/gentoo/dev{/shm,/pts,} && umount -l /mnt/gentoo{/boot,/proc,} && reboot



Please note that there are bits in this command that require the user to change certain values such as "foo" or "#" or "name" .
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10261
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jul 18, 2012 7:48 pm    Post subject: Reply with quote

The rest of the script after chroot won't be executed in the chroot. Busted. :wink:

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
cravengemetzel
n00b
n00b


Joined: 12 Mar 2012
Posts: 40

PostPosted: Wed Jul 18, 2012 7:52 pm    Post subject: Reply with quote

Oh sorry, I forgot about that . Here, you may put in the effort that it takes to copy/paste two commands instead of one . LOL . (:

Quote:
# mount /dev/foo /mnt/gentoo && cp /foo/stage3-*.tar.bz2 /mnt/gentoo && cd /mnt/gentoo && tar xvjpf stage3-*.tar.bz2 && rm stage3-*.tar.bz2 && cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf && links http://www.gentoo.org/main/en/mirrors.xml && tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr && nano -w /mnt/gentoo/etc/make.conf && mount -t proc none /mnt/gentoo/proc && mount --rbind /dev /mnt/gentoo/dev && chroot /mnt/gentoo /bin/bash

# env-update && source /etc/profile && emerge mirrorselect && mirrorselect -i -o >> /etc/make.conf && mirrorselect -i -r -o >> /etc/make.conf && emerge --sync && eselect profile set # && cp /usr/share/zoneinfo/America/Toronto /etc/localtime && echo America/Toronto > /etc/timezone && emerge gentoo-sources && emerge pciutils && emerge gentoolkit && cd /usr/src/linux && make menuconfig && make && make modules_install && cp arch/x86_64/boot/bzImage /boot/kernel-3.4.5-gentoo && nano -w /etc/fstab && nano -w /etc/conf.d/hostname && emerge wicd && rc-update add wicd boot && passwd && nano -w /etc/rc.conf && nano -w /etc/conf.d/keymaps && nano -w /etc/conf.d/hwclock && emerge syslog-ng logrotate && rc-update add syslog-ng default && emerge dcron && rc-update add dcron default && crontab /etc/crontab && emerge mlocate && nano -w /etc/fstab && nano -w /etc/conf.d/net && nano -w /etc/hosts && nano -w /etc/rc.conf && nano -w /etc/conf.d/keymaps && nano -w /etc/conf.d/hwclock && nano -w /etc/locale.gen && locale-gen && emerge dbus && rc-update add dbus default && emerge consolekit && rc-update add consolekit default && env-update && source /etc/profile && emerge cups hplip && nano -w /etc/conf.d/modules && add a user useradd -m -G users,wheel,audio,cdrom,floppy,games,portage,usb,video -s /bin/bash name && exit && cd && umount -l /mnt/gentoo/dev{/shm,/pts,} && umount -l /mnt/gentoo{/boot,/proc,} && reboot



Please note that there are bits in this command that require the user to change certain values such as "foo" or "#" or "name" or "America/Toronto" .


Last edited by cravengemetzel on Tue Jul 31, 2012 4:35 pm; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jul 18, 2012 8:01 pm    Post subject: Reply with quote

cravengemetzel,

There is no need for two scripts. The change to execute a piece of the script inside the chroot is left as an exercise for the reader :)
_________________
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
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10261
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jul 18, 2012 8:04 pm    Post subject: Reply with quote

We just issue homework left and right, don't we? :P
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
cravengemetzel
n00b
n00b


Joined: 12 Mar 2012
Posts: 40

PostPosted: Wed Jul 18, 2012 8:51 pm    Post subject: Reply with quote

Ahaha, don't worry about shooting homework . When I improve on knowledge that I have on Linux in these Gentoo forums (and I also frequent the Debian ones, as I have a Wheezy/Sid system as well), it is only to my benefit . I am amazed at the candidness displayed in these GNU/Linux forums, for such an open and comfortable and useful community is virtually nonexistent when in use of commercial systems .

There is not one University program that could have captivated my interest on Computer Sciences and maintained it for such a while as I would actually look forward to writing code and editing code until the gain of the basic knowledge required to advance to more complex and difficult levels is achieved . At least, that is my view of things, and it is why I am open to improving and correcting myself, with gratitude to community members like you, who devote their personal time to the Gentoo Linux community .
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Jul 19, 2012 6:45 pm    Post subject: Reply with quote

cravengemetzel ...

The problem with such a "foolproof" solution is that it rarely is ... retval doesn't always provide for success, eg:

Code:
% vim test && echo "success"
^z
% fg
:zz
%

So, such things can (and do) fail, then you have to edit your command to get to the point where you can continue ...

Additionally, your commands are specific ... and yet not, for instance, "America/Torronto" (specific), and "foo" (un-specific). If you want to do things this way then you can at least pause for user input (this is the reason that such attempts at automating the process often fail, there are too many factors involved to make a one-size-fits-all solution, plus automism tends to subtract the user, and so lessen the knowledge aquired by 'doing'). That said, you can make your retval more robust, and provide for some user input like so:

Code:
#!/bin/bash

function ask()
{   
    echo -n "$@" '[y/n] ' ; read ans
    case "$ans" in
        y*|Y*) return 0 ;;
        *) return 1 ;;
    esac
}

ask "Question 1?"
    if [[ "$?" = 0 ]] ; then
        echo -e "Please provide a path|value|name: "
        read var
        echo "${var}" >> /path/to/file
    else
        :
    fi

ask "Question 2?"
    if [[ "$?" = 0 ]] ; then
        echo -e "Please provide a value|name: "
        read var
        mount /dev/"${var}" /mnt/gentoo
    else
        :
    fi

exit

This isn't perfect, I provide it just as an example to illustrate how you might go about automating it ... in my case I would rather avoid such things as automation is generally inflexable, and being able to adapt to circumstance is what humans do well, so its better to invest in skill than in automation ... at least for those things where human skill outperforms machine automation.

best ... khay
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Fri Jul 20, 2012 7:16 am    Post subject: Reply with quote

I've written some "foolproof" scripts to update Gentoo from a running Gentoo, since
I usually re-install rather than update. The trouble is, each time I use the scripts something
in Gentoo or Linux has changed slightly, and the scripts need modifying. For me, the
scripts are still a great time-saver, but they wouldn't be any use to someone who didn't
habitually install Gentoo.

On the whole, the Gentoo install instructions still seem the best approach for a new
user.

Will
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Fri Jul 20, 2012 8:14 am    Post subject: Reply with quote

interesting script - though I doubt that anything can be made foolproof as long as the universe is building better idiots... :roll:


Code:
cp /usr/share/zoneinfo/America/Toronto /etc/localtime && echo America/Toronto > /etc/localtime

cravengemetzel: would you mind care to explain, what those commands intend to do? especially as the second overwrites the changes made by the first one.
and there is an additional echo America/Toronto > /etc/localtime further down...


just my .02$
V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
cravengemetzel
n00b
n00b


Joined: 12 Mar 2012
Posts: 40

PostPosted: Thu Jul 26, 2012 11:33 pm    Post subject: Reply with quote

Veldrin wrote:
interesting script - though I doubt that anything can be made foolproof as long as the universe is building better idiots... :roll:


Code:
cp /usr/share/zoneinfo/America/Toronto /etc/localtime && echo America/Toronto > /etc/localtime

cravengemetzel: would you mind care to explain, what those commands intend to do? especially as the second overwrites the changes made by the first one.
and there is an additional echo America/Toronto > /etc/localtime further down...


just my .02$
V.



I used those commands to set the timezone (and thus time) for my system .. Thanks for pointing that out, it might explain why my computer never displays the right time ..

Where I got the idea of such commands, I've forgotten by now . They must have either come out of the Gentoo Handbook, or an Installation Guide/Tutorial that I saw somewhere on the website .
Back to top
View user's profile Send private message
Odward
n00b
n00b


Joined: 21 Mar 2012
Posts: 65

PostPosted: Fri Jul 27, 2012 6:36 am    Post subject: Reply with quote

Code:
cp /usr/share/zoneinfo/America/Toronto /etc/localtime && echo America/Toronto > /etc/localtime

Just for clarity I looked at the handbook. You probably just made a typo of sorts, the 2nd command in this example should have been
Code:
echo America/Toronto > /etc/timezone


timezone, not localtime again
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Mon Jul 30, 2012 2:57 am    Post subject: Reply with quote

cravengemetzel wrote:

Here is my finished command for the Gentoo Community's enjoyment:


Code:
# mount /dev/foo /mnt/gentoo && cp /foo/stage3-*.tar.bz2 /mnt/gentoo && cd /mnt/gentoo && tar xvjpf stage3-*.tar.bz2 && rm stage3-*.tar.bz2 && cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf && links http://www.gentoo.org/main/en/mirrors.xml && tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr && nano -w /mnt/gentoo/etc/make.conf && mount -t proc none /mnt/gentoo/proc && mount --rbind /dev /mnt/gentoo/dev && chroot /mnt/gentoo /bin/bash && env-update && source /etc/profile && emerge mirrorselect && mirrorselect -i -o >> /etc/make.conf && mirrorselect -i -r -o >> /etc/make.conf && emerge --sync && eselect profile set # && cp /usr/share/zoneinfo/America/Toronto /etc/localtime && echo America/Toronto > /etc/localtime && emerge gentoo-sources && emerge pciutils && emerge gentoolkit && cd /usr/src/linux && make menuconfig && make && make modules_install && cp arch/x86_64/boot/bzImage /boot/kernel-3.4.5-gentoo && nano -w /etc/fstab && nano -w /etc/conf.d/hostname && emerge wicd && rc-update add wicd boot && passwd && nano -w /etc/rc.conf && nano -w /etc/conf.d/keymaps && nano -w /etc/conf.d/hwclock && echo America/Toronto > /etc/timezone && emerge syslog-ng logrotate && rc-update add syslog-ng default && emerge dcron && rc-update add dcron default && crontab /etc/crontab && emerge mlocate && nano -w /etc/fstab && nano -w /etc/conf.d/net && nano -w /etc/hosts && nano -w /etc/rc.conf && nano -w /etc/conf.d/keymaps && nano -w /etc/conf.d/hwclock &&  nano -w /etc/locale.gen && locale-gen && emerge dbus && rc-update add dbus default && emerge consolekit && rc-update add consolekit default && env-update && source /etc/profile && emerge cups hplip && nano -w /etc/conf.d/modules && add a user useradd -m -G users,wheel,audio,cdrom,floppy,games,portage,usb,video -s /bin/bash name && exit && cd && umount -l /mnt/gentoo/dev{/shm,/pts,} && umount -l /mnt/gentoo{/boot,/proc,} && reboot



:D :D Lol, reminds me of that old joke... "installing gentoo is easy, it just takes 2 commands"... and then that kind of code stuff.." Don't get me wrong, I love it! Gonna post that on FB now, haha
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
cravengemetzel
n00b
n00b


Joined: 12 Mar 2012
Posts: 40

PostPosted: Tue Jul 31, 2012 4:32 pm    Post subject: Reply with quote

Odward wrote:
Code:
cp /usr/share/zoneinfo/America/Toronto /etc/localtime && echo America/Toronto > /etc/localtime

Just for clarity I looked at the handbook. You probably just made a typo of sorts, the 2nd command in this example should have been
Code:
echo America/Toronto > /etc/timezone


timezone, not localtime again


Thank you ! Makes sense now, and fixing in my little code blurp . (:



Martux wrote:
cravengemetzel wrote:

Here is my finished command for the Gentoo Community's enjoyment:


Code:
# mount /dev/foo /mnt/gentoo && cp /foo/stage3-*.tar.bz2 /mnt/gentoo && cd /mnt/gentoo && tar xvjpf stage3-*.tar.bz2 && rm stage3-*.tar.bz2 && cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf && links http://www.gentoo.org/main/en/mirrors.xml && tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr && nano -w /mnt/gentoo/etc/make.conf && mount -t proc none /mnt/gentoo/proc && mount --rbind /dev /mnt/gentoo/dev && chroot /mnt/gentoo /bin/bash && env-update && source /etc/profile && emerge mirrorselect && mirrorselect -i -o >> /etc/make.conf && mirrorselect -i -r -o >> /etc/make.conf && emerge --sync && eselect profile set # && cp /usr/share/zoneinfo/America/Toronto /etc/localtime && echo America/Toronto > /etc/localtime && emerge gentoo-sources && emerge pciutils && emerge gentoolkit && cd /usr/src/linux && make menuconfig && make && make modules_install && cp arch/x86_64/boot/bzImage /boot/kernel-3.4.5-gentoo && nano -w /etc/fstab && nano -w /etc/conf.d/hostname && emerge wicd && rc-update add wicd boot && passwd && nano -w /etc/rc.conf && nano -w /etc/conf.d/keymaps && nano -w /etc/conf.d/hwclock && echo America/Toronto > /etc/timezone && emerge syslog-ng logrotate && rc-update add syslog-ng default && emerge dcron && rc-update add dcron default && crontab /etc/crontab && emerge mlocate && nano -w /etc/fstab && nano -w /etc/conf.d/net && nano -w /etc/hosts && nano -w /etc/rc.conf && nano -w /etc/conf.d/keymaps && nano -w /etc/conf.d/hwclock &&  nano -w /etc/locale.gen && locale-gen && emerge dbus && rc-update add dbus default && emerge consolekit && rc-update add consolekit default && env-update && source /etc/profile && emerge cups hplip && nano -w /etc/conf.d/modules && add a user useradd -m -G users,wheel,audio,cdrom,floppy,games,portage,usb,video -s /bin/bash name && exit && cd && umount -l /mnt/gentoo/dev{/shm,/pts,} && umount -l /mnt/gentoo{/boot,/proc,} && reboot



:D :D Lol, reminds me of that old joke... "installing gentoo is easy, it just takes 2 commands"... and then that kind of code stuff.." Don't get me wrong, I love it! Gonna post that on FB now, haha




Hehehe, you mean this ? http://uncyclopedia.wikia.com/wiki/Gentoo It is what inspired me to make my own little installation code snippet in the first place . ^^
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Wed Aug 01, 2012 12:19 am    Post subject: Reply with quote

Quote:

Hehehe, you mean this ? http://uncyclopedia.wikia.com/wiki/Gentoo It is what inspired me to make my own little installation code snippet in the first place . ^^


Yes, exactly. "Easily memorable..." lol
This kind of makes me appetite to reinstall myself, if it was not completely pointless (because of "everything works just fine").
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
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