Ldap com Mysql

Link genérico:
http://www.ldap.org.br/
http://www.openldap.org/
Tutorials:
http://www.flatmtn.com/article/setting-ldap-back-sql#LdapGeneral-5
http://www.yolinux.com/TUTORIALS/LinuxTutorialLDAP-SLAPD-LDIF-V2-config.html
http://www.openldap.org/faq/data/cache/978.html
http://www.vivaolinux.com.br/artigo/Implementando-servidor-LDAP-no-Ubuntu/
https://www.wideopen.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-ldap-quickstart.html
http://www.howtoforge.com/openldap-samba-domain-controller-ubuntu7.10
http://www.ldap.org.br/modules/ldap/files/files///samba+openLDAP+qmail.pdf

Como fazer a instalação:

apt-get install slapd ldap-utils

Edite o arquivo /etc/ldap/slapd.conf e troque todos os dc para o dc que você quiser.
Por exemplo: dc=casa,dc=lan

Descomente a instrução:
rootdn "cn=admin,dc=casa,dc=lan"

E acrescente uma linha de senha que é gerada pelo comando:
slappasswd


Por ex:
rootpw {SSHA}vv2y+i6V6esazrIv70xSSnNAJE18bb2u


Reinicie o ldap server:
invoke-rc.d slapd restart

Ferramentas GUI:
apt-get install apache2 libapache2-mod-php5 php5 php5-cgi php5-ldap
apt-get install phpldapadmin

Talvez seja necessário aumentar a meméria disponível para o php5 no arquivo:
/etc/php5/apache2/php.ini
e reiniciar o apache com:
/etc/init.d/apache2 restart

Edit o arquivo /etc/ldap/ldap.conf

Ports for the Firewall
LDAP runs on port 389/tcp by default and LDAP over SSL is 636/tcp.

Para reindexar utilize os comandos:
invoke-rc.d slapd stop
slapindex -v
chown openldap /etc/ldap/*.conf
invoke-rc.d slapd start

Para acertar o log edite o arquivo /etc/syslog.conf e coloque no final:
local4.* /var/log/ldap.log

Reinicie o log:
invoke-rc.d sysklogd restart

Instale agora a ferramenta de gerenciamento da base via shell:
apt-get install ldapscripts
Se dermos um "ldapsearch -x" ele nos mostra a base inteira LDAP.

Pode ser usado em conjunto com samba:
Modify you smb.conf file to call the scripts :
# [...]
add machine script = /usr/bin/ldapaddmachine ‘%u’ sambamachines
add user script = /usr/bin/ldapadduser ‘%u’ sambausers
add group script = /usr/bin/ldapaddgroup ‘%g’
add user to group script = /usr/bin/ldapaddusertogroup ‘%u’ ‘%g’
delete user script = /usr/bin/ldapdeleteuser ‘%u’
delete group script = /usr/bin/ldapdeletegroup ‘%g’
delete user from group script = /usr/bin/ldapdeleteuserfromgroup ‘%u’ ‘%g’
set primary group script = /usr/bin/ldapsetprimarygroup ‘%u’ ‘%g’
rename user script = /usr/bin/ldaprenameuser ‘%uold’ ‘%unew’
# [...]

Instalando o libnss-ldap (muitas vezes isso é instalado no momento da instalação do ldapscripts):
# aptitude install libnss-ldap
Respostas:
host address: IP da máquina
destinguished name ou dn: dc=vivaolinux,dc=com,dc=br
ldap version: 3
login database: no
readable/writable: no
OK

Instalando o libpam-ldap (muitas vezes isso é instalado no momento da instalação do ldapscripts):
# aptitude install libpam-ldap
Make local root database admin: yes
Database requires logging in: no
root login account: cn=admin,dc=vivaolinux,dc=com,dc=br
root passwd: senha do admin
local crypt to use when changing passwords: crypt

Editar o arquivo /etc/nsswitch.conf:
passwd: compat ldap
group: compat ldap
shadow: compat ldap

O restante permanece a mesma coisa.

Agora iremos fazer com que o sistema busque os usuários na base LDAP.
Editar arquivo /etc/pam.d/common-account:
account sufficient pam_ldap.so
account required pam_unix.so
session required /lib/security/pam_mkhomedir.so skel=/etc/skel/ umask=0022
Editar o arquivo /etc/pam.d/common-auth:
auth sufficient pam_ldap.so
auth required pam_unix.so nullok_secure try_first_pass
Editar o arquivo /etc/common-password:
password sufficient pam_unix.so nullok obscure min=4 max=8 md5
password required pam_ldap.so try_first_pass
Editar o arquivo /etc/common-session:
session sufficient pam_ldap.so
session required pam_unix.so

Pronto! Sua base está autenticando no LDAP.

Coloque o schema samba disponível:
cp /usr/share/doc/samba-doc/examples/LDAP/samba.schema.gz /etc/ldap/schema/
gzip -d /etc/ldap/schema/samba.schema.gz

E adicione:
include /etc/ldap/schema/samba.schema
include /etc/ldap/schema/misc.schema

Altere a linha:
access to attrs=userPassword,shadowLastChange
para:
access to attrs=userPassword,shadowLastChange,sambaNTPassword,sambaLMPassword
 

Howto setup Handbrake including GUI from svn in Ubuntu

Link: http://onlyubuntu.blogspot.com/2008/07/howto-setup-handbrake-including-gui.html


First get the medibuntu version of ffmpeg (makes more codecs available),but first remove any old ffmpeg,open a terminal and enter.


sudo apt-get remove ffmpeg

then enter.

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

then enter.

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

then enter.

sudo apt-get install ffmpeg

Next Install the dependencies for Handbrake and the gtk gui.

sudo apt-get update && sudo apt-get install automake build-essential jam libdvdcss2-dev libtool subversion yasm zlib1g-dev libbz2-dev dvdbackup xmlto texinfo g77 gfortran libgtk2.0-dev nasm doxygen libsdl1.2-dev gfortran-multilib gcc-multilib g++-multilib libesd0-dev libgtk1.2-dev libfftw3-dev electric-fence

Next install and build Handbrake.svn and gtk gui (enter each line seperately,it will take some time to build)...

svn co svn://svn.handbrake.fr/HandBrake/trunk HandBrake

cd HandBrake

./configure

make

sudo make install

cd Handbrake/gtk

./autogen.sh

make

sudo make install

HandBrake should be available from the Applications menu under Sound & Video



Dica:
The message tells you what's wrong: "no suitable assembler found. Install yasm" But if you check, you already did, so a quick search in the Ubuntu forums results in a post that states the yasm available in the repo is not a good one. Go to http://www.tortall.net/projects/yasm/wiki/Download to grab 0.7.0 or higher (I grabbed 0.7.1).

Once I did that, HandBrake built just fine. Of course, don't forget to remove the old yasm before installing the newer version.




 

Ubuntu com placa com saída para TV

Link: http://ubuntuforums.org/showthread.php?t=96765

Altere o arquivo /etc/X11/xorg.conf conforme indicado:

Save a backup copy of this file as xorg.conf.back before you do any editing and then edit the following sections:
In the "Module" section comment out these two lines:
#Load "GLcore"
#Load "dri"

and also make sure that the following line is in the "Module" section
Load "glx"

Then Go to the "Device" section and change the following line:
Driver "nv"

to:
Driver "nvidia"

And voila, you've successfully updated the driver to the nvidia driver. In order for this to take effect you'll need to restart the x-server, and if you've changed it properly a pretty NVidia screen should pop up before your login. If you want this screen to go away add the following line to the "Device" section:
Option "NoLogo" "1"

If this doesn't work, you should be loaded automatically into the command line, but if you're just staring at a blank screen hit CTRL+ALT+F1 to exit into the command line and type the following command:
$ cp /etc/X11/xorg.conf.back /etc/X11/xorg.conf

and then restart the x server.

Configuring 2 screens:


First we need to alter the "Device" section by altering the Identifier and adding a screen line:
Identifier "nvidia0"
Screen 0

Then we need to create a second "Device" section:
Section "Device"
Identifier "nvidia1"
Driver "nvidia"
BusID "PCI:1:0:0"
Screen 1
Option "TVOutFormat" "SVIDEO"
Option "TVStandard" "NTSC-M"
Option "ConnectedMonitor" "TV"
EndSection

IMPORTANT: make sure that the value of BusID is the same as the value of BusID in the first device section.

For the TVOutFormat and TVStandard values please substitute in the appropriate values (e.g. if you are using composite out then substitute "COMPOSITE" for "SVIDEO" or if you're standard is PAL-B substitute "PAL-B" for "NTSC-M"), for more on this see the nvidia readme appendix J.

What we've done here is divided our nvidia card into two seperate devices that are going to provide picture out to two seperate monitors each running its own screen.

Next we need to change the existing "Monitor" section's identifier to:
Identifier "Monitor0"

and then create a second monitor section for our TV:
Section "Monitor"
Identifier "Monitor1" #TV
Option "HorizSync" "30-50"
Option "VertRefresh" "60"
EndSection

Now that we've set up both of our monitors we need to set up the screens that will be displayed on each. In the existing screen section you'll need to change the identifier, device and monitor lines to match the following:
Identifier "Screen0"
Device "nvidia0"
Monitor "Monitor0"

and then you'll need to add a second screen section for your TV:
Section "Screen"
Identifier "Screen1"
Device "nvidia1"
Monitor "Monitor1"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "800x600"
EndSubSection
EndSection

Make sure that default depth for the TV is the same as the default depth for your other monitor. You may also have to screw around with the modes, 800x600 works for my tv and will probably work for most TVs, but if you have a better TV you may want to try 1024x768 or other resolutions.
The last thing we need to do is set up the "ServerLayout" section so that X knows how to set up your new configuration (Note: keep your own InputDevice settings for this):
Section "ServerLayout"
Identifier "SimpleLayout"
Screen 0 "Screen0"
Screen 1 "Screen1" leftOf "Screen0"

If your TV is to the right of your primary monitor change the leftOf to rightOf. Once you've finished this save your xorg.conf file, make sure your TV is hooked up to your computer and restart. You'll notice that if you watch a movie in full-screen on the TV it doesn't effect your primary monitor at all and you can use your computer to still do whatever you want.
 

Soluções de Backup

Bacula : http://www.bacula.com/en/

BackupPC : http://backuppc.sourceforge.net/index.html

apt-get install backuppc

troque a senha do usuário backuppc com o comando
sudo htpasswd /etc/backuppc/htpasswd backuppc


Restore-backup : http://restore-backup.com

Após instalação edite o arquivo /etc/restore/restore.yml

Welcome to the Restore Repository for Debian/Ubuntu
To add this repository, add one of these to your /etc/apt/sources.list:
deb http://distro.holonyx.com/restore etch main
deb http://distro.holonyx.com/restore edgy main
deb http://distro.holonyx.com/restore feisty main
deb http://distro.holonyx.com/restore gutsy main

Add our repository's signature:
# wget -O - http://distro.holonyx.com/restore/restore.asc | sudo apt-key add -
To install the packages for Restore Enterprise Edition:
# sudo apt-get update
# sudo apt-get install restore-ee

To install the packages for Restore Data Center Edition:
# sudo apt-get update
# sudo apt-get install restore-dc
 

Backup Simples com comando tar

Link: http://ubuntuforums.org/showthread.php?t=35087

comando para backup:
tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /

para restore (cuidado pois sobrescreverá tudo):
tar xvpfj backup.tar.bz2 -C /

Recrie os diretórios excluídos:
mkdir proc
mkdir lost+found
mkdir mnt
mkdir sys
 

Mensagens durante boot

Link: http://www.go2linux.org/bootlogd-to-read-boot-console-messages

Edite o arquivo /etc/default/bootlogd e o log será criado em: /var/log/boot


# Run bootlogd at startup ?
BOOTLOGD_ENABLE=Yes

Também pode utilizar o comando:
dmesg

Ou dar uma olhada no arquivo: /var/log/dmesg

 

Trocar mensagem de boas vindas

Link: http://ph.ubuntuforums.com/showthread.php?t=671603

edite o arquivo /var/run/motd
 

Adicionar usuário a um grupo

Link: http://www.cyberciti.biz/faq/howto-linux-add-user-to-group/


useradd example - Add a new user to secondary group

Use useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. Syntax:
useradd -G {group-name} username


Link: http://www.cyberciti.biz/faq/unix-add-user-to-group/

UNIX Add Existing User To A Secondary Group

Use usermod command to modify a user's login definition on the system including group membership. For, example add user vivek to sales group, enter:
# usermod -G sales vivek


UNIX Add Existing User To A Primary Group

Add jerry to sales primary group and change its existing group membership:
# usermod -g sales jerry


Link sobre gerenciamento de usuários no Linux:
http://www.infowester.com/usuarioslinux.php
http://talesazevedo.blogspot.com/2008/05/gerenciando-usurios.html
http://sergioinfo.site88.net/Linux/Criando-e-gerenciando-usuarios-no-GNU/Linux.html


Para trocar o uid de um usuário já criado utilize o comando:
sudo usermod -u 1002 user
sendo 1002 o novo número do usuário.



Não deixe de conferir nosso novo blog sobre Linux em : Ubuntu "4us"
 

Version Control with Subversion

 

NFS: Overview and Gotchas

Link: http://www.troubleshooters.com/linux/nfs.htm

Para reiniciar NFS digite:
sudo exportfs -a
sudo /etc/init.d/nfs-kernel-server start

Para a montagem segue:
sudo mount -t nfs 192.168.1.10:/export/share /import/share

Cuidado o programa "shares-admin" altera o /etc/exports

Outro How-to: http://ubuntuforums.org/showthread.php?t=249889

Para corrigir problema de internal error com o hardy, veja este patch:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/213444

Para resolver firewall e fixar porta veja o link:
http://gentoo-wiki.com/HOWTO_Share_Directories_via_NFS#Modify_EXPORTS

Edite o arquivo:

trocando a linha sobre opções do NFS conforme abaixo para fixar uma porta tcp:
sudo gedit /etc/default/nfs-kernel-server

com esta informação: RPCMOUNTDOPTS='--port 48080'

altere o arquivo sudo gedit /etc/hosts.allow com:
portmap: 192.168.1.0/255.255.255.0
lockd: 192.168.1.0/255.255.255.0
rquotad: 192.168.1.0/255.255.255.0
mountd: 192.168.1.0/255.255.255.0
statd: 192.168.1.0/255.255.255.0

Para confirmar as alterações em sudo gedit /etc/exports utilize o comando
exportfs -a
e depois:
/etc/init.d/nfs-kernel-server restart
/etc/init.d/portmap restart

Alguns comandos interessantes:
strings /sbin/portmap | grep hosts
rpcinfo -p
dpkg-reconfigure portmap

O conteúdo de /etc/exports poderia ser:
/homeserver/Data 192.168.1.0/255.255.255.0(rw,no_root_squash,async,no_subtree_check)
/homeserver/aarvati 192.168.1.0/255.255.255.0(rw,no_root_squash,async,no_subtree_check)
/homeserver/iarvati 192.168.1.0/255.255.255.0(rw,no_root_squash,async,no_subtree_check)
/homeserver/Public 192.168.1.0/255.255.255.0(rw,no_root_squash,async,no_subtree_check)
/homeserver/Lixeira 192.168.1.0/255.255.255.0(rw,no_root_squash,async,no_subtree_check)
/homeserver/SharedDocs 192.168.1.0/255.255.255.0(rw,no_root_squash,async,no_subtree_check)

O arquivo sudo gedit /etc/fstab pode ficar assim:
server.casa.lan:/homeserver/Data /home/Data nfs users,noauto,rw,hard,intr 0 0
server.casa.lan:/homeserver/aarvati /srv/aarvati nfs user,noauto,rw,hard,intr 0 0
server.casa.lan:/homeserver/iarvati /srv/iarvati nfs user,noauto,rw,hard,intr 0 0
server.casa.lan:/homeserver/Public /home/Public nfs users,noauto,rw,hard,intr 0 0
server.casa.lan:/homeserver/Lixeira /home/Lixeira nfs users,noauto,rw,hard,intr 0 0
 

Ubuntu reconfigure xorg

Ubuntu reconfigure xorg

Type any one of the following command to reconfigure X.org windows system:
As the root user:
# dpkg-reconfigure xserver-xorg

OR as a normal user:
$ sudo dpkg-reconfigure xserver-xorg



No Ubuntu Hardy Heron estou tentando ainda:

um comando que achei é o
xdebconfigurator

Mas estou vendo como utilizá-lo ainda.


Para quem tem nvidia ou ATI existe o pacote abaixo:

Driver Support With Envy
Another very useful tool I’ve found is the Envy tool, which will install required non-free driver support for nvidia or ATI cards for you. I’ll admit that I’ve only used this occasionally, considering I have intel graphics cards on my main laptops, but in the situations where I have needed it things have worked great.
sudo apt-get install envyng-gtk
sudo apt-get install envyng-core
sudo envyng -t
man envyng


Quem esta com interface gráfica tem o comando:
gksu displayconfig-gtk
 

Change eth1 back to eth0

Link: http://ubuntuforums.org/showthread.php?t=281120
Link: http://ubuntuforums.org/showthread.php?p=5117082


Edit the file using the following comand and remove the existing eth0 line:

$ sudo gedit /etc/iftab

No ubuntu hardy o caminho é:
/etc/udev/rules.d/70-persistent-net.rules
 

Fixando o DNS com DHCP client

Link: http://ubuntuforums.org/showthread.php?t=544383

Para sempre forçar um DNS server edite o arquivo abaixo e modifique ou inclua a linha indicada:

sudo gedit /etc/dhcp3/dhclient.conf

prepend domain-name-servers 192.168.1.10,127.0.0.1;
prepend domain-name "casa.lan ";

se utilizar uma linha do tipo abaixo voce estará sobrepondo qualquer dns server indicado pelo DHCP:
supersede domain-name-servers 192.168.1.10,127.0.0.1;
supersede domain-name "casa.lan";
 

Trocar o editor do crontab

Para quem não consegue utilizar o vi como eu, segue comando para trocar o editor do crontab:

export VISUAL=’pico -w'
 

How to Servidor Debian com EMAIL

como montar um servidor debian, muito parecido com ubuntu:
http://pinguimribeiro.wikidot.com/

Para configurar email com mysql este link é utili:
http://johnny.chadda.se/2007/04/15/mail-server-howto-postfix-and-dovecot-with-mysql-and-tlsssl-postgrey-and-dspam/

Outro link: http://workaround.org/articles/ispmail-etch/

Mais um: http://codepoets.co.uk/postfixadmin-postgresql-courier-squirrelmail-debian-etch-howto-tutorial



Se tiver erros de Permissão Negada, a sequencia de comandos me ajudou:
su - user -c 'maildirmake.dovecot /home/Mail/domain/user/Maildir'
chown -hR vmail:vmail /home/Mail
chmod -R 770 /home/Mail


Vou tentar depois instalar o webmail RoundCube em : http://roundcube.net/


Removing old deleted mails

With IMAP you can mark emails as deleted and some email clients will not even show them any more. But the emails are still there and occupy space. Usually there is an option to purge all marked emails but many users do not care. So Michael Weisgerber suggests to run this command frequently via crontab to remove such emails:
find /home/vmail/ -name '*,ST' -ctime +7 | xargs rm -f

 

Lista com How-tos

 

Programming stuff

Useful programs - Programming stuff

Link: http://wiki.eyermonkey.com/My_Ubuntu_%287.10%29_Installation


Get the native subversion client

sudo apt-get install subversion

Eclipse 3.2 and 3.3 (Europa)

  • Install Eclipse 3.2 and Java 6 by following these instructions
  • Now download a pre-configured version of Eclipse 3.3 from here (provides a huge collection of plugins to conveniently add)
    • I start with the Java Developers package then add PHPEclipse, Subversive, EMF, and GEF
    • Also, I get the Green UML plugin
  • Now extract the archive you just downloaded
  • Now copy all those files into the actual eclipse folder and overwrite the old 3.2 files:

sudo cp -R ~/Desktop/eclipse/* /usr/lib/eclipse/

Python Stuff

  • Install Python stuff:

sudo aptitude install gcc libc6-dev python-dev python-setuptools python2.4-profiler
  • Install PyDev for Eclipse

sudo apt-get install eclipse-pydev
 

Mais informação sobre RAID 1

Montar fakeRAID: http://wiki.eyermonkey.com/My_Ubuntu_%287.10%29_Installation#Installation_on_RAID_0

Outro link: http://samokk.is-a-geek.com/wordpress/2006/01/15/running-ubuntu-gnulinux-on-a-fakeraid1-mirroring-array/

Outro link: http://www.linuxdevcenter.com/pub/a/linux/2002/12/05/RAID.html?page=2

Bug #120375 - Ubuntu cannot boot from degraded RAID: https://bugs.launchpad.net/ubuntu/+bug/120375

Edit "/usr/share/initramfs-tools/scripts/local" and find the following comment "# We've given up, but we'll let the user fix matters if they can".
Just before this comment add the following code:
# The following code was added to allow degraded RAID arrays to start
if [ ! -e "${ROOT}" ] || ! /lib/udev/vol_id "${ROOT}" >/dev/null 2>&1; then
# Try mdadm and allow degraded arrays to start in case a drive has failed
log_begin_msg "Attempting to start RAID arrays and allow degraded arrays"
/sbin/mdadm --assemble --scan
log_end_msg
fi
To rebuilt the boot image use "sudo update-initramfs -u" as suggested by Plnt. This script calls the "mkinitramfs" script mentioned by Peter and is easier to use as you don't have to supply the image name and other options.
I have tested this a couple of times, with and without my other drives plugged in without any problems. Just make sure you have a cron item setup to run "mdadm --monitor --oneshot" to ensure the System Administrator gets an email when an array is running degraded.


Este BUG foi resolvido no Intrepid: This bug was fixed in the package mdadm - 2.6.7-3ubuntu2

The mdadm patch supports an optional kernel parameter, which can be any of:
* bootdegraded
* bootdegraded=true
* bootdegraded=yes
* bootdegrade=1

No menu do GRUB fica:
title Ubuntu, kernel 2.6.20-16-generic (raid defect)
root (hd0,1)
kernel /boot/vmlinuz-
2.6.20-16-generic root=/dev/md1 ro bootdegraded
initrd /boot/initrd.img-2.6.20-16-generic

Recovery after disk failure
Next I simulated a disk failure by disconnecting /dev/sdb. The system still boots but the status shows /dev/sdb1, /dev/sdb2 and /dev/sdb3 have disappeared from the system and how the /dev/mdN is marked as "degraded" in the status field.
martti@ubuntu:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda3[0]
12659136 blocks [2/2] [U_]

md1 : active raid1 sda2[0]
489856 blocks [2/2] [U_]

md0 : active raid1 sda1[0]
7815488 blocks [2/2] [U_]

unused devices: 

martti@ubuntu:~$ sudo mdadm --query --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Wed Oct 17 16:45:59 2007
Raid Level : raid1
Array Size : 7815488 (7.45 GiB 8.00 GB)
Used Dev Size : 7815488 (7.45 GiB 8.00 GB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Wed Oct 17 15:16:18 2007
State : active, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

UUID : 1760de71:d6ca4125:8324c8dc:300ec7e1
Events : 0.11

Number   Major   Minor   RaidDevice State
0       8        1        0      active sync   /dev/sda1
1       0        0        -      removed
Next I reconnected the disk and instructed the system to rebuild itself. After rebuild everything was ok again.
martti@ubuntu:~$ sudo mdadm --add /dev/md0 /dev/sdb1
mdadm: hot added /dev/sdb1

martti@ubuntu:~$ sudo mdadm --add /dev/md1 /dev/sdb2
mdadm: hot added /dev/sdb2

martti@ubuntu:~$ sudo mdadm --add /dev/md2 /dev/sdb3
mdadm: hot added /dev/sdb3

martti@ubuntu:~$ cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sdb3[2] sda3[0]
12659136 blocks [2/1] [U_]
resync=DELAYED

md1 : active raid1 sda2[0] sdb2[1]
489856 blocks [2/2] [UU]

md0 : active raid1 sdb1[2] sda1[0]
7815488 blocks [2/1] [U_]
[>....................]  recovery =  2.8% (215168/7815488) finish=16.2min speed=9780K/sec

unused devices: 

HOW-TO preliminar


Tentativa de recuperar um sistema que não faz boot por causa de problemas no RAID 1 de um dos discos.

Faça um boot pelo Live CD do Ubuntu e depois:
sudo mount -t ext3 /dev/md1 /target
ou então
sudo mount -t ext3 /dev/sda1 /target

sudo mount --bind /dev /target/dev
sudo mount -t proc proc /target/proc    # was already done
sudo mount -t sysfs sysfs /target/sys
sudo chroot /target
apt-get update
apt-get install dmraid

Depois corrigi o arquivo /usr/share/initramfs-tools/scripts/local
acrescentando o código abaixo:
nano /usr/share/initramfs-tools/scripts/local

***** acrescentar depois de "# We've given up, but we'll let the user fix matters if they can".

# The following code was added to allow degraded RAID arrays to start
if [ ! -e "${ROOT}" ] || ! /lib/udev/vol_id "${ROOT}" >/dev/null 2>&1; then
# Try mdadm and allow degraded arrays to start in case a drive has failed
log_begin_msg "Attempting to start RAID arrays and allow degraded arrays"
/sbin/mdadm --assemble --scan
log_end_msg
fi

e Rodando:
sudo update-initramfs -u

Atualizei lilo com o comando
lilo -H

Reinicie o sistema sem o LiveCD
sudo shutdown -r now

Verifiquei o RAID com:
sudo mdadm --query --detail /dev/md1

Botei pelo HD e corrigi o RAID com o comando:
sudo mdadm --add /dev/md1 /dev/sdb1

Para acompanhar o processo utilize o comando:
cat /proc/mdstat
 

Configurando o xorg.conf no Ubuntu Hardy (8.04)

Link: http://www.vivaolinux.com.br/dica/Configurando-o-xorg.conf-no-Ubuntu-Hardy-(8.04)/

Os desenvolvedores do Xorg disseram que a versão 7.3 vai detectar e configurar "tomaticamente" nosso hardware de vídeo...

Como sou do tempo que "tomático" era o botão de ligar liquidificador walita, não adianta tentar me convencer desta maravilha quando se fabrica trocentos dispositivos de vídeo, desde o top de linha que só falta falar até a mais pura e cristalina porcaria!!!

E para provar que não exagero, olhem os fóruns de suas distribuições: como se pergunta pela configuração de placas de vídeo!!! E ainda vêm me dizer que farão tudo sem necessidade de intervenção do usuário???

Bem, caso deseje não só configurar, mas fazer um ajuste fino de seu vídeo, poderá editar tranqüilamente seu xorg.conf fazendo o seguinte:

a) instale o pacote xresprobe_0.4.24ubuntu8_i386.deb

b) vá em /usr/share/xresprobe e copie o xorg.conf substituindo o original em /etc/X11

c) faça as modificações que desejar - no /etc/X11 - e boa sorte!!!
 
 
Navegando pela Net - All Rights Reserved
Proudly powered by Blogger