Check out the utility disk2vhd which is described here.
It creates a standard Virtual Machine Harddisk from a running Windows system so that the same pc can be run by different VM software distributions.
Browsers - Default proxy configuration
This is just to recall me ... ;-)
WPAD : Web Proxy Auto Discovery
To set automatic proxy configuration use the following line as an automatic proxy script reference:
http://wpad/wpad.dat
This assumes wpad can be found on the local network.
Else no proxy configuration is used.
WPAD : Web Proxy Auto Discovery
To set automatic proxy configuration use the following line as an automatic proxy script reference:
http://wpad/wpad.dat
This assumes wpad can be found on the local network.
Else no proxy configuration is used.
Move to OpenOffice from MS-OfficeInproductivity Suite
Ever wondered if macro's in OpenOffice are the same as they are in MS-Office?
Well ... they are definitively not.
While discussing the Famous takeover of Sun by Oracle, we got this magnificent product OpenOffice on top of it. So, having all these macro's in our inproductivity Suite we are a little bit stuck with MicroS.
A dear colleague - Marc - has already found some answer and solution to the question : http://www.business-spreadsheets.com/vba2oo.asp.
I have not tested it yet, but knowing Marc I believe him on his words - even those not honorable - that this is the way to go.
Thanks Marc!!
Well ... they are definitively not.
While discussing the Famous takeover of Sun by Oracle, we got this magnificent product OpenOffice on top of it. So, having all these macro's in our inproductivity Suite we are a little bit stuck with MicroS.
A dear colleague - Marc - has already found some answer and solution to the question : http://www.business-spreadsheets.com/vba2oo.asp.
I have not tested it yet, but knowing Marc I believe him on his words - even those not honorable - that this is the way to go.
Thanks Marc!!
Wake Up On Lan - the mistery
If you would be thinking that a simple access to a shutdown server would bring it up, you will have found out that is not at all the case.
I had the same kind of problem in my perception of what "wake on lan" could be and started sniffing around. On the 'net I found this very interesting article which will explain the concept - which is not to difficult - and provides along the way the solution by means of a piece of Java code. (the code is at the end of this article)
In a way of safeguarding this referenced article's information - and not having to look it up again - here's a kind of resumé.
A wake up on lan is performed by sending a very specific packet to a machine's NIC (= network interface card) which should have the WOL capability. Because it is the NIC which is addressed and not the computer's operating system itselve the addressing is done at the level of the MAC address.
The packets content, which is often named the 'magic packet', is composed of 6 bytes filled with 1bits (= ff:ff:ff:ff:ff:ff) followed by 6 bytes that contain the MAC address of the NIC, followed by a repetition of the MAC address bytes 'til the packet is full.
Attention should be taken that the packet gets transmitted upto the machines NIC. It is very useful to consider the network topology on which you are broadcasting (UDP packets) the Magic Packet. If for example you want to wake up your server from some lokation on the internet, you should enable port forwarding rules on your Internet Router).
A commandline tool exists (windows) which is called mc-cmd and can be downloaded from this location.
Further information can be found, obviously, on Wikipedia.
For those speaking French WOL should not be translated into LAINE .... it will not work ;-)
I reformatted the java code of the article to suite my own layout ...
I had the same kind of problem in my perception of what "wake on lan" could be and started sniffing around. On the 'net I found this very interesting article which will explain the concept - which is not to difficult - and provides along the way the solution by means of a piece of Java code. (the code is at the end of this article)
In a way of safeguarding this referenced article's information - and not having to look it up again - here's a kind of resumé.
A wake up on lan is performed by sending a very specific packet to a machine's NIC (= network interface card) which should have the WOL capability. Because it is the NIC which is addressed and not the computer's operating system itselve the addressing is done at the level of the MAC address.
The packets content, which is often named the 'magic packet', is composed of 6 bytes filled with 1bits (= ff:ff:ff:ff:ff:ff) followed by 6 bytes that contain the MAC address of the NIC, followed by a repetition of the MAC address bytes 'til the packet is full.
Attention should be taken that the packet gets transmitted upto the machines NIC. It is very useful to consider the network topology on which you are broadcasting (UDP packets) the Magic Packet. If for example you want to wake up your server from some lokation on the internet, you should enable port forwarding rules on your Internet Router).
A commandline tool exists (windows) which is called mc-cmd and can be downloaded from this location.
Further information can be found, obviously, on Wikipedia.
For those speaking French WOL should not be translated into LAINE .... it will not work ;-)
I reformatted the java code of the article to suite my own layout ...
import java.io.*;
import java.net.*;
public class WakeUpOnLan
{
// Define the port to be used to send the UDP packet
public static final int PORT = 9;
public static
void
main
( String[] args
)
{
if (args.length != 2)
{
System.out.println("Usage: java WakeOnLan ");
System.out.println("Example: java WakeOnLan 192.168.0.255 00:0D:61:08:22:4A");
System.out.println("Example: java WakeOnLan 192.168.0.255 00-0D-61-08-22-4A");
System.exit(1);
}
String ipStr = args[0];
String macStr = args[1];
try
{
byte[] macBytes = getMacBytes(macStr);
byte[] bytes = new byte[6 + 16 * macBytes.length];
for (int i = 0; i < 6; i++)
{
bytes[i] = (byte) 0xff;
}
for (int i = 6; i < bytes.length; i += macBytes.length)
{
System.arraycopy(macBytes, 0, bytes, i, macBytes.length);
}
InetAddress address = InetAddress.getByName(ipStr);
DatagramPacket packet = new DatagramPacket(bytes, bytes.length, address, PORT);
DatagramSocket socket = new DatagramSocket();
socket.send(packet);
socket.close();
System.out.println("Wake-on-LAN packet sent.");
}
catch
( Exception e
)
{
System.out.println("Failed to send Wake-on-LAN packet: + e");
System.exit(1);
}
}
private static
byte[]
getMacBytes
( String macStr
) throws IllegalArgumentException
{
byte[] bytes = new byte[6];
String[] hex = macStr.split("(\\:|\\-)");
if (hex.length != 6)
{
throw new IllegalArgumentException("Invalid MAC address.");
}
try
{
for (int i = 0; i < 6; i++)
{
bytes[i] = (byte) Integer.parseInt(hex[i], 16);
}
}
catch (NumberFormatException e)
{
throw new IllegalArgumentException("Invalid hex digit in MAC address.");
}
return bytes;
}
}
OEL netwerk configuration
Sometimes a system has been initiated to use DHCP and the use of a static ip-address is required, including correct dns resolution and gateway settings.
The following steps accomplish this:
Define the parameters of the NIC
The following steps accomplish this:
- Connect as root
- Go to directoy /etc/sysconfig/network-scripts
- Identify the file that is used for the NIC that you must define:
for example ifcfg-eth0 is for the traditional first network card.
- Verify/Change the settings depending on your needs
- When changing from dhcp to static addressing, the file should become something like this:
BOOTPROTO=static
BROADCAST=192.168.1.255
HWADDR=xx:xx:xx:xx:xx
IPADDR=192.168.1.102
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
Define the paramter for the network in itself
- Connect as root
- Go to /etc/sysconfig
- Edit the file network
- Set the hostname here and the gateway for the network.
- The file should contain something like:
HOSTNAME=myservername
GATEWAY=192.168.1.1
Set the resolv.conf file with the nameservers
- Connect as root
- Go to directory /etc
- Edit the file resolv.conf
- Add/modify lines in the file with the specification of the nameserver.
- An example
search hellings.be
nameserver vvv.xxx.yyy.zzzz
- Add as many nameservers as you require
- Connect as root
- Restart the network
service network restart
Linux - determine the block size of ext3 filesystem
Simple ... when you know it
Just use the command tune2fs with the -l option and followed by the name of the device.
$> tune2fs -l /dev/VolGroup00/LogVol00 | grep -i "block size'
Just use the command tune2fs with the -l option and followed by the name of the device.
$> tune2fs -l /dev/VolGroup00/LogVol00 | grep -i "block size'
Create Filesystem on OEL
Just as a documentation thing...
1.Partition the device
Use fdisk to add/delete/modify partitions.
Start it by specifying the device name after fdisk:
ex. fdisk /dev/hdb
The result of this will be that you allocated the space on the device to a set of partitions (/dev/hdb1, ... )
This you can see when looking in the /dev directory. The partitions you created should be defined in it.
2. Create a filesystem on the partition(s)
This can be done by issueing the mkfs command.
You have to specify the type of filesystem at the -t option.
For example: mkfs -t ext3 /dev/hdb1
3. Mounting the filesystem
Two possible ways to do this:
- on a permanent basis 3.b.
- on a use base : 3.a.
3.a. Mount the filesystem permantently
This is achieved by defining the partition and mount point in the fstab file.
In there you will enter a line per partition to be mounted with the systemboot.
See man fstab for details on what theline should look like.
3.b. Mount the filesystem on a use base
Just launch the command mout to mount the filesystem on the location you want.
The location must be a directory.
ex: mount -t ext3 /dev/hdb1 /MyNewPartition
3.c for completeness ... unmounting the filesystem
You can do this by issueing the umount command followed by the mount point
ex. umount /MyNewPartition
1.Partition the device
Use fdisk to add/delete/modify partitions.
Start it by specifying the device name after fdisk:
ex. fdisk /dev/hdb
The result of this will be that you allocated the space on the device to a set of partitions (/dev/hdb1, ... )
This you can see when looking in the /dev directory. The partitions you created should be defined in it.
2. Create a filesystem on the partition(s)
This can be done by issueing the mkfs command.
You have to specify the type of filesystem at the -t option.
For example: mkfs -t ext3 /dev/hdb1
3. Mounting the filesystem
Two possible ways to do this:
- on a permanent basis 3.b.
- on a use base : 3.a.
3.a. Mount the filesystem permantently
This is achieved by defining the partition and mount point in the fstab file.
In there you will enter a line per partition to be mounted with the systemboot.
See man fstab for details on what theline should look like.
3.b. Mount the filesystem on a use base
Just launch the command mout to mount the filesystem on the location you want.
The location must be a directory.
ex: mount -t ext3 /dev/hdb1 /MyNewPartition
3.c for completeness ... unmounting the filesystem
You can do this by issueing the umount command followed by the mount point
ex. umount /MyNewPartition
Shrink size of a LVM Volume Group
The next things are a very short resume of an article on how to shrink a Logical Volume group by using the rescue mode of the installation disk.
The article itself can be found at http://forums.fedoraforum.org .
The context is Redhat or Oracle Enterprise Linux.
In order to shrink an LVM volume group the only prerequisite is that you have the installation media.
1. Verify the content in advance of the logical volume group.
This can be done via the volume management tool (graphical) where you see the layout of the filesystems, or simply by using df -h on the command line. Verify the space that is in effect used in the filesystem.
2. Launch the rescue mode.
This can be achieved by booting the machine using the installation media of Redhat/Fedora/Oracle linux.
The option to launch the rescue mode is documented in the startup screen. See F2 for more informaiton after booting from the dvd/cd.
On the command prompt enter "linux rescue".
Enter the language, keyboard and network parameters. The network is not required to be available.
3. identify the filesystems to be unmounted
Typically the existing filesystems will be mounted in rescue mode in
/mnt/sysimage.
Use df -h to see a list of filesystems.
4. unmount the filesystems
Execute an umount for each of the filesystems named /mnt/sysimage/* ending with the /mnt/sysimage itselve.
5. Identify the volumegroup
Two options here:
- you looked closely to the df -h output
- you look in the /dev directory to identify the structure of the volumegroup.
6. Check the logical volumes.
Perform an e2fsck on the logical volume:
$> e2fsck -f /dev/VolGroup00/LogVol00
At the end of the command the statistics show the usage of the filesystem.
7. Resize the filesystem.
Execute resize2fs to move all files in a consistent way to the beginning of the device.
resize2fs /dev/VolGroup00/LogVol00 3G
The 3G is the indication of the size that will be used for the filesystem after the operation.
8. Release not used space.
This will physically change the size of the partition occupied.
Some OS's do not have an lvm command shell but all commands have to be passed to lvm. This is something that was not documented in the original article.
To know the existence of the lvm shell, simply type lvm. If you enter the shell ... there is one, obvious. All commands can be taken as in the original article. In the other case - so no lvm shell exists - you will need to use the command format lvm .
To resize execute the following command (for the shell way, refer to the original article).
Execute the command:
lvm lvresize --size 3G /dev/VolGroup00/LogVol00
The endpoint (cilinder) of the partition will change.
9 exit the rescue mode and restart.
This should be the most easy command ...
Tested the procedure on a OEL virtual machine running under VMWare Fusion 3 on an Apple MacBook Pro.
Me.
The article itself can be found at http://forums.fedoraforum.org .
The context is Redhat or Oracle Enterprise Linux.
In order to shrink an LVM volume group the only prerequisite is that you have the installation media.
1. Verify the content in advance of the logical volume group.
This can be done via the volume management tool (graphical) where you see the layout of the filesystems, or simply by using df -h on the command line. Verify the space that is in effect used in the filesystem.
2. Launch the rescue mode.
This can be achieved by booting the machine using the installation media of Redhat/Fedora/Oracle linux.
The option to launch the rescue mode is documented in the startup screen. See F2 for more informaiton after booting from the dvd/cd.
On the command prompt enter "linux rescue".
Enter the language, keyboard and network parameters. The network is not required to be available.
3. identify the filesystems to be unmounted
Typically the existing filesystems will be mounted in rescue mode in
/mnt/sysimage.
Use df -h to see a list of filesystems.
4. unmount the filesystems
Execute an umount for each of the filesystems named /mnt/sysimage/* ending with the /mnt/sysimage itselve.
5. Identify the volumegroup
Two options here:
- you looked closely to the df -h output
- you look in the /dev directory to identify the structure of the volumegroup.
6. Check the logical volumes.
Perform an e2fsck on the logical volume:
$> e2fsck -f /dev/VolGroup00/LogVol00
At the end of the command the statistics show the usage of the filesystem.
7. Resize the filesystem.
Execute resize2fs to move all files in a consistent way to the beginning of the device.
resize2fs /dev/VolGroup00/LogVol00 3G
The 3G is the indication of the size that will be used for the filesystem after the operation.
8. Release not used space.
This will physically change the size of the partition occupied.
Some OS's do not have an lvm command shell but all commands have to be passed to lvm. This is something that was not documented in the original article.
To know the existence of the lvm shell, simply type lvm. If you enter the shell ... there is one, obvious. All commands can be taken as in the original article. In the other case - so no lvm shell exists - you will need to use the command format lvm
To resize execute the following command (for the shell way, refer to the original article).
Execute the command:
lvm lvresize --size 3G /dev/VolGroup00/LogVol00
The endpoint (cilinder) of the partition will change.
9 exit the rescue mode and restart.
This should be the most easy command ...
Tested the procedure on a OEL virtual machine running under VMWare Fusion 3 on an Apple MacBook Pro.
Me.
iSCSI configuration on OEL
Intro
The section on the configuration will suppose you know iSCSI terminology ... which requires you not to be a novice on this subject ... or having read the documents referred to under the section 'Links' ;-)
Links
Configuration of the iSCSI targets on OEL
Configuration of the iSCSI Initiator on OEL
Subscribe to:
Posts (Atom)