Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Monday, September 22, 2014

Montar uma partição comum entre Linux e Windows


Para quem está passando apuros com as permissões na partição tipo "vfat" no Linux, aqui vai a linha para adicionar no fstab e resolver a questão :


UUID=seu_id /seu_mount_point vfat defaults,user,exec,uid=1000,gid=100,umask=000 0 0

Saturday, August 21, 2010

Ubuntu via Wubi - Recover the boot using Live CD

Para quem já usou o wubi para instalar o Ubuntu sem precisar trabalhar diretamente com particionamento de disco e tal,já pode ter caído com alguns problemas na hora do boot.
Em uma máquina minha aconteceu um deste problemas.O melhor mesmo é instalar  na forma tradicional mesmo (partionando disco,configurando passo-a-passo),mas como eu não quero mexer em nada no meu disco por estes dias tive que usar a forma de recuperação do boot usando o Live CD.


https://wiki.ubuntu.com/WubiGuide


Após subir o Ubuntu usando o Live CD  faça:


Abra um terminal(command line mode) .


root@ubuntu:/home/ubuntu# fdisk -l


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8a4615a8


  Device Boot   Start     End   Blocks   Id  System
/dev/sda1   *       1       13   102400 7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2           13     3917 31354880 7  HPFS/NTFS
/dev/sda3         3917   11749 62914560 7  HPFS/NTFS
/dev/sda4       11749   19457 61915136 7  HPFS/NTFS


Sei que a partição onde instalei o Wubi no Windows 7 é a /dev/sda3.Lá para o usuário que resolveu dar uma olhada tem os discos virtuais criados pelo Wubi para o seu Ubuntu .


Usando o comando blkid eu consigo mais informações sobre as partições e disco:


root@ubuntu:/home/ubuntu# blkid
/dev/loop0: TYPE="squashfs"
/dev/sda1: LABEL="System Reserved" UUID="8A8C6D878C6D6E9F" TYPE="ntfs"
/dev/sda2: UUID="B4DAA353DAA310A2" TYPE="ntfs"
/dev/sda3: LABEL="DATA2" UUID="100AD95B0AD93F02" TYPE="ntfs"
/dev/sda4: LABEL="DATA1" UUID="264038024037D771" TYPE="ntfs"


Também me lembro que a partição que instalei chama-se DATA2 .Partindo desta eu posso inicializar a recuperação:


-- criar um ponto de montagem
root@ubuntu:/home/ubuntu# sudo mkdir /win


-- monta a partição
root@ubuntu:/# sudo mount /dev/sda3 /win


-- mostrandi informações do device
root@ubuntu:/# df -Ph
Filesystem         Size  Used Avail Use% Mounted on
aufs               1.5G   60M  1.5G   4% /
none               1.5G  280K  1.5G   1% /dev
/dev/sr0           700M  700M 0 100% /cdrom
/dev/loop0         672M  672M 0 100% /rofs
none               1.5G  112K  1.5G   1% /dev/shm
tmpfs             1.5G   24K  1.5G   1% /tmp
none               1.5G  108K  1.5G   1% /var/run
none               1.5G 0  1.5G   0% /var/lock
none               1.5G 0  1.5G   0% /lib/init/rw
/dev/sda3           60G   31G   30G  51% /win
root@ubuntu:/#


-- criando o ponto de montagem do disco virtual do Ubuntu
root@ubuntu:/home/ubuntu# sudo mkdir /vdisk


-- montando o disco virtual
root@ubuntu:/# sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk
root@ubuntu:/#


-- executando o utiliátio filesystem check - fsck para procurar possíveis problemas que afetaram o boot:


root@ubuntu:/# sudo fsck /win/ubuntu/disks/root.disk
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/win/ubuntu/disks/root.disk: recovering journal
/win/ubuntu/disks/root.disk contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found.  Fix? yes


Inode 1050146 was part of the orphaned inode list.  FIXED.
Inode 1077514 was part of the orphaned inode list.  FIXED.
Inode 1701061 was part of the orphaned inode list.  FIXED.
Inode 1702072 was part of the orphaned inode list.  FIXED.
Inode 1702193 was part of the orphaned inode list.  FIXED.
Inode 1702199 was part of the orphaned inode list.  FIXED.
Inode 1702364 was part of the orphaned inode list.  FIXED.
Inode 1702367 was part of the orphaned inode list.  FIXED.
Inode 1702426 was part of the orphaned inode list.  FIXED.
Inode 1702547 was part of the orphaned inode list.  FIXED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(4447807--4447809) -(4447811--4447818) -(4453421--4453424) -4453429 -4453431
Fix? yes


Inode bitmap differences:  -1050146 -1077514 -1701061 -1702072 -1702193 -1702199 -1702364 -1702367 -1702426 -1702547
Fix? yes


/win/ubuntu/disks/root.disk: ***** FILE SYSTEM WAS MODIFIED *****
/win/ubuntu/disks/root.disk: 289154/1905008 files (0.2% non-contiguous), 2919640/7614464 blocks
root@ubuntu:/#


Obs.
As opções de Fix deve ser passada pelo usuário.


-- Verificando novamente o filesystem para ver se a correção foi realmente efetuada .
root@ubuntu:/# sudo fsck /win/ubuntu/disks/root.disk
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/win/ubuntu/disks/root.disk: clean, 289154/1905008 files, 2919640/7614464 blocks
root@ubuntu:/#


Tudo OK,então  :


- faça o restart do Ubuntu(up pelo LIve CD).
- Retire o CD,e tecle enter para continaur o processo de restart
- Suba o Ubuntu novamente,sem o Live CD.


É isso!


Abs,


JC

Wednesday, June 02, 2010

Client do Oracle 11gR2 no Ubuntu 10.04

Instalei o client do Oracle 11gR2 no meu Ubuntu 10.04.

Rodando certinho...

jcorrea@ubuntu:/$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 2 17:38:59 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL>; exit
jcorrea@ubuntu:/$ tnsping stewie

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 02-JUN-2010 17:39:13

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:
/u01/app/jcorrea/product/11.2.0/client_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.36.2)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = stewie)))
OK (10 msec)

jcorrea@ubuntu:/$ oerr ora 12514
12514, 00000, "TNS:listener does not currently know of service requested in connect descriptor"
// *Cause:  The listener received a request to establish a connection to a
// database or other service. The connect descriptor received by the listener
// specified a service name for a service (usually a database service)
// that either has not yet dynamically registered with the listener or has
// not been statically configured for the listener.  This may be a temporary
// condition such as after the listener has started, but before the database
// instance has registered with the listener.
// *Action:
//  - Wait a moment and try to connect a second time.
//  - Check which services are currently known by the listener by executing:
//    lsnrctl services
//  - Check that the SERVICE_NAME parameter in the connect descriptor of the
//    net service name used specifies a service known by the listener.
//  - If an easy connect naming connect identifier was used, check that
//    the service name specified is a service known by the listener.
//  - Check for an event in the listener.log file.

jcorrea@ubuntu:/$ oerr ora 1555
01555, 00000, "snapshot too old: rollback segment number %s with name \"%s\" too small"
// *Cause: rollback records needed by a reader for consistent read are
//
   overwritten by other writers
// *Action: If in Automatic Undo Management mode, increase undo_retention
//          setting. Otherwise, use larger rollback segments
jcorrea@ubuntu:/$

Monday, December 07, 2009

Lock version on Synaptic Package Manager - Ubuntu 9.10
Olá,

Para quem já testou o Ubuntu 9.10 via Wubi pode ter deparado com um problema após instalar as atualizações para o Grub.Como não conheço totalmente o Ubuntu fui verificar no Synaptic se existia uma forma de bloquear um pacote para atualização,justamente para evitar a atualização do Grub.E consegui.

Abrindo o Synaptic selecione o pacote o qual você não quer receber atualização .Entre no menu Package e procure pela opção Lock Version.

Pronto,você acaba de bloquear o pacote selecionado para atualização!

Abs,

JC