weblog d’un abbe


Finally I installed LTSP

Filed under: Experiences — abbe @ 1914

Finally, I installed LTSP. LTSP is a great distribution of network booting Linux. It has all the preconfigured files, you need to boot Linux over network. And overall performance is cool. I’ve currently tested it with GNOME. It runs fine with no network delays as if I’m working on my own desktop. I’m planning to install IceWM. IceWM is a simple and sleek Window Manager for X.

Recovering from lost MBR

Filed under: Experiences, Experiments, Fun — Tags: , , , — abbe @ 1308

Last night, I lost my hard disk’s MBR, (i.e. 0th sector of my HDD). I was so confused and tensed, that I actually forgot the sizes of my deleted partitions. Thanx to my memory I remembered the filesystems of my partitions.

My primary partitions were:

  1. NTFS
  2. FAT32
  3. EXT3

My extended partitions are:

  1. EXT3
  2. EXT3

I’ve my Ubuntu Live CD so I booted from it.

And then I created a fake MBR (with the help of fdisk, shipped with Linux) where my first partition is spanning whole hard disk and system id is NTFS. I then flushed changes to the disk.

My first partition is NTFS, so I checked its hexdump (hexdump -C /dev/sda1) and then with the help of NTFS Volume Information format (as described in Upgrading and Reparing PCs by Scott Mueller), got the count of sectors reserved by NTFS partition. So I’ve replaced the count of sectors of NTFS partition with the size of first partition in MBR. So, my first partition is recovered.

Similarly, I created 2nd partition (FAT32) in MBR spanning rest of the disk. And with the help of FAT32 Volume Information format (as described in Upgrading and Reparing PCs by Scott Mueller), I corrected its sector count. And its entry gets restored tooo…

For 3rd EXT3 partition, there is no information in the book, so I’ve to use a tool named dumpe2fs (or e2fsdump), to get the count of sectors occupied by the third partition. I corrected its sector count. And its entry gets restored tooo…

For EXTENDED partition, I’ve to tweak a bit. First, I created an EXT3 partition (because I doubted that creating an extended partition might zero my existing extended partitions), spanning rest of the disk and flushed it. Then read the MBR in a file named "mbr" with dd (dd if=/dev/sda of=mbr bs=512 count=1). With the help of hex editor (GNU eMacs in hexl-mode), I manually changed last partition’s system id (498th byte) to 0F (Extended partition’s system ID). Then re-wrote the "mbr" file to disk via dd (dd of=/dev/sda if=mbr bs=512 count=1), asked the kernel to reload partitions via fdisk (echo w |fdisk /dev/sda). Now, all my partitions are restored, since only my primary partitions are erased.

And finally re-installed GRUB on my hard disk locating images on my 2nd primary partition (EXT3).

In this way, I restored my hard disk’s partiton table.

Tip: Never boot FreeBSD from its BootEasy MBR (because it copies itself back to the hard disk from where it is booted) instead use GRUB (0.94, 0.95). These versions can read UFS partitions very well.


How Dual Channel memory works ?

Filed under: C0D, Research — abbe @ 1805

The dual channel memory architecture’s working has interested me so much. I was confused by the fact that what benefit would you get if you’re desired memory addresses are mapped in only channel. But, today after reading the Intel 915G chipset memory configuration guide, I got to know that in symmetrical dual channel environment, memory is interleaved. It is interleaved at the interval of every cache line (usually 128 bytes in Pentium 4). So my solution lies in population of memory

Thanx to Gautam, who pointed out that I should refer to GMCH specs.

Checkout Intel 915G/915GV/910GL Express Chipset memory configuration guide


Configured DNS…

Filed under: Experiences — abbe @ 1854

And today I’d configured DNS. Configuring DNS is very easy if you know theory of DNS very well. I think configuring this server will give me a kick to learn Linux from the bottom (since I’m running on console mode, I’ve not installed X on Linux, so I’ve to do ifup, ifdown, start-stop-daemon etc..). And, my web browser is Lynx. But I’m really enjoying it. :-)


Installed server…

Filed under: Experiences — Tags: — abbe @ 2030

Since Saturday January. 21, 2006, I was busy installing Linux on a new server for my dad’s company. They’ve opted for a assembling a server from Intel instead of getting a readymade (or branded server). I really appreciate this. Their requirement was to reuse their old Pentium II systems. So I suggested why not go for Linux and netbooting it. I’ve tried to create a prototype of PXE booting on Linux but, it was unsuccessful and now. One of Linux Guru, suggested me LTSP. So I decided to try it.

So on saturday, I began installation of server. Installed Ubuntu Linux which I ordered from shipit.ubuntu.com. It was a complex installing Linux on a server. The first task was to figure out how to configure RAID, I’ve referred to some docs on the Internet which says my server board comes with software RAID (or fakeraid) not a hardware RAID, that was a surprise to me. Now finally I’ve installed my system

Tomorrow I’ll configure DNS and DHCP , and then finally LTSP I don’t want LTSP to manage DHCP or DNS for me

CustomDomains beta from Windows Live

Filed under: Fun — Tags: — abbe @ 1351

Signup for custom domains on Windows Live.

This will give you a free yourname@yourdomain.com email address if you
own a domain name. It is from Microsoft Windows Live.

Check it out…

New mail signature

Filed under: Personal — Tags: — abbe @ 1103

I was fed up with a same signature (actually quote) all the time. So I’ve created a shell script which will give up new quote everytime it is executed. It uses fortune and sed. I’m using this script as my email signature in Evolution. You can use it and customize it accordingly.


#Make it executable: chmod +x ./mailsign

#This script requires some hacking because Evolution exepcts signatures
#in HTML whether mail is text or not. So, if mail is in text format, the
#formatted text of signature is taken without HTML tags.
#So to have any kind of formatting in your signature use appropriate HTML.
#e.g. If multiple continuous whitespace is encountered, according to SGML
#specs, it should be merged into single whitespace until unless u give an
#entity   [non-breakable white space]. Another hack is to replace new lines
#with <br/> tags. I've also added underline to the hyperlinks by enclosing
#them in the <a> tag.

#This script requires 'fortune' for quotes and 'sed' for formatting.
#Any other program's output instead of fortune...

echo "--<br/>"
echo "Ashish Shukla \"Wah Java !!\"<br/>"
echo "--<br/>"
fortune |sed s[\$[\<br/\>[g |sed s/\ /\\\&nbsp\;/g


Generifying JavaCUP

Filed under: Hacking — Tags: — abbe @ 1749

I’ve generified source code of JavaCUP 0.10k (converted to use generics) but too my surprise, they already generified that stuff. :D I’ve checked their site 2 weeks ago but that time no migration link was there.

JavaCUP is a LR parser generator for Java language. It is included in the recent JDK also (oops, it is not exposed publically but all it’s classes are already there in the JDK), see Mustang. It’s very cool and very easy to use. You can find it here.


My Localized Name

Filed under: Fun — Tags: — abbe @ 1356

This time I’ve tried to localize my name into different Indian scripts (those based on Brahmi script, those which are listed in ISCII-91 standard and are available in Unicode). So, please post your comments if any of the localized spellings are incorrect. You need to have unicode fonts installed, in order to view of any this stuff.

Oriya      - ଆଶୀଷ

Devanagari - आशीष

Malayalam  - ആശീഷ

Bengali    - আশীষ

Gujarati   - આશીષ

Telugu     - ఆశీష

Kannada    - ಆಶೀಷ


Hello Postscript World…

Filed under: Experiences, Experiments — Tags: — abbe @ 1651

It all started off with HPGL, when in 1997, or 1998 my daddy used to export outputs of his designed PCBs (in DOS), as PRN files. These PRN files are in HPGL. I’d once seen (typed) the HPGL file and it consisted of purely text (some part of text resembles LOGO), I understood that it was some kind of language that HP plotters will understand. I decided to learn that language but no docs, so I dropped the idea.

But then, after few years I got to work on DTP softwares, and there I heard this Postscript, Encapsulated Postscript. I even had a book on Adobe Pagemaker 4, there I also seen this Postscript. And recently in one of the iLUG-d meet (actually on 23rd May, 2004), Raj Mathur told that how powerful Postscript was, that you can write a compiler in it. The next encounter with Postscript is when I got the NASM source code, the author supplied the documentation as a single text file, and with a perl script. The perl script generates the Postscript, RTF, HTML, etc. output from that file. I’m amazed I thought Postscript was as simple as HTML, or RTF. And now recently (actually 4th January, 2006), I downloaded the Postscript Language Reference Manual, and PostScript Language Tutorial & Cookbook. And then found that Postscript was as simple as writing programs for a stack machine.

Postscript machine is a stack machine with separate dictionary like memory (where it holds fonts, variables), etc. Anyways, here is one of my first postscript program.

/box {
 % stack contents
 % stroke width
 % right
 % top
 % left
 % bottom

 /outline exch def
 /right exch def
 /top exch def
 /left exch def
 /bottom exch def

 left bottom moveto
 left top lineto
 right top lineto
 right bottom lineto
 left bottom lineto
 outline setlinewidth
} def

% Draw 4 boxes of stroke width 4/72"
100 100 200 200 4 box
100 100 175 275 4 box
100 100 150 250 4 box
100 100 225 225 4 box

% load a Times-Roman font
/Times-Roman findfont
36 scalefont

100 400 moveto
(Hello Postscript World) show

You can execute the above program on a Postscript interpreter (an opensource interpreter, GNU Ghostscript). Just after an hour of reading the tutorial, I’ve written this program. If you’ve ever programmed on a stack machine, you’ll find programming in Postscript very easy. If not programmed on stack machine, then also it is easy ;-).

Well, Postscript is really cool language. Give it a try.

P.S. The links I’ve provided for Postscript docs, I’ve found when I’ve searched for docs via Google and are not from the Adobe.com.

Older Posts »

Create a free website or blog at WordPress.com.