Archive

Posts Tagged ‘howto’

Howto run MAC OSX on VirtualBox 3.2

April 30th, 2010 linfati.cl No comments

You need:

  • VirtualBox 3.2
  • Original DVD of OSX Leopard or Snow leopard (the DMG or ISO will not work)
  • An MAC running OSX (on mac running linux or windows will not work)

Procedure:

  • Create a new Virtual Machine on VirtualBox
  • Name it osx, and do next, next, next, next, next…
  • Edit the Virtual Machine and setup the virtual cdrom to “Host Cdrom”
  • Start the virtual machine

What Happens if i not have the original dvd, and use an iso image of the 5th partition of the dmg file.
run before install:

 VBoxManage setextradata osx "VBoxInternal2/EfiBootArgs" "-v rd=disk1" 

run after install:

 VBoxManage setextradata osx  "VBoxInternal2/EfiBootArgs" "" 

Why OSX on Virtualbox boot in verbose mode?
is the default setting, to change it run:

 VBoxManage  setextradata osx "VBoxInternal2/EfiBootArgs" "   " 

NOTE: is “_space_”

How run OSX on MAC hardware, but over Linux or Windows?
You need know yours OSK0 and OSK1 hardware key to desencrypt the installer and applications (finder, etc) on fly. If you not have the OSK0 and OSK1 the installer will not run (only will see a blue screen with a mouse pointer). The OSK0 and OSK1 is loaded AUTOMATICLY on mac hardware running osx.

How setup manually the OSK0 and OSK1 hardware key?
run:

 VBoxManage setextradata osx "VBoxInternal2/SmcDeviceKey"  "yours_osk0_and_osk1_concatenated_in_ascii" 

How know my OSK0 and OSK1 hardware keys?
Use google.

osx_on_virtualbox (by Rodrigo Linfati)

Categories: linfati.cl Tags: , , ,

How to boot a Ubuntu Live iso from grub

April 4th, 2010 linfati.cl 4 comments

Create a directory to copy the Ubuntu Live iso

mkdir /boot/ubuntu-isos/
cp lucid-desktop-i386.iso /boot/ubuntu-isos/

Create a script /etc/grub.d/40_ubuntu-iso to auto-detect the iso image at the directory

#!/bin/sh

set -e

IMAGES=/boot/ubuntu-isos/
. /usr/lib/grub/grub-mkconfig_lib

for isofile in ${IMAGES}*.iso
do
      IMAGEPATH=$( make_system_path_relative_to_its_root "$isofile" )
      echo "Found ubuntu iso image: $IMAGEPATH" >&2
      cat << EOF
menuentry "Bootable iso: $(basename $IMAGEPATH | sed s/.iso//)" {
EOF
      prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
      cat << EOF
	loopback loop $isofile
	linux (loop)/casper/vmlinuz boot=casper console-setup/layoutcode=latam locale=es_CL.UTF-8 iso-scan/filename=$isofile quiet splash noeject noprompt --
	initrd (loop)/casper/initrd.lz
}
EOF
done

and run update-grub2

NOTE: the iso boot on SPANISH with a LatinoAmerican keyboard, please change “console-setup/layoutcode=latam locale=es_CL.UTF-8″ or delete it.

Categories: linfati.cl Tags: , ,

pbuilder and chroot

February 5th, 2010 linfati.cl No comments

Build a Chroot with debootstrap, example a Ubuntu lucid

sudo debootstrap lucid /opt/chroots/lucid.linfati.cl/

now, create a /usr/local/bin/go-chroot file with

#/bin/sh

case "$1" in
  sethost)
	echo virtu-$2 | sudo tee /opt/chroots/$2.linfati.cl/etc/debian_chroot
	;;
  run)
	sudo pbuilder --execute \
	--aptcache "" \
	--no-targz \
	--buildplace /opt/chroots/$2.linfati.cl \
	-- /bin/su -
	;;
  *)
	$0 sethost $1
	$0 run $1
	;;
esac

exit 0

and run

go-chroot lucid
Categories: linfati.cl Tags: , , , , ,

auto-connect to ssh vpn using upstart

December 19th, 2009 linfati.cl No comments

if you have a ssh keys configured to root user in a ssh-server, you can do a vpn over ssh using a tun interface

copy the text to /etc/init/vpn2ssh.conf, change 1.2.3.4 for the ip of the vpn server and do “start vpn2ssh”

# vpn2ssh - vpn over ssh to ssh server manager
#
# vpn over ssh to ssh server manager

description "vpn over ssh to va.linfati.cl manager"
author "Rodrigo Linfati <rodrigo@linfati.cl>"
version "0.1"

start on started gdm
stop on stopping gdm

respawn
expect fork

env vpnserver=1.2.3.4
env idtun=309
env iplocal=172.30.9.2
env ipremote=172.30.9.1

pre-start exec sleep 60
exec ssh -C -f -w $idtun:$idtun $vpnserver ifconfig tun$idtun $ipremote pointopoint $iplocal  up
post-start exec                            ifconfig tun$idtun $iplocal  pointopoint $ipremote up

Note: on ssh server need “PermitTunnel=yes” on sshd_config

Categories: linfati.cl Tags: , ,

Howto Configurar IPV6 en Centos 5

June 8th, 2009 linfati.cl No comments

Modificamos los siguientes archivos

/etc/sysconfig/network ( solo añadir lineas que falten )

HOSTNAME=el_nombre_de_la_maquina
NETWORKING=yes
NETWORKING_IPV6=yes
IPV6_AUTOTUNNEL=yes

/etc/sysconfig/network-scripts/ifcfg-sit1″)

DEVICE=sit1
BOOTPROTO=none
ONBOOT=yes
IPV6INIT=yes
IPV6TUNNELIPV4=ipv4_servidor_del_tunel
IPV6TUNNELIPV4LOCAL=ipv4_cliente_del_tunel
IPV6ADDR=ipv6_cliente_del_tunel

/etc/sysconfig/static-routes-ipv6″)

sit1    2000::/3        ipv6_servidor_del_tunel

Y activamos la configuracion!

/etc/init.d/network reboot
Categories: linfati.cl Tags: , , , ,