Difference between revisions of "Vnx-rootfsfreebsd"
Line 49: | Line 49: | ||
<li>Follow FreeBSD installation menus to install a basic system with DHCP configured in the network interface, a user named "vnx", and after that:</li> | <li>Follow FreeBSD installation menus to install a basic system with DHCP configured in the network interface, a user named "vnx", and after that:</li> | ||
<ul> | <ul> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<li>Install bash and change package repository:</li> | <li>Install bash and change package repository:</li> | ||
pkg_add -r bash | pkg_add -r bash | ||
Line 65: | Line 58: | ||
<li>Disable DHCP on network interface by editing the /etc/rc.conf file and commenting the following line:</li> | <li>Disable DHCP on network interface by editing the /etc/rc.conf file and commenting the following line:</li> | ||
ifconfig_re0="DHCP" | ifconfig_re0="DHCP" | ||
+ | <li>Install VNX autoconfiguration daemon to:</li> | ||
+ | /usr/sbin/vnxdaemon.pl | ||
+ | chown root:wheel /usr/sbin/vnxdaemon.pl | ||
+ | chmod 555 /usr/sbin/vnxdaemon.pl | ||
+ | /etc/rc.d/vnxdaemon | ||
+ | chown root:wheel /etc/rc.d/vnxdaemon | ||
+ | chmod 555 /etc/rc.d/vnxdaemon | ||
<li>Optional: allow root login thorugh ssh by editing /etc/ssh/sshd_config file:</li> | <li>Optional: allow root login thorugh ssh by editing /etc/ssh/sshd_config file:</li> | ||
PermitRootLogin yes | PermitRootLogin yes |
Revision as of 23:57, 15 December 2010
How to create a Freebsd root-file-system for VNX
- Create the filesystem disk image:
qemu-img create -f qcow2 root_fs_freebsd-base.qcow2 5GB
wget ftp://ftp.rediris.es/mirror/FreeBSD/ISO-IMAGES-i386/8.1/FreeBSD-8.1-RELEASE-i386-disc1.iso cp FreeBSD-8.1-RELEASE-i386-disc1.iso /almacen/iso
<domain type='kvm'> <name>Freebsd</name> <memory>524288</memory> <vcpu>1</vcpu> <os> <type arch="i686">hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> </os> <features> <pae/> <acpi/> <apic/> </features> <clock sync="localtime"/> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <source file='/usr/share/vnx/filesystems/root_fs_freebsd-base.qcow2'/> <target dev='hda'/> </disk> <disk type='file' device='cdrom'> <source file='/almacen/iso/FreeBSD-8.1-RELEASE-i386-disc1.iso'/> <target dev='hdb'/> </disk> <interface type='network'> <source network='default'/> </interface> <graphics type='vnc'/> </devices> </domain>
Note: change "source file=" lines to whatever fits your case (use full paths).
virsh create root_fs_freebsd.xml
virt-viewer freebsd
- Install bash and change package repository:
pkg_add -r bash pw usermod root -s /usr/local/bin/bash pw usermod vnx -s /usr/local/bin/bash echo "export PACKAGEROOT=ftp://ftp.es.freebsd.org" > ~/.bash_profile
pkg_add -r perl p5-libxml-enno
ifconfig_re0="DHCP"
/usr/sbin/vnxdaemon.pl chown root:wheel /usr/sbin/vnxdaemon.pl chmod 555 /usr/sbin/vnxdaemon.pl /etc/rc.d/vnxdaemon chown root:wheel /etc/rc.d/vnxdaemon chmod 555 /etc/rc.d/vnxdaemon
PermitRootLogin yes
export LANG=es_ES.UTF-8 export LC_ALL=es_ES.UTF-8
- Install packages needed:
pkg_add -r xorg-minimal gnome2-lite gdm
gname_enable="YES"
proc /proc procfs rw 0 0
autoboot_delay="3"
pw usermod vnx -G wheel
http://www.freebsd.org/gnome/docs/faq2.html#q23
halt -p
Note: after installing gnome, you probaly will get the following error message on the console:
acd0: FAILURE - unknown CMD (0x03) ILLEGAL REQUEST asc=0x20 ascq=0x00
To eliminate them you can execute:
hal-disable-polling --device /dev/acd0
Installing additional software
To install additional software or modify your root file system, you just have to start it as described above and:
- Configure network interface with:
dhclient re0
pkg_add -r apache22
halt -p