To install VMWare-server v1.x under kernel 2.6.27 or 2.6.28, use the following patch (the vmware-any-any-update115 does not work from this kernel version).
For x86_64 architecture, there may be a lock problem while launching VMware-server, ending with following final error message:
vmware: xcb_lock.c :77 : _XGetXCBBuffer: L'assertion « ((int) ((xcb_req) - (dpy->request)) >= 0) » a échoué.
To solve this issue, install the gtk-nodoka-engine.i386 package (and needed packages).
sharing knowledge earned into design/development/technical delicate and/or difficult situations ...
Labels
Gnu/Linux
(95)
Administration
(83)
StorageHardware
(17)
Programming
(16)
WebBrowser
(15)
General
(11)
GNU/Bash
(7)
Solaris
(7)
Virtualization
(7)
C
(6)
Domotics
(6)
Musics
(5)
Raspberry
(5)
Desktop
(4)
Java
(4)
VersionControlSystems
(4)
ArtificialIntelligence
(2)
Optimization
(2)
multimedia
(2)
Arduino
(1)
Electronics
(1)
LTS
(1)
MacOS
(1)
Mechanics
(1)
Processing
(1)
Robotics
(1)
Ubuntu
(1)
Upgrade
(1)
ez-robot
(1)
13 March 2009
2 March 2009
Install Windows after GNU/Linux on the same hard disk
There can be various issues when attempting to install Windows on which is installed a GNU/Linux distribution.
One of the more subtle is hardware detection problem which can occur after the first second while Windows installation CD is booting (See this interesting post which gives some explanations in specific cases).
It can be the case if there is a dedicated boot partition for GNU/Linux.
The solution is to temporarily delete the partition, perform the Windows installation, restore the partition, and finally restore the MBR.
Those are some instructions to help you solving this issue.
The variables of this example are:
- /dev/sda the main hard disk,
- /dev/sdaN the boot partition (ext3) before deletion (corresponds to hd0,N-1 for bootloader)
- CF and CL the first and last cylinders of the /dev/sdaN partition (given by fdisk -l)
- /dev/sdaM the boot partition after restore (corresponds to hd0,M-1 for bootloader)
- grub as bootloader
Instructions:
- backup your /boot/grub/grub.conf
- backup your boot partition into a file
dd if=/dev/sdaN of=/tmp/boot.bin
- temporarily delete the partition
fdisk /dev/sda
d (to delete partition)
select the partition number (N in this instance)
- perform the Windows installation
- boot with a GNU/Linux Rescue or Live CD of your choice
- restore the partition
fdisk /dev/sda
n (to add new partition)
specify CF and CL as first and last cylinders
- use fdisk -l to identify the new partition number, in case it has changed (M in our case)
- format it
mkfs.ext3 -L boot /dev/sdaM
- restore your boot partition
dd if=/tmp/boot.bin of=/dev/sdaM
- remove/rename the /boot folder of the launched GNU/Linux Rescue or Live CD instance
- mount your boot partition
mkdir /boot
mount -t ext3 /dev/sdaM /boot
- edit the /boot/grub/grub.conf file to replace hd0,N-1 by hd0,M-1
- restore the MBR
One of the more subtle is hardware detection problem which can occur after the first second while Windows installation CD is booting (See this interesting post which gives some explanations in specific cases).
It can be the case if there is a dedicated boot partition for GNU/Linux.
The solution is to temporarily delete the partition, perform the Windows installation, restore the partition, and finally restore the MBR.
Those are some instructions to help you solving this issue.
The variables of this example are:
- /dev/sda the main hard disk,
- /dev/sdaN the boot partition (ext3) before deletion (corresponds to hd0,N-1 for bootloader)
- CF and CL the first and last cylinders of the /dev/sdaN partition (given by fdisk -l)
- /dev/sdaM the boot partition after restore (corresponds to hd0,M-1 for bootloader)
- grub as bootloader
Instructions:
- backup your /boot/grub/grub.conf
- backup your boot partition into a file
dd if=/dev/sdaN of=/tmp/boot.bin
- temporarily delete the partition
fdisk /dev/sda
d (to delete partition)
select the partition number (N in this instance)
- perform the Windows installation
- boot with a GNU/Linux Rescue or Live CD of your choice
- restore the partition
fdisk /dev/sda
n (to add new partition)
specify CF and CL as first and last cylinders
- use fdisk -l to identify the new partition number, in case it has changed (M in our case)
- format it
mkfs.ext3 -L boot /dev/sdaM
- restore your boot partition
dd if=/tmp/boot.bin of=/dev/sdaM
- remove/rename the /boot folder of the launched GNU/Linux Rescue or Live CD instance
- mount your boot partition
mkdir /boot
mount -t ext3 /dev/sdaM /boot
- edit the /boot/grub/grub.conf file to replace hd0,N-1 by hd0,M-1
- restore the MBR
Restore Master Boot Record (MBR) with grub
In case your MBR is broken, those are some instructions to help you restore it.
The variables of this example are:
- /dev/sda the master hard disk,
- /dev/sdaM the ext3 boot partition (corresponds to hd0,M-1 for bootloader)
- grub as bootloader
Instructions:
- boot with a GNU/Linux Rescue or Live CD of your choice
- remove/rename the /boot folder of the launched GNU/Linux Rescue or Live CD instance
- mount your boot partition
mkdir /boot
mount -t ext3 /dev/sdaM /boot
- restore the MBR
grub
root (hd0,M-1)
setup (hd0,M-1)
quit
grub-install /dev/sda
The variables of this example are:
- /dev/sda the master hard disk,
- /dev/sdaM the ext3 boot partition (corresponds to hd0,M-1 for bootloader)
- grub as bootloader
Instructions:
- boot with a GNU/Linux Rescue or Live CD of your choice
- remove/rename the /boot folder of the launched GNU/Linux Rescue or Live CD instance
- mount your boot partition
mkdir /boot
mount -t ext3 /dev/sdaM /boot
- restore the MBR
grub
root (hd0,M-1)
setup (hd0,M-1)
quit
grub-install /dev/sda
24 January 2009
Make some of your log files rotate and compress
logrotate is a very useful and powerful tool.
To make some of your log files to be rotated and compressed, create a new configuration file into the logrotate "include" directory (usually /etc/logrotate.d), and add the rotate/compress rule:
rotate 3
weekly
compress
size 1M
create 0640 myUser myGroup
}
In this example, the log will go through three weekly rotations before being removed. There can be rotations if the size exceeds 1MB.
Rotated files will be compressed.
New empty file (after rotation) will be created with "0640" mode, and myUser:myGroup ownership.
18 January 2009
Replace courier-imap by dovecot for emails server under GNU/Linux
The courier-imap package, and linked packages, have been replaced by dovecot from Fedora 8 (or earlier).
Anyway, it's still possible to maintain mailboxes part of your full and secured GNU/Linux emails server, compiling the source code of courier-imap.
If you still want to benefit from up-to-date package, using yum or if you want a more secured system, you should migrate to dovecot.
To begin, there is a tool allowing to migrate "metadata" from courier-imap to dovecot.
This is how to configure dovecot editing the /etc/dovecot.conf file, according to the configuration of the full and secured GNU/Linux emails server:
- define clearly what protocols you want to avoid wasting resources and potential security hole (See this post for equivalent for courier)
protocols = pop3 pop3s
- define the certificate and the key to use (can be the same of the smtp server)
ssl_cert_file = /etc/postfix/smtpd.cert
ssl_key_file = /etc/postfix/smtpd.key
- define the mail location
mail_location = maildir:/home/vmail/%d/%n
- define the mail UID, GID and the privileged group:
mail_uid = 5000
mail_gid = 5000
mail_privileged_group = vmail
- comment the imap or pop3 begin/end line according to your needs
- specify pop3 UIDL format for it to be compatible with the existing courier metadat
pop3_uidl_format = %u-%v
- specify the mechanisms into the auth default part
mechanisms = plain login
- comment all lines corresponding to auth you do not want (like for pam for instance)
- specify path of ONE specific file (you will create) to request the SQL database to get password and user information in the same request (optimization) (respect the order which is important, "userdb prefetch" must be before "userdb sq" part)
passdb sql {
args = /etc/dovecot-mysql.conf
}
userdb prefetch {
}
userdb sql {
args = /etc/dovecot-mysql.conf
}
- create a file with SQL query and connect information (/etc/dovecot-mysql.conf), replacing mail, admin and XXX with your corresponding databse name, privileged user login and password (default_pass_scheme is very important and must be defined according to the function used when adding password to database; in this case it correspond to the ENCRYPT function):
## /etc/dovecot-mysql.conf contents ##
driver = mysql
default_pass_scheme = CRYPT
connect = host=localhost dbname=mail user=admin password=XXX
# Extended request allowing to get password and all user information at same time.
password_query = SELECT password, '/home/vmail/%d/%n' as userdb_home, 'maildir:/home/vmail/%d/%n' as userdb_mail, 5000 AS userdb_uid, 5000 AS userdb_gid, concat('dirsize:storage=',quota) AS userdb_quota FROM users WHERE email = '%u'
# Used only for deliver (see LDA).
user_query = SELECT '/home/vmail/%d/%n' as home, 'maildir:/home/vmail/%d/%n' as mail, 5000 AS uid, 5000 AS gid, concat('dirsize:storage=',quota) AS quota FROM users WHERE email ='%u'
## /etc/dovecot-mysql.conf contents ##
- (facultative) activate debug information in case something goes wrong
mail_debug = yes
auth_debug = yes
auth_debug_passwords = yes
- restart the dovecot service
service dovecot restart
- attempts to connect to your imap/pop server with your favorite email client, checking the log file (default is /var/log/maillog)
- (facultative) disabled debug information if no more needed
Anyway, it's still possible to maintain mailboxes part of your full and secured GNU/Linux emails server, compiling the source code of courier-imap.
If you still want to benefit from up-to-date package, using yum or if you want a more secured system, you should migrate to dovecot.
To begin, there is a tool allowing to migrate "metadata" from courier-imap to dovecot.
This is how to configure dovecot editing the /etc/dovecot.conf file, according to the configuration of the full and secured GNU/Linux emails server:
- define clearly what protocols you want to avoid wasting resources and potential security hole (See this post for equivalent for courier)
protocols = pop3 pop3s
- define the certificate and the key to use (can be the same of the smtp server)
ssl_cert_file = /etc/postfix/smtpd.cert
ssl_key_file = /etc/postfix/smtpd.key
- define the mail location
mail_location = maildir:/home/vmail/%d/%n
- define the mail UID, GID and the privileged group:
mail_uid = 5000
mail_gid = 5000
mail_privileged_group = vmail
- comment the imap or pop3 begin/end line according to your needs
- specify pop3 UIDL format for it to be compatible with the existing courier metadat
pop3_uidl_format = %u-%v
- specify the mechanisms into the auth default part
mechanisms = plain login
- comment all lines corresponding to auth you do not want (like for pam for instance)
- specify path of ONE specific file (you will create) to request the SQL database to get password and user information in the same request (optimization) (respect the order which is important, "userdb prefetch" must be before "userdb sq" part)
passdb sql {
args = /etc/dovecot-mysql.conf
}
userdb prefetch {
}
userdb sql {
args = /etc/dovecot-mysql.conf
}
- create a file with SQL query and connect information (/etc/dovecot-mysql.conf), replacing mail, admin and XXX with your corresponding databse name, privileged user login and password (default_pass_scheme is very important and must be defined according to the function used when adding password to database; in this case it correspond to the ENCRYPT function):
## /etc/dovecot-mysql.conf contents ##
driver = mysql
default_pass_scheme = CRYPT
connect = host=localhost dbname=mail user=admin password=XXX
# Extended request allowing to get password and all user information at same time.
password_query = SELECT password, '/home/vmail/%d/%n' as userdb_home, 'maildir:/home/vmail/%d/%n' as userdb_mail, 5000 AS userdb_uid, 5000 AS userdb_gid, concat('dirsize:storage=',quota) AS userdb_quota FROM users WHERE email = '%u'
# Used only for deliver (see LDA).
user_query = SELECT '/home/vmail/%d/%n' as home, 'maildir:/home/vmail/%d/%n' as mail, 5000 AS uid, 5000 AS gid, concat('dirsize:storage=',quota) AS quota FROM users WHERE email ='%u'
## /etc/dovecot-mysql.conf contents ##
- (facultative) activate debug information in case something goes wrong
mail_debug = yes
auth_debug = yes
auth_debug_passwords = yes
- restart the dovecot service
service dovecot restart
- attempts to connect to your imap/pop server with your favorite email client, checking the log file (default is /var/log/maillog)
- (facultative) disabled debug information if no more needed
Subscribe to:
Posts (Atom)