Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "Checklist:"
- echo "[ ] ip address static?"
- echo "[ ] ceph config stored on ceph3?"
- echo "[ ] kernel config stored on ceph3?"
- read n #just to wait...
- echo -n "installing required basic packages... "
- apt-get -y install bash-completion bzip2 build-essential ssh ncurses-dev iftop screen dvtm pciutils htop less uuid-dev e2fslibs-dev libacl1-dev zlib1g-dev > /dev/null
- echo "done"
- read n
- #FIXME: THIS KEYFILE HAS AN EMPTY PASSPHRASE
- echo "generating SSH keys ... "
- ssh-keygen -t rsa -f ~/.ssh/id_rsa -N ""
- echo "done"
- echo -n "adding static entries for /etc/hosts... "
- echo "172.30.100.110 ceph01" >> /etc/hosts
- echo "172.30.100.111 ceph02" >> /etc/hosts
- echo "172.30.100.112 ceph03" >> /etc/hosts
- echo "done"
- echo "announcing this host to the other ones via SSH... "
- for i in ceph01 ceph02 ceph03; do
- ssh-copy-id -i ~/.ssh/id_rsa.pub $i
- done
- echo "done"
- echo -n "getting and installing btrfs-tools 0.19... "
- wget http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/btrfs-progs-0.19.tar.gz
- tar xf btrfs-progs-0.19.tar.gz
- cd btrfs-progs-0.19/
- make clean
- make > /dev/null
- make convert
- make install
- echo "done"
- echo -n "downloading and extracting kernel... "
- #wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.3.tar.bz2 #> /dev/null
- scp ceph01:/root/linux-2.6.38.3.tar.bz2 .
- tar xf linux-2.6.38.3.tar.bz2 -C /usr/src
- ln -s /usr/src/linux-2.6.38.3.tar.bz2/ /usr/src/linux
- echo "done"
- echo -n "getting kernel config file from ceph01... "
- scp ceph01:/root/.config /usr/src/linux
- echo -n "compiling kernel... "
- cd /usr/src/linux
- make -j3
- make -j3 install
- make -j3 modules
- make -j3 modules_install
- mkinitramfs -k 2.6.38.3 -o /boot/initrd.img-2.6.38.3
- update-grub
- echo "done (hopefully...)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement