Archive

Posts Tagged ‘como’

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: , ,

Install Maemo4 (diablo) and Maemo5 (freemantle) SDK

February 5th, 2010 linfati.cl No comments
#!/bin/sh

sh /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-nokia-binaries_4.1.2.sh

newgrp sbox < /bin/cat <<'END'

sb-conf st maemo5 -c cs2007q3-glibc2.5-i486 -d debian-etch:doctools:git:perl:svn -t none -f
sb-conf re maemo5 -f
sb-conf rs maemo5 /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-rootstrap_5.0_i386.tgz
sb-conf install maemo5 -L --etc --devkits --fakeroot
echo "# maemo5
deb http://repository.maemo.org/ fremantle/sdk free non-free
deb-src http://repository.maemo.org/ fremantle/sdk free non-free
deb http://repository.maemo.org/ fremantle/tools free non-free
deb-src http://repository.maemo.org/ fremantle/tools free non-free
deb http://repository.maemo.org/ fremantle/12345678901234567890 nokia-binaries
# deb http://repository.maemo.org/extras fremantle free non-free
# deb-src http://repository.maemo.org/extras fremantle free non-free
# deb http://repository.maemo.org/extras-testing fremantle free non-free
# deb-src http://repository.maemo.org/extras-testing fremantle free non-free
# deb http://repository.maemo.org/extras-devel fremantle free non-free
# deb-src http://repository.maemo.org/extras-devel fremantle free non-free" > /scratchbox/users/rlinfati/targets/maemo5/etc/apt/sources.list
rm /scratchbox/users/rlinfati/targets/maemo5/opt
mkdir /scratchbox/users/rlinfati/targets/maemo5/opt

sb-conf st n900 -c cs2007q3-glibc2.5-arm7 -d debian-etch:doctools:git:perl:svn:qemu -t qemu-arm-sb -f
sb-conf re n900 -f
sb-conf rs n900 /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-rootstrap_5.0_armel.tgz
sb-conf install n900 -L --etc --devkits --fakeroot
echo "export DEB_BUILD_OPTIONS=maemo-launcher,thumb,vfp" > /scratchbox/users/rlinfati/targets/n900.environment
echo "# maemo5
deb http://repository.maemo.org/ fremantle/sdk free non-free
deb-src http://repository.maemo.org/ fremantle/sdk free non-free
deb http://repository.maemo.org/ fremantle/tools free non-free
deb-src http://repository.maemo.org/ fremantle/tools free non-free
deb http://repository.maemo.org/ fremantle/4bc37c7c77ebe90177c050b805a8dc79 nokia-binaries
# deb http://repository.maemo.org/extras fremantle free non-free
# deb-src http://repository.maemo.org/extras fremantle free non-free
# deb http://repository.maemo.org/extras-testing fremantle free non-free
# deb-src http://repository.maemo.org/extras-testing fremantle free non-free
# deb http://repository.maemo.org/extras-devel fremantle free non-free
# deb-src http://repository.maemo.org/extras-devel fremantle free non-free" > /scratchbox/users/rlinfati/targets/n900/etc/apt/sources.list
rm /scratchbox/users/rlinfati/targets/n900/opt
mkdir /scratchbox/users/rlinfati/targets/n900/opt

sb-conf st maemo4 -c cs2007q3-glibc2.5-i486 -d debian-etch:doctools:git:perl:svn -t none -f
sb-conf re maemo4 -f
sb-conf rs maemo4 /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-rootstrap_4.1.2_i386.tgz
sb-conf install maemo4 -L --etc --devkits --fakeroot
echo "# maemo4
deb http://repository.maemo.org/ diablo/sdk free non-free
deb-src http://repository.maemo.org/ diablo/sdk free
deb http://repository.maemo.org/ diablo/tools free non-free
deb-src http://repository.maemo.org/ diablo/tools free
deb file:/home/rlinfati/maemo-sdk-nokia-binaries_4.1.2 diablo explicit
# deb http://repository.maemo.org/extras diablo free non-free
# deb-src http://repository.maemo.org/extras diablo free non-free
# deb http://repository.maemo.org/extras-devel diablo free non-free
# deb-src http://repository.maemo.org/extras-devel diablo free non-free" > /scratchbox/users/rlinfati/targets/maemo4/etc/apt/sources.list

sb-conf st n8x0 -c cs2007q3-glibc2.5-arm6 -d debian-etch:doctools:git:perl:svn:qemu -t qemu-arm-sb -f
sb-conf re n8x0 -f
sb-conf rs n8x0 /scratchbox/users/rlinfati/home/rlinfati/maemo-sdk-rootstrap_4.1.2_armel.tgz
sb-conf install n8x0 -L --etc --devkits --fakeroot
echo "export DEB_BUILD_OPTIONS=maemo-launcher,thumb,vfp" > /scratchbox/users/rlinfati/targets/n8x0.environment
echo "# maemo4
deb http://repository.maemo.org/ diablo/sdk free non-free
deb-src http://repository.maemo.org/ diablo/sdk free
deb http://repository.maemo.org/ diablo/tools free non-free
deb-src http://repository.maemo.org/ diablo/tools free
deb file:/home/rlinfati/maemo-sdk-nokia-binaries_4.1.2 diablo explicit
# deb http://repository.maemo.org/extras diablo free non-free
# deb-src http://repository.maemo.org/extras diablo free non-free
# deb http://repository.maemo.org/extras-devel diablo free non-free
# deb-src http://repository.maemo.org/extras-devel diablo free non-free" > /scratchbox/users/rlinfati/targets/n8x0/etc/apt/sources.list

echo export DISPLAY=:2 > /scratchbox/users/rlinfati/home/rlinfati/.bashrc

END
Categories: linfati.cl Tags: , ,

Boot a floppy image from grub2

February 5th, 2010 linfati.cl 1 comment

Create a directory for the boot image and copy memdisk to /boot

mkdir /boot/images/
aptitude install syslinux
cp /usr/lib/syslinux/memdisk /boot

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

#!/bin/sh

set -e

IMAGES=/boot/images
. /usr/lib/grub/grub-mkconfig_lib
if test -e /boot/memdisk ; then
  MEMDISKPATH=$( make_system_path_relative_to_its_root "/boot/memdisk" )
  echo "Found memdisk: $MEMDISKPATH" >&2
  find $IMAGES -name "*.img" | sort |
  while read image ; do
      IMAGEPATH=$( make_system_path_relative_to_its_root "$image" )
      echo "Found floppy image: $IMAGEPATH" >&2
      cat << EOF
menuentry "Bootable floppy: $(basename $IMAGEPATH | sed s/.img//)" {
EOF
      prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
      cat << EOF
        linux16 $MEMDISKPATH bigraw
        initrd16 $IMAGEPATH
}
EOF
  done
fi

# exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

and call update-grub2

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: , , , , ,

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: , , , ,