Created
May 6, 2015 03:42
-
-
Save pefoley2/cc1d6555683f453301fa to your computer and use it in GitHub Desktop.
Automated installer!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'read -s -n 1 -t 5 -p "Press any key to exit" && exit | |
/stage1.sh |& tee log | |
chroot /mnt/gentoo /stage2.sh |& tee -a log | |
mv log /mnt/gentoo | |
rm /mnt/gentoo/stage2.sh | |
init 0' >> etc/local.d/auto.start | |
chmod +x etc/local.d/auto.start | |
cp mnt/cdrom/stage*.sh . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label linux | |
kernel gentoo | |
append root=/dev/ram0 loop=squashfs initrd=initrd cdroot quiet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd if=/dev/zero of=/dev/sda bs=512 count=1 | |
echo -e "n\np\n\n\n+1G\nn\np\n\n\n\nt\n1\n82\nw\n" | fdisk /dev/sda | |
mkswap /dev/sda1 | |
swapon /dev/sda1 | |
mkfs.ext4 /dev/sda2 | |
mount /dev/sda2 /mnt/gentoo | |
tar xf /mnt/cdrom/stage3.tbz2 -C /mnt/gentoo | |
tar xf /mnt/cdrom/portage.tar.xz -C /mnt/gentoo/usr | |
mount -B /dev /mnt/gentoo/dev | |
cp stage2.sh /mnt/gentoo/ | |
ifconfig | |
dhcpcd | |
cp /etc/resolv.conf /mnt/gentoo/etc/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env-update | |
source /etc/profile | |
mount -t proc proc /proc | |
mount -t devpts devpts /dev/pts | |
emerge -q --sync | |
eselect news read | |
echo 'ACCEPT_KEYWORDS="~amd64" | |
CFLAGS="-O2 -pipe -march=native" | |
CXXFLAGS="${CFLAGS}" | |
USE="symlink graphite lto -nls"'> /etc/make.conf | |
mkdir /etc/portage | |
echo '=sys-apps/portage-2* **' > /etc/portage/package.keywords | |
echo 'sys-boot/grub' > /etc/portage/package.unmask | |
emerge -quDN world grub vanilla-sources dhcpcd app-misc/screen nano | |
emerge -c | |
gcc-config 1 | |
source /etc/profile | |
emerge @preserved-rebuild | |
perl-cleaner --all -- -q | |
python-updater -- -q | |
echo -5 | etc-update | |
mkdir /root/kernel | |
make -C /usr/src/linux O=/root/kernel defconfig | |
echo 'CONFIG_KERNEL_XZ=y | |
CONFIG_IKCONFIG=y | |
CONFIG_IKCONFIG_PROC=y | |
CONFIG_PCNET32=y | |
CONFIG_EXT4_FS=y | |
CONFIG_EXT3_FS=n | |
CONFIG_NETFILTER_XT_MARK=n | |
CONFIG_DEBUG_NX_TEST=n | |
CONFIG_AGP_INTEL=n' >>/root/kernel/.config | |
yes "" | make -C /root/kernel oldconfig | |
make -j5 -C /root/kernel | |
cp /root/kernel/arch/x86/boot/bzImage /boot/kernel | |
rm /etc/localtime | |
ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime | |
sed -i -e "/BOOT\|fd0/d" -e "s/ROOT/sda2/" -e "s/SWAP/sda1/" \ | |
-e "s/ext3/ext4/" /etc/fstab | |
sed -i "s/root:\*/root:/" /etc/shadow | |
sed -i "s/\#rc_sys/rc_sys/" /etc/rc.conf | |
grub2-install /dev/sda | |
echo 'set timeout=0 | |
menuentry "Gentoo Linux" { | |
set root=(hd0,2) | |
linux /boot/kernel quiet | |
}' > /boot/grub2/grub.cfg | |
echo "passwd&&rm ~/.bash_profile" > /root/.bash_profile | |
cd /etc/init.d | |
ln -s net.lo net.eth0 | |
rc-update add net.eth0 default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ln -s /usr/share/zoneinfo/$(tzselect) /etc/localtime