Sunday, November 30, 2008

Migrate aNd Manage Project status: Link added

I've just added link function in mNm. So, old user folder from OSX/Win can be linked under current user folder, it will be named "~/mNm_folder". This link function is one of the backup option once the function "MoveSrcDir" or "CreateAndMove" is called.

At this point it will handle all users that is provided in the given list. It could be called up when used in GUI mode. Since I'm now targeting on having mNm in GUI mode, I don't put a lot of error checking in command mode at this state. But I'm sure I may add on more to make it better in the future.

Here is the link you can find the latest version of mNm...

mNm0.2.3

Friday, November 28, 2008

Migrate aNd Manage Project status: AutoMount added

Finally I added automount function. It could be called with flag "-am" or "--AutoMount". It currently support ntfs/fat16/fat32. I may add function to support hfs/hfs_plus also (for OSX).

This function will automatic mount disk and partition from sda0 to sdj9. I believe it would be cover in most cases. Unless someone has more than 10 physical hard drive or more than 10 partitions.

The following link is the file of current work version. You're more than welcome to try it out.

mNm v0.2.2

Wednesday, November 26, 2008

Migrate aNd Manage Project: Status update

Right now, I'm working on auto mount function for Migrate aNd Manage.

I was trying to see what is the best way to do. And I come out of 2 different approach. First, just let create a temp folder and use bash command to mount it. It will be one or multiple loop to mount all sd* . Since hd* is not the standard any more. At this point, I will use sd*. The loop will trying mounting all harddisk and partition in FAT/ntfs format and also hfs, hfs-plus format. The second way to do is capture the command return from "fdisk -l", it will return all partitions that is avaliable to the current system.

It sounds like using "fdisk -l" is a smarter way to do. But after an overnight of research, considering the afford and speed to the system, it seems auto mount is actually more efficient. Because if the program spend time on calling "fdisk" and anylise the output. Then mount it, it actually the system is doing more than mounting them one by one. Instead if I trying to mount one by one, it could have been even faster than capture in fdisk.

But.. here is a concern.. Since, i'm gonna mount the source partition in a temp name, say "/media/ntfs1", what if people want to use another name? but I'll work on this part later..

Step by step.. function by function.. ^^

Saturday, November 22, 2008

SYA710 Lab04 - Building your own kernel

This is an exciting lab. If you have done something wrong in GRUB loader, you may have big problem on loading new kernel. But of course you can always boot your old kernel and trouble shoot it.

In this lab I learned how to customise your kernel. We downloaded the kernel source from the internet and customise the GRUB to boot the new kernel.

Customising kernel is an important thing. You can customise your Fedora Linux kernel with loading an driver during boot. This is very important for a lot of linux user, since a lot of Linux users has problem with Vista based hardware device, which may not supported for a fresh installed Fedora Linux. So, you can put your driver in the kernel and you can use your hardware in your Fedora Linux.

Another thing about customising kernel is you can pack your customised kernel source in to a tar ball, and next time when you have an fedora install again, instead of downloading and install the driver again, you can just un-tar the old kernel and load it again.

When other operating system give you a fancy interface, on top of fancy interface, linux provide a flexible OS for you, so you can do any changes any time you want.

Freedom... this is what Linux about.

NAD710 Lab 09 - IP Routing

Network Diagram Two by Milton Neto Paiva


Introduction
For NAD710 lab09, Patricia, Milton, Mohak and myself did this lab together. Since Patricia and Milton already has two excellent step by step guide for routing between three network. I think it would be better to me to descript what problem we face instead of having another network routing guide.


Concept
The purpose of this lab is to setup fully routed network between 3 different sub-network with 5 Fedora Linus computers. Two of the computers will act as an router, which will provide routing between networks. Two of them are just host/client. Our network supposed to be fully routed, each host will be able to access each other, including ssh.


Step by Step
First of all, we sit down and design the network diagram. As the routing diagram shown, that is the design of our network. Each network will have different subnet mask and ip map. And routers has two NIC with two differetn IP. And host will only have one NIC and IP.

Then we set up each network's host and router and make sure it can ping to each other. This can be easily done with "ifconfig" and "route add". Then we set routes between the network 11.0.0.0/8 to 172.17.0.0/16 and the network of 172.17.0.0/16 to 192.168.2.0/24. Once the pair of Host A, Host B and Host B, Host C establish the connection. We can move on next.

The next step is the most important step. We will connect the whole network together. Again, we add another route in each router, so they will connection between three network. After the routing table is update, test the connection between them. Then the routing task is finished.


Problem That We Faced
Since we use command to add routing and ip, we had some human mistake in adding route. We mistyped a number in one of the router. So, we could not route to each other, that happened in the router ip 192.168.0.254. It cost us almost half an hour to solve this problem. We could reduce the time on this trouble shooting if we check the routing table and IP step by step. But, like what Professor John Selmys said, "If you never make mistake, you'll never learn."


What we learn about this lab
So, the task is done and what we've learn? This is actually a very partical lab. In this age, almost every one has a computer and you may have more than one at your work place. Sometime for advanced secured network, you may need to set a network that able to access internet and between your local network, but there are no access from WLAN. And some situation is you may only want one or two computer/server that accept connection (e.g.. ssh, sftp) from the internet. And that would be a real task.

Network/Routing Diagram One by Patricia Constantino Sosa

Friday, November 21, 2008

LUX Project: Looking forward to 0.3

First of all, the name of Windows Data Migration Tool will change to "Migrate aNd Manage", mNm in short. Since it will support other operating system instead of just Windows XP and Vista. And here is the plan for 0.3 release.

0.3 Plan
- name change to "mNm", Migrate aNd Manage
- add link function to map user(s) sub folder(s), all or list
- add move function.
- add ntfs-3g mount loop
- check fedora user partition usage, see if there is enough space to do copy/backup function.
- in each ntfs-3g supported partition, use default user folder path to look for partition(s) to migrate.

= If time is allowed...
- one command, auto migrate from all xp/vista partition (integrate auto mount, default user folder check, move

Monday, November 17, 2008

0.2 Relase Contributions - De-Luxer Community

It's almost the end of semester. I'm so glad that I'm doing LUX in Seneca@york. All my classmates are friendly and nice. We're like a small group of community, we help each other to learn and acheive our goals.

I'm so glad to meet Milton and Mohak. They helped me a lot on my LUX Project and the arcade project. Of course, I gave them some help too. Beside them, I also helped Steven Liang a little bit on his project. Since we don't speak perfect English, we try to help each other to understand what we miss in class and things for our projects.

I heard that next sem is gonna be tough on project. I've gotta finish my functions this month, so I can work on the GUI next sem.. ^^

And good luck on your project guys...

SPR720 Lab - Homebrew python game: GuessGuess(PG)

Love python... cos I don't need to spend too much time on setting variable type so i can have time to really do programing. Compiler is so helpful and style. And the most important thing is, it's cross platform!

So, here is the game I modify from the lab material... make sure you got your parents with me when you're playing it.. hehe.. you'll know...

http://matrix.senecac.on.ca/~tnchan/spr720/

LPT730 Lab8b - Mosaic Effect

Ok.. here is show time.. a lot of people complain that Linux dosen't have good photo editor. Actually, Linux dose! It's "GNU Image Manipulation Program", and it's free. Of course, there are some missing functions, but if you know how to use it, there are a lot of cool function that you'll find, here is a photo of me.. click on the photo to enlarge, you'll be in love with me.. hehe..



Nes Nes ----->>

LPT730 Lab8a - F-Spot Photo Manager Importing


Today, I'm gonna show you guys how to import photo to your Linux system. Like any other people, I use F-Spot Photo Manager, cos it's easy and fast. What we should do is just open F-Spot and it will pop up a small window to let you import photos from either your hard disk partition or your camera via usb. Then wait for few minutes, depends on how many photo is on your partition/camera.



Now, we can see all the photos in your partition/camera.







And, F-Spot also support some simple photo editing. For example, red-eye removal and cropping. It's is so easy to use that all you have to do is play with it for a bit, then you'll know how to use it.





If you google around, you'll find F-spot is properbly the best photo manager in Linux. But to me, I prefer ACDsee 3.1 in windows, since I've been using it for a while. It dose all basic photo editing that I need and it support full screen viewing with easy mouse control in high speed. But of course, ACDsee is not open source tho.



Anyway, hope you guys will enjoy F-Spot. ^^

Nes

LPT730 - Torrent and Magnet Link

There are a lot of different way to share files over the internet nowadays. And the most popular two are "torrent" and "magnet link". In the most case, torrent will download files with the whole folder, files structure, when magnet only support single file sharing. Of course, you can download few file at the same time with magnet link.

The good thing about magnet link is all you have to do is download a client that support magnet link, for example, Limewire. Those applications will allow you to share a hold folders to the network when you're downloading some files. And of course you have the right not to share your files, but it may limit your download rate. Another good thing about magnet is you can use the internal search function to search any thing you want. It's fast and easy to you. But since there are a lot of virus package in this sharing network, it's always better to pay extra attention what you are downloading.

How about torrent files? Torrent is actually getting more and more popular nowaday. It has newer files, better control and sharing ability. For example, if you are downloading a folder of your friends' photos, you can choose which file or even folder to download first. And of course, you can set upload and download limit. But the downside of torrent is, it needs a tracker to keep your connection up-to-date. Once your tracker is not working any more, you may have problem to look for seed and leecher. Even you are 99% done, if you can not find the last piece of your file, that file may take forever to finish. But since torrent support priority per file/folder, it's not too bad that if you miss one of your photos when you got 99 photos in your system. ^^

Saturday, November 15, 2008

Windows Data Migration Tools(wdmt) - Release 0.2

Windows Data Migration Tools(wdmt) release 0.2 is finally finished. In this version, wdmt will support most cases of data migration in command mode. Please see the following link for detail of wdmt. Here is a list of current features in wdmt release 0.2.

Features
= Support post install files migration
= Support XP/Vista/OSX
= Support random flags syntax in command mode
= Support listing users from XP and Vista
= Support any Linux or Unix based system that has python installed and same user folder structure.
= Support automatic user detection or with a given user name(s)
= Support copying file(s) and folder(s) to specified location
= If given location is not a XP/Vista home folder, it will report error message and exit
= When duplicate file(s) or folder(s) is detected, wdmt has an option to replace older file/folder, backup existing Fedora user folder(s) or replace existing user folder(s)
= Auto create user list with a temporary password and migrate folders and files


wdmt release 0.2 python code
wdmt in Open Source@Seneca wiki

Tuesday, November 11, 2008

Windows Data Migration Tools - Recusive! yahoo!!!

I've been doing my last flag for copy/moving user document function, which is comparing souce and target file and only copy the newer one from souce. It should check all sub-directories also. I was thinking to use os.path.walk, cos when i was talking in irc, someone told me to use it. So i go ahead... and.. here it came the nightmare.

I started coding this ReplaceOld function since 6am this morning.. I couldn't get it done after 4 hours of struggle, cos os.path.walk, dosen't allow me to do what I want. I need to go back to parent directory any time I want and I need the path after the source path. If I keep using this function, I may need to use nested array, which is headache and will use a lot of resources and do a lot of coding too.....

And this morning... finally, i figured out what to do... (on the way to washroom.. lol )...

RECURSIVE FUNCTION!!!

Yes!! so, i dun have to assign a lot of array and just call up the function itself, that's it! As long as my calculate is right, it'd be okay. To me it's just something like an other "for..." loop. And it works!!

But of course, this function is not completed yet. But I'm still so excited! Hope I can finish this function before this week. Then I can move on other functions... ^^

Last night, I started coding from 7pm last night to 7am.. oh yeah.. 12 hours of programing.. hehe... I got 400 lines done so far. And if I'm done with this function, I have 3 totally working functions which included a lot of error flag checking already. And I've got a very smart design of flag sorter/reader function from someone's code on net.

Can't wait to see it? Wait for my WDMT 0.2 release! ^^

Sunday, November 9, 2008

Windows Data Migration Tool - copytree issue...

I've got a user folder directory function working. But there is a problem now, python will only copy the directory tree to an non-existing directory. And I would assume that user call up this function when the user is already created. So, what should I do?

Hope I can find a function that support merge directory. Otherwise, I have two choice, copy windows directory to a subdirectory, lets say, /home/_user_name/Music/xp_music/ or.. i can ask user if he wants to delete the music directory.. or... the best way is to write a function and generate a list of folder and files that need to be copied... And it seems this is the best way to do...

Or... how about calling up File Browser to do the job? ^^ Lets see.. it's late today, gotta go home and have my dinner...

Thursday, November 6, 2008

SYA710 Lab06 - Virtual Machine

Oh.. VM.. i love it.. isn't it cool to have a totally different operating system running on your machine? It dosen't matta what OS u're gonna put, OSX, Windows, FreeBSD, it's just cool!!! seeing VM running is like.. seeing a woman has a baby in her stomach. ;-p

So, I put FreeBSD 7.0 in Fedora 8. It's really cool. Althought I was kinda disappointed about not seeing any GUI. I think GUI is not in the default installation. But it's still cool. And the coolest thing is you can have few VM running in your system! Isn't it great to see 3 babies in a woman's stomach?

I think I'm gonna put a OSX in my Fedora when I have chance... So I can run a iPhone simulator, hehe.. it's gonna be fun. ^^

SPR720 Package Review

This week, I have a chance to review some package. I choose this soundmodem, because it sounds like an interesting thing. It's really good to have experience on review packagin, because we can know what will our project face when our project is completed. From this lab, I can see packaging from another angel. Which open my eyes and let me know what I should do when I do my package and codying.


Links:
Review Request: soundmodem - Soundcard Packet Radio Modem

Windows Data Migration Tool(wdmt) - Progress News

I've been working on coding wdmt in python. I found it's really easy. I myself don't have much experience on programming. The only programming langage I used the most was GWBASIC, yeah.. structure programming. But of course, I did learn some at other college and university. But it's still lack of skill tho.

I was so happy to see my first python function running. Then I made my argument coding completed also. Great!! Althought I found there is a better way to sort out argument input, but it's still good. Because It means I'm improving. And I think I've been learning faster than I expected.

In my early planning, I was going to have all functions working on Release 0.2. But it seems to be impossible now, because of the time of learning curve is more than I expected. But I still plan to have all command mode functions working at the end of this sem. Wish me luck. ^^

Here is something I would like to share to you. The way I learn python is not from reading a concept, it's actually not the best way to learn thing, but it's the fastest way. When I need file handling, I google "python file handling", when I need user create, I search "python user create". It seems to improve the speed on learning. But of course, I may not making the best app, but I'm sure it's a working app. ^^

Right now, I have a simple user search based on listing vista/nt user directory and exclude a list of non-user folders and the help file after 5 hours of coding. The simple user search should handle the most documents migration cases. But at the end I may need to go to registry file and search for user's documents path, since user may move their folder to other location, eg: user may move music folder to 'D:\user_name\mp3'

I will have at least 2 more days to code, wait for my good news.. ^^

Tuesday, November 4, 2008

Kick Start - Creating User in Automatic Installation

In the lecture, Prof. John Selmy suggested me to have a look of kick start configuration options, I may able to use one or two function from kickstart. So I did.. and yeah.. it dose support user creation!

It seems useful. When I was thinking how to use it, I had a second thought. Because if I use kickstart to do user migration, then, the adminstrator can not use the Windows Data Migration Tools (WDMT) after installation. Then it is not the concept of WDMT, cos we want WDMT to support post-installation migration.

But i found some other usefull options. First one is cmdline, it support some non-interactive command to run during installation. It's cool. Because you can run your own bash, python script to do something that the installation dose not support. Second one is firstboot, it will allow system to enable or disable firstboot to run after the system is installed. I would properly disable it if I am using kick start to install a lot of machines. Because I prefer to do those first boot functions our self. ^^

Anyway, I was of surprised how many options kickstart support.. There must be like 100 options. It's a really good administrators tool. ^^

============================
user (optional)
Creates a new user on the system.
user --name= [--groups=] [--homedir=] [--password=] [--iscrypted] [--shell=] [--uid=]

--name=
Provides the name of the user. This option is required.
--groups=
In addition to the default group, a comma separated list of group names the user should belong to.
--homedir=
The home directory for the user. If not provided, this defaults to /home/.
--password=
The new user's password. If not provided, the account will be locked by default.
--iscrypted
Is the password provided by --password already encrypted or not?
--shell=
The user's login shell. If not provided, this defaults to the system default.
--uid=
The user's UID. If not provided, this defaults to the next available non-system UID.

cmdline (optional)
Perform the installation in a completely non-interactive command line mode. Any prompts for interaction will halt the install. This mode is useful on S/390 systems with the x3270 console.

firstboot (optional)
Determine whether the Setup Agent starts the first time the system is booted. If enabled, the firstboot package must be installed. If not specified, this option is disabled by default.

--enable or --enabled
The Setup Agent is started the first time the system boots.
--disable or --disabled
The Setup Agent is not started the first time the system boots.
--reconfig
Enable the Setup Agent to start at boot time in reconfiguration mode. This mode enables the language, mouse, keyboard, root password, security level, time zone, and networking configuration options in addition to the default ones.

Monday, November 3, 2008

Windows Data Migration Tool - Plan for 0.2 Rlease

After researching on Windows XP, Vista system, I think it's time to do some actual coding.

I'm planning to write all the codes for user and directory handling. Which included user search and create, directory search and create. The functions sounds complicated but the concept is easy. All it will do is list vista/xp home directory and generate a list, administrators files will be moved to root in linux.

The program will be writen in multiple function format, in one big python code files. User will be able to run the program with running "wdmt" with flags. It may not have full support in 0.2 release, but may able to handle basic user search and folders functions.

Please refer to my wiki for detail informations...

Windows Data Migration Tool in Fedora Project

Windows Data Migration Tool in Seneca Open Source Wiki