Posts Tagged ‘gentoo’

7th April
2010
written by Nick Anderson

I don’t know how many of you know that I am a recovering gentoo user. One of the staples of my desktop used to be keychain. Keychain is a simple wrapper for ssh-agent and gpg-agent. It eases the use of a single long running agent per system instead of per login session. For some reason this tool had fallen out of my basket when I switched to debian several years ago. I’m glad to have it back.

It’s easy to install in debian based systems, simply

aptitude install keychain
echo "keychain ~/.ssh/id_rsa" >> ~/.bashrc
11th September
2006
written by Nick Anderson

I am in the process of setting up Xen on one of my new servers. Just sticking some notes here. Will clean them up later

inittab changes 1:2345:respawn:/sbin/mingetty tty1 #2:2345:respawn:/sbin/mingetty tty2 #3:2345:respawn:/sbin/mingetty tty3 #4:2345:respawn:/sbin/mingetty tty4 #5:2345:respawn:/sbin/mingetty tty5 #6:2345:respawn:/sbin/mingetty tty6 No need for kernel level ip address in xen config file set ip =”off”;

DO NOT SET eth0 to start on boot! just add xend to the default runlevel it will start eth0 for you! If you dont let xen do it for you your networking in domUs will be fubar.

[backdated from old website]

Tags: , ,
4th September
2006
written by Nick Anderson

I am in the process of setting up one of my new servers. Yes my old dual pIII machines are going to retire. They are going to live in a “retirement community” :P . Any way This time around I am going to use a mirror to protect my data. I never experienced a hardware failure before but I figure better safe than sorry right? So I am going to outline the steps needed to boot from a RAID0.

 

modprobe raid1
mknod /dev/md1 b 9 1
mknod /dev/md2 b 9 2
mknod /dev/md3 b 9 3

Now setup your /boot swap and / partitions on your first disk (I will assume sda). After you have created your partitions we need to make the second drive partition table match. (I assume your drives are the same size)

 

sfdisk -d /dev/sda | sfdisk /dev/sdb

Now we need to create the raids using mdadm

 

mdadm --create --verbose /dev/md1 --level=1 \
--raid-devices=2 /dev/sda1 /dev/sdb1
mdadm --create --verbose /dev/md2 --level=1 \
--raid-devices=2 /dev/sda2 /dev/sdb2
mdadm --create --verbose /dev/md3 --level=1 \
--raid-devices=2 /dev/sda3 /dev/sdb3

Or if you are lazy like me

 

for i in `seq 1 3`; do mknod /dev/md$i b 9 $i;\
mdadm --create /dev/md$i --level=1 --raid-devices=2\
/dev/sda$i /dev/sdb$i; done

Backup your raid config

 

mdadm --detail --scan >> /etc/mdadm.conf

You can monitor the status of your raids via /proc/mdstat

 

watch -n .1 "cat /proc/mdstat"

Once the raid is done syncing you need to create your file systems on your md devices and proceed with the normal install routine. You need to do a bit of extra work when installing grub to make sure its installed on both devices, as well as allows you extra options in case of raid failure.

 

grub>device (hd0) /dev/sda
grub>root (hd0,0)
grub>setup (hd0)
grub>device (hd0) /dev/sdb
grub>root (hd0,0)
grub>setup (hd0)
grub.conf
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz  

title=Gentoo (2.6.17-gentoo-r7)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.17-gentoo-r7 root=/dev/md3  

title=Gentoo (2.6.17-gentoo-r7) [mirror recovery]
        root (hd1,0)
        kernel /boot/vmlinuz-2.6.17-gentoo-r7 root=/dev/md3
 
 
 [backdated from old website]
Tags: ,

BLOGROLL

ARCHIVE