Wednesday, April 16, 2008

にほんご お べんきょします

わたし わ がねす です

わたし わ まいにち かいしゃ お はたらきます

QEMU - Virtual machine

Running QEMU to boot into a iso image of DSL:

Download / Install QEMU :)

run qemu as follows:

qemu -L . -cdrom ..\dsl-2.3.iso -boot d

If you want to have a virtual hdd:

qemu-img create -f raw linuxhdd.img 500M

boot into dsl:

qemu -L . -cdrom ..\dsl-2.3.iso -hda linuxhdd.img -boot d

open xterm as superuser(root)

fdisk /dev/hda

create partition as required

mfsk.ext3 /dev/hda1

mount /dev/hda1 /mnt/hda

boot and install dsl on to the disk image or store files on to the disk image

Friday, March 11, 2005

Extracting movies from Sony Camcorder

I guess it was three years since my brother Rajesh Bollapragada went to the US and was coming back to visit us all :) I was wondering what he was getting me :p and can I used it with my Linux box?

He got me a Sony DCR-TRV 350; we experimented a lot with it and then tried getting it out on to the pc to preserve the video on CD. We used the driver, and software that came with the camcorder. We tried extracting it out using the USB and that seemed to the only available link that we could establish with the PC. We could extract the video, but it was too bad on quality. The quality was not what we used to see when we connect the camcorder to the TV :( The USB streaming feature on the camcorder enables us to it as a web cam

Then a month or so latter, I came back the Hyderabad and we were on a trip to GOA. I was all geared up, a couple of us Ramana, Arvind, Mridhul, Ramesh by bus and Sailandhar, Sanjay, Kiran, Karthik and Kirthan by car

We landed in GOA enjoyed the whole stay on the gorgeous beaches randomly videoing the joy, then by the time we could realize we were back in Hyderabad

Then I visited the local computer market CTC, and got my self an IEEE1394 card commonly known as a FireWire card hooked it up to the PC, Linux could recognize it instantly. Now all I needed was the tools and the howto. I searched on google for FireWire and came to the URL http://www.linux1394.org, which has tones of information that I needed

I downloaded libraw1394 and dvgrab the ibrary. libraw1394 is the Linux kernel's IEEE 1394 subsystem provides access to the raw 1394 bus through the raw1394 module. dvgrab is the tool that helps you extract movies as AVI files on your Linux Box. I ran the entire necessary
./configure; make; make install; and make raw; (creates the /dev entries from where you can extract video). And then the necessary
./configure; make; make install; for dvgrab

To extract data from the camcorder plug it to the pc using the FireWire and then switch on the camcorder in VCR mode and then run

$>dvgrab baseFileName

dvgrav autosplits the files with the maximum size of 1024Gb or something like that, the maximum size that can fit on a dvd .vob file or some thing like that, I read this some place I don't remember. Some interesting features are that you can stop and start recording, skip, and rewind pause interactively with dvgrab

Look out for the file sizes thet are huge, One will have to use mencoder to compress them as required

Friday, March 04, 2005

Cygwin/X displaying remote Xapps on your Win32 Box

I have a Win32 Box at office and miss GNU/Linux. So I started exploring ways of having access to a GNU/Linux box. The options available to me were to run QEMU virtual machine, or have a dual partition. But then each has their advantages and disadvantages

I luckily, had access to a RedHat 9, machine. Again questions raised in my head telnet, ssh, putty, xmanager, or Cygwin/X. As I wanted GUI access to the box, the options I had were xmanager or Cygwin/X

Cygwin/X is a Win32 port of the Xfree86 X Server and related tools, which is required to provide windowing capabilities, so one can run GUI apps on a remote GNU/Linux box and view the results on your Win32 box

Cygwin/X is what I choose as its free and non-restricting unlike some other. All I had to do was, download a small program called setup.exe from the Cygwin site. This tool provides options to install the Cygwin tools. Cygwin tools are ports of popular GNU development tools for MS Windows. Now that I have the setup.exe I could install all the binaries required to run an X server, to communicate using XDMCP with the remote X server. XDMCP stands for X Display Manager Control Protocol. It provides a way of running the X-Terminal to run on your PC (or MAC) and it uses the X Server to provide a client/server interface between display hardware (the mouse, keyboard, and video displays) and the desktop environment while also providing both the windowing infrastructure and a standardized application interface (quoted from XFree86 Project home page). Which is what I wanted :p

The cygwin site has lot of information that helped me in downloading and installing Cygwin/X.

Cygwin/X provides many ways of running the X server, and the easiest was it to fire up the Cygwin console and run:

Username@CygwinHost ~
$ sh /usr/X11R6/bin/startxwin.sh

It will start the X server and later runs xterm. Then to allow the remote X server to talk to the local X server run:

Username@CygwinHost ~
$ xhost +

This command is used to add/delete users names/ host names that can make connections to the X server.

Now to connect to the remote GNU/Linux box run:

Username@CygwinHost ~
$ ssh -Y -l username ip_address_of_remote_server

Y - Enables trusted X11 forwarding
l - login name, existing on the remote host

I have logged on the remote machine now, I will have to tell X server that GUI outputs should be directed to the remote display. To do that run:

Username@RemoteHost]$ export DISPLAY=ip_address_of_cygwinHost:0.0

Now I can run any xapp that is installed on the remote box, or I could fire up a whole gnome session as follows:

Username@RemoteHost]$ gnome-session

WOLA !!! I can access any of the remote apps

fips, Reclaim free space from a FAT partition

It all started like this. We at twincling were getting ready for our grub and LAMP sessions. We were getting ready to install GNU/Linux on some of the machines, and to our surprise we were at the lab filled with M$ windows. The systems were configured to use the whole hdd for windows, partitioned as c: and some as c: and d:. No unpartitioned space for us to load GNU/Linux

I had the answer it was, fips. But it didn’t come to my mind, as it’s been a long time since I fully shifted to GNU/Linux. We used QEMU for our sessions.

A week later, I was trying to recollect the tool I used and how I came to know of it. As many other GNU/Linux first timers I started, with “The Linux System Administrator's Guide”, which introduced me to fips. Then I did a quick google search, and reach the home page of fips. This is how I rediscovered the tool

So to reclaim free space existing on your Windows FAT partition you can use
fips : (F)irst nondestructive (I)nteractive (P)artition (S)plitting program

Say the situation is that you have a windows machine with 19GB HDD and there is only one partition (C:) In order to install Linux, and you want to resize the windows partition to say 4Gb

Before reclaiming the space you require, you would have to do the following. This is just an extract out of the fips document and don’t try this without reading the FIPS.doc

0) Read FIPS.doc before you continue

1) Take Backups

2) Organize the C: to use no more space lesser than 4Gb

3) Run Scandisk or NDD (Norton disk Dr.) to check for
Bad Sectors

4) Defragment C: *This is very important, as FIPS can only reclaim space available at the end of the disk

5) Create A boot floppy

6) Copy FIPS tools on to the floppy

7) Boot from the FIPS floppy and repartition as
required

8) Reboot the PC and your new partition is available

the newly reclaimed free space is available as a _Primary_ partition which can be deleted, if you want to install Linux on it. And beware that most DOS versions only identify one primary partition

If you want to install Linux on this new partition, delete the partition, and create the required Linux partitions