TagGen 0.3.1: Instalador para Windows

Aproveitei que fui obrigado a usar Windows hoje aqui na federal e resolvi fazer o bendito instalador pra versão 0.3.1 do TagGen.

Dois screenshots:

No screenshot acima, o desenho do humanóide representa a altura e peso de forma visual. Mais acima note a representação da idade do personagem acompanhada de informações históricas do mundo de Tagmar. Perceba também os botões com ícones de dado vermelho, eles provocam o sorteio aleatório dos valores de altura, idade e peso.

Este é o diálogo de escolha da região de origem do personagem. Claramente ripado do TagMap. Você irá notar que ele precisa melhorar um bocado.

Faça o download do instalador para Windows, e esteja avisado que ainda é software Alfa. Relatos de bugs, comentários e sugestões são bem-vindos.

Resizing Maemo SDK VMware Appliance Virtual HD

I’ve received some suggestions to increase the Maemo SDK VMware Appliance virtual hd size in the next release, which is now about 6.5G, and also questions about how to extend its size right now, with the users own hands. In this post I explain the later in the form of a how to.

The tools needed are qemu-img and a livecd iso of RIP (Recover Is Possible) Linux distribution. It could be any small recorver distro you like, but this just do fine for me. You can do this operation from a Windows box if (for some reason) you want to, since the only tools needed in the host system are the said qemu-img, the RIP Linux iso and a VMWare Player.

Now to the How To.

1. Convert the virtual disk from VMDK to qemu raw format.

The virtual hd file if of the vmdk format and we need to convert it to the resizable qemu raw format.

$ qemu-img convert -f vmdk maemo-sdk.vmdk -O raw maemo-sdk.raw

2. Resize it.

I will use 10G, and from this point on the numbers used will reflect it. If you want a different size, check the values you supply for the tools used in this tutorial.

$ dd if=/dev/zero of=maemo-sdk.raw seek=10240 obs=1M count=0 conv=notrunc

The dd command will fill with zeros from the current end point of the virtual hd file to the size supplied in the seek parameter, in this case 10240 blocks of size indicated by obs=1M.
If the output appears as nothing have happened, do just like me and ignore it.

3. Convert it back to VMDK
Delete the original

qemu-img convert -f raw maemo-sdk.raw -O vmdk maemo-sdk.vmdk

4. Resize the partition inside the guest system.
With the virtual hardware changed, you go up to the filesystem level, but you have to do it from another system than the installed on the guest, thus we will work from the RIP live cd, running it on VMware.

4.1. Download the non-X version, for we will use only the shell for this job. Put it in the same directory of the vmware image.

Here: http://www.tux.org/pub/people/kent-robotti/looplinux/rip/RIPLinuX-4.3.iso

4.2. Now, edit the vmx file, which is the one that describes the virtual machine to VMware Player. Search for this line

ide1:0.present = "FALSE"

Comment it and add the following

#ide1:0.present = "FALSE"
ide1:0.present = "TRUE"
ide1:0.autodetect = "FALSE"
ide1:0.startConnected = "TRUE"
ide1:0.fileName = "RIPLinux-4.3-non-X.iso"
ide1:0.deviceType = "cdrom-image"

4.3. Boot the RIP live cd image.
With this you can boot from the live cd image. You can, but the vmplayer will not do it, unless you restart the virtual machine and press ESC when it begins to initialize, then select the option to boot from the cd-rom.

4.4. Delete all partitions in the virtual hds.
No, i’m not crazy, and you will not lose anything. At least if follow these instructions. 🙂
Log in to the RIP system as root, and get the hammer, i mean, call fdisk in the command prompt.

# fdisk /dev/hda

Notice that even this being an step by step guide, some familiarity with fdisk is desirable to understand what is happening. And as said before the numbers used as parameters are valid for this specific case: resize the Maemo SDK Appliance, version 0.4, to 10G.

Now, you should see the fdisk’s prompt, issue a print command to see the current state.

(fdisk's prompt): p

And the following commands should remove the current partitions.

(fdisk's prompt): d

Answer 1 to remove the root partition, repeat the command and answer 2 to remove the swap.
Check again to see that they’re gone:

(fdisk's prompt): p

And write the changes and quit with

(fdisk's prompt): w

4.5. Recreate the partitions with the new sizes.
Call fdisk again, and issue a “new” command:

# fdisk /dev/hda
(fdisk's prompt): n

Answer the questions that will appear with these values:
p, to create a primary partition
1, for the number of the partition
1, for it to start in the first cylinder
21529, for the last cylinder of this partition (cylinders are so old school 🙂

Now for the swap partition.

(fdisk's prompt): n

Then answer:
e, for extended partition
2, for the number of the partition
And accept the default values for the two following questions, which are about the first and last cylinders. This will give the remaining disk space (about 300M) to the swap.

Inside the extended partition we create the logical partition, where the swap will live.

(prompt do fdisk): n

Answers:
l, to create the logical partition
And accept the default values for this logical partition fill the extended one.

Finally, we change the type of the last partition from Linux (its default) to Linux SWAP.

(prompt do fdisk): t

Answer 5, and then 82. The number of the partition and the code for swap, respectively.

Write the changes and get out.

(prompt do fdisk): w

And for the very last step of this part, you setup the swap as true swap.

# mkswap -v1 /dev/hda5

4.6. Check the root partition…

# e2fsck -f /dev/hda1

4.7. … and resize it.

# resize2fs /dev/hda1 9934M

4.8. Now, reboot with

# shutdown -r now

5. Try it on vmware player.
After the shutdown command it will boot normally, ignoring the live cdrom (even it still being setup on the vmx file, from item 4.2 of this how to; you should restore the vmx file to its early state).
Now open a terminal on the guest system and issue the df command:

$ df -h

The new size should be 9.6 G as in this line

/dev/sda1 9.6G 4.7G 4.6G 51% /

Notice that for some mysterious (to me) reason the virtual harddisk now show up as /dev/sda instead of /dev/hda, but it works anyway.

This is it, any problems drop me a comment.

Como todos disseram hoje: Nokia Compra Trolltech

Nem ia falar sobre isso, mas comecei a comentar no blog do Danilo, então vou colocar algo aqui. Como estou preguiçoso, já falei um tanto sobre o que penso da Qt faz um tempo e, mais importante, como quem muito fala pouco coda, vou apenas citar um trecho de um comentário no Slashdot:

GPL for apps, LGPL for libraries. It’s scary to a commercial enterprise, but it really works – at least better than anything else (except, maybe, having a monopoly on desktop operating systems…).

Vitória: Night of The Dead

Sempre gostei de filmes de mortos-vivos. São todos legais, mas recomendo (arbitrariamente) “A Volta dos Mortos-Vivos” e “A Noite dos Mortos-Vivos”. Agora se você quer algo realmente capaz de fazer seu coração disparar (ou parar), só mesmo morando nos barracos construídos na encosta atrás do cemitério de Vitória-PE.

Quinta-feira passada quando voltava pra casa depois de cinco dias de clausura e hiper-foco pra fazer o projeto da disciplina de compiladores, me contam que uma grande chuva encheu a cidade de água. Falavam de 1 metro no centro da cidade (uma das áreas mais baixas).

Voltando ao cemitério… Ah, você não quer voltar ao cemitério? Boa sorte com isso. Agora, voltando ao cemitério, ele é o único da cidade (oficialmente, não sei dos canaviais), é bem antigo e razoavelmente grande. Além das covas e mausoléus (minha família tem um lá, mas eu preferia ser cremado, mas aí podia acabar vendido como tempero por engano) também se usam aqueles conjuntos de gavetas, construídas de concreto fino e que em dias de muito sol parecem um forno de carne humana. Bem insalubre, não passe por lá em dias de muito sol. Ainda sobre os gaveteiros, vários foram construídos encostados no muro de trás, e do outro lado do muro, os casebres, pra baixo deles a velha linha de trem desativada (infelizmente).

Acontece que na última quinta a água da chuva foi se acumulando no pé do muro de trás do cemitério até causar seu desabamento, junto com ele foram os gaveteiros e seus ocupantes, estes ficaram (literalmente) espalhados por toda parte ladeira abaixo. Seis barracos foram destruídos (ninguém mencionou vítimas) e tudo foi cercado pelos não-vivos. Disseram que além dos esqueletos haviam corpos ainda em processo de decomposição. Deve ser à cenas como essas que a palavra “tétrico” se refere.

O JC Online tem uma reportagem com números mais precisos e um vídeo.

Tanto Sucesso Que Não Funciona

Tentanto resolver um problema com o Banco do Brasil, liguei pra central de atendimento. A gravação do outro lado da linha me diz:

“Devido ao enorme sucesso do atendimento, nossas linhas estão congestionadas. Espere um pouco e tente outra vez.”

Ok. Algumas vezes precisamos fazer comparações pra entender melhor os acontecimentos.

Mudança de cenário: algum quarto de motel um sujeito qualquer, uma gostosa e um pênis flácido. O dono da brocha diz:

“Devido ao enorme sucesso do meu pau, não posso atendê-la agora.Tente outra vez mais tarde.”

Provavelmente isso tudo foi non-sense, mas estou muito puto com o banco, e sei que é só o começo… ><