Thursday, November 23, 2006

Creating a debian stable repository (Step 1)




I adquired a few months ago a external hard drive.
Recently I found usefull to create a repository of the latest stable debian distribution. It might be extremely usefull, if you usually don't have a fast internet connection and have some machines to keep up to date
Step 1: make the partitions
I had made mine recently..Inicially the hard drive have been formated in a big 300Gb NTFS partition.
Cool, apart the fact I cannot write on it using Linux.
So in order to keep portability I made more partitions in FAT32, the disk now, looks like this:


~# fdisk -l /dev/sda

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 18266 146721613+ 7 HPFS/NTFS
/dev/sda2 18267 36481 146311987+ f W95 Ext'd (LBA)
/dev/sda5 18267 23470 41801098+ b W95 FAT32
/dev/sda6 23471 29972 52227283+ b W95 FAT32
/dev/sda7 29973 36481 52283511 b W95 FAT32
~#



I choosed the last partition the be the target of formating. It's empty for now, and will be formated in ext3 format
I must make sure that the disk is not beeing acessed by any other application and umount it.

~#umount /dev/sda*
umount: /dev/sda: not mounted
umount: /dev/sda1: not mounted
umount: /dev/sda2: not mounted
umount: /dev/sda5: not mounted
umount: /dev/sda6: not mounted
~#


Fomat the partition

~# mkfs.ext3 /dev/sda7
mke2fs 1.40-WIP (02-Oct-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
6537216 inodes, 13070877 blocks
653543 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
399 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
~#


Now it must be formated.. Now I have to change the partition system ID to ext3

~# fdisk /dev/sda

Command (m for help): t
Partition number (1-7): 7
Hex code (type L to list codes): 83
Changed system type of partition 7 to 83 (Linux)

Command (m for help): p

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 18266 146721613+ 7 HPFS/NTFS
/dev/sda2 18267 36481 146311987+ f W95 Ext'd (LBA)
/dev/sda5 18267 23470 41801098+ b W95 FAT32
/dev/sda6 23471 29972 52227283+ b W95 FAT32
/dev/sda7 29973 36481 52283511 83 Linux


Now i must apply changes made

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
~#


checking:
~# fdisk -l /dev/sda

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 18266 146721613+ 7 HPFS/NTFS
/dev/sda2 18267 36481 146311987+ f W95 Ext'd (LBA)
/dev/sda5 18267 23470 41801098+ b W95 FAT32
/dev/sda6 23471 29972 52227283+ b W95 FAT32
/dev/sda7 29973 36481 52283511 83 Linux

Hooray!
Let's mount it and start building the repostory

Tuesday, October 24, 2006

Latest Gadget!

They've passed a few months since I got the intention of let my *BIG* mobile phone Nokia 5510 (serious, it's really huge) rests and get a new gadget.
I started looking for those with colourfull screens, cameras, and then I finally start seeking those PDA + phone.

Why a PDA?
There aren't many reasons, there's some stuff I did want to support:
-> A camera (just for kicks, snapshot mostly)
-> A spreadsheet - come on .. it's always usefull and keep you up of you'r expenses. Is the sort of thing everyone eventually uses for keep track of the money but always let it loose accuracy for using it less.
-> A good schedule to keep me up to things - a computer is usefull, but it doesn't fit your pocket
-> A SSH client (might be usefull)

Why NOT a PDA
Then I thought... today with java applications I can gather all those features in a mobile, and for less money :D
Some weeks from there I noticed that theres a mobile phone that assembles all the resorts I requested: Sony Ericsson V630i
-> 3G
-> micro SD card (256MB)
-> Schedule (outlook sync)
-> bluetooth 2.0
-> Camera 2.0 MegaPixel
-> java support
-> ...and other stuff :)


Since the day I bought it I tried to personalized it the most: I downloaded a lot of themes .. and spent some money in the process.. but I don't regret it, after all I've found interesting stuff.

Let's get the applications to work!

About java in mobile phones
Theres an acronym that tells the most about the Java Virtual Machine: the MIDP. For now, it's in the mobile phones market the standarts MIDP-1.0 and MIDP-2.0
MIDP stands for Mobile Information Device Profile and the differences bettween 1.0 and 2.0 differs mostly on the support to some features of the device

from http://www.nec-mfriend.com :
The Mobile Information Device Profile, or MIDP, was established by the MIDP Expert Group (whose members include Sun Microsystems, Motorola, and Nokia) as a standard Java specification to work with CLDC* in handsets, PDAs, and other mobile devices. MIDP applications are called "MIDlets," and many of these MIDP-based wireless Java applications are being developed.



According with a wap site (twilight zone), the informations follows:
Browser: Sony EricssonV630iv/R1CE
Browser/Net-Front/3.3
Profile/MIDP-2.0
Configuration/CLDC-1.1
IP Address xxx.xxx.xxx.xxx


Until now I havent find a java spreadsheet... yet! but I had more luck about sshclient

The last struggle: put a ssh client on the mobile phone
The program is the midpSSH, built in java, by Karl, available in http://www.xk72.com/midpssh/ in both MIDP 1.0 and 2.0.
So, once discovered, I downloaded the full package in MIDP-2.0 and started to use it.

First Attempt
Unfortunately, i'm unable to connect, I got a connection error "Writer: Access is Denied" and the application seems to freeze.. but it's awnsome to see the shell running in the cell phone! :D

The problem is related to the use of a special socket that is required to proceed to the connection, which is denied due to security reasons.
The issues are related to permissions of the java applications in the mobile phone. Some phones let them acess completely the outside world, others, like my own, for security reasons, of course, are quite annoying in that point.

Searching a bit, I found out another release: the midpSSH-ALPHA wich provides the possibility of connection to a middle point proxy in order to get access to the specific socket. Unfortunatelly at that moment I hadn't internet available or administrator rights in the networks I use.

A not-so-short break
Meanwhile... I reported a "handicap" in my mobile phone: 2 dead pixels on screen!!
so.. It was taken from me for repair for about a week and a half.
When it came, I finally got internet at home, and with that, *some* administrator rights in the network!

Proxy server downloaded and logistic matters solved
midpSSH-ALPHA installed, and configured,
proxy server application downloaded, ports open and running!
lets give it a shot...


Proxy server downloaded and logistic matters solved
proxy seted in persistent mode
connection to the proxy, runned OK, but the connection falls few seconds later.
changing proxy parameters to transient
connection to proxy ok, authenticating, good :D I got a shell!! unfortunatelly, few minutes later the connection is lost... "Cannot connecto to the socket", it blames!
But it's suitable for now

Monday, October 23, 2006

The egg yolk

Hello!!


    This blog has as motivation a repository of usefull informations that came up, for future reference for me and for others that eventually face the same obstacles.

    Feel free to post if you think some post is uncomplete or confuse in order to elucidate third parties.

    Among with that, I intend to add *maybe* some pictures, interesting citations or even own thoughts.



Thanks for passing by!
Nuno Leitão

1rst note

Welcome to my recent blog!