Category Archives: Unix/Linux

Trained in AIX…

Last week I attended a training on AIX system administration from IBM (organized by company, obviously 😉 It was a 7 days course covering all of the system administration stuff. There was a lot of new stuff to learn, LVM being the most number of times uttered word, once we did the chapter on LVM. It was a nice experience as a whole as for the first time I attended any training on Unix.

The sessions (specially after lunch) were sleepy also. I find this ppt method of training pretty boring. The trainer (most of) strictly, stupidly follows the slides and slide, I feel is a dumb sort of thing, makes you feel sleepy except at the moments when there are few eye opening bullet points.

There should be bare minimum number of slides and for rest of the things, trainer should use white board so that everybody follows that and doesn’t sleep 🙂

Anyways it was really enjoying to be familiar with so many things in Unix.

Sidhu

Why Linux cries about "1024 cylinders thing" at the time of installation…

I have been installing Linux for last 6 years and for more than half the number of times, came across a message something like “This partitions is beyond the 1024 cylinder boundary and may not be bootable”. But never cared for it much and understood what exactly it meant to say ?

Yesterday I was reading System Admin guide to Linux by Lars Wirzenius (Thanks Howard for the link 🙂 From there I came to know what exactly that message meant. Quoting from the guide itself:

Unfortunately, the BIOS has a design limitation, which makes it impossible to specify a track number that is larger than 1024 in the CMOS RAM, which is too little for a large hard disk. To overcome this, the hard disk controller lies about the geometry, and translates the addresses given by the computer into something that fits reality. For example, a hard disk might have 8 heads, 2048 tracks, and 35 sectors per track. Its controller could lie to the computer and claim that it has 16 heads, 1024 tracks, and 35 sectors per track, thus not exceeding the limit on tracks, and translates the address that the computer gives it by halving the head number, and doubling the track number. The mathematics can be more complicated in reality, because the numbers are not as nice as here (but again, the details are not relevant for understanding the principle). This translation distorts the operating system’s view of how the disk is organized, thus making it impractical to use the all-data-on-one-cylinder trick to boost performance.
.
.
.
When using IDE disks, the boot partition (the partition with the bootable kernel image files) must be completely within the first 1024 cylinders. This is because the disk is used via the BIOS during boot (before the system goes into protected mode), and BIOS can’t handle more than 1024 cylinders. It is sometimes possible to use a boot partition that is only partly within the first 1024 cylinders. This works as long as all the files that are read with the BIOS are within the first 1024 cylinders. Since this is difficult to arrange, it is a very bad idea to do it; you never know when a kernel update or disk defragmentation will result in an unbootable system. Therefore, make sure your boot partition is completely within the first 1024 cylinders.

Hope it clears the logic why Linux cries about 1024 cylinder issue at the time of installation.

You can read the guide online from the link above and download the pdf here. Its simple and concise and just too good. Small thing covering much 🙂

Sidhu

Using NTLDR to boot Linux…

Sometimes, while installing Linux, installing LILO/GRUB to MBR makes you run into loads of issues, one of the most popular being that after reboot you are not able to boot into either of the OS 😉 There is a way to use NTLDR to boot Linux, this way the MBR remains untouched and if you don’t want to see the Linux option, what you need to do is, edit your boot.ini and your are done.

For this while installing GRUB, install it to the partition where you are installing Linux, instead of MBR. Now after rebooting, Linux will not boot as the partition on which you installed GRUB is not active. What actually we will do is, copy first 512 bytes of the partition where GRUB is installed, make a bin file, copy it to C drive and add the path of the same to boot.ini. So now, when you select Linux from the list of options displayed, NTLDR will call GRUB and then GRUB will boot Linux, just like normal.

There is a small utility called bootpart that does this all for us. Here is the direct link. Extract it and go to command prompt.

C:\bootpart>dir

Volume in drive C has no label.
Volume Serial Number is 08E8-E412

Directory of C:\bootpart

05/05/2007  04:19 PM              .
05/05/2007  04:19 PM              ..
08/01/2005  02:26 AM              32bits
08/01/2005  02:06 AM            44,544 bootpart.exe
08/01/2005  02:06 AM            12,055 bootpart.txt
08/01/2005  02:06 AM               119 bootpart.url
08/01/2005  02:06 AM               383 file_id.diz
4 File(s)         57,101 bytes
3 Dir(s)   4,188,106,752 bytes free

C:\bootpart>

Run bootpart, it will show all the partitions on the disk like

C:\bootpart>bootpart
Boot Partition 2.60 for WinNT/2K/XP (c)1995-2005 G. Vollant (info@winimage.com)
WEB : http://www.winimage.com and http://www.winimage.com/bootpart.htm
Add partition in the Windows NT/2000/XP Multi-boot loader
Run "bootpart /?" for more information

Physical number of disk 0 : 282d282d
0 : C:* type=7  (HPFS/NTFS), size= 25599546 KB, Lba Pos=63
1 : C:  type=c  (Win95 Fat32 LBA), size= 11751547 KB, Lba Pos=208828935
2 : C:  type=d7 , size= 1052257 KB, Lba Pos=232332030
3 : C:  type=f  (Win95 XInt 13 extended), size= 78814890 KB, Lba Pos=51199155
4 : C:  type=7   (HPFS/NTFS), size= 25607578 KB, Lba Pos=51199218
5 : C:  type=5   (Extended), size= 35736592 KB, Lba Pos=102414375
6 : C:  type=7    (HPFS/NTFS), size= 35736561 KB, Lba Pos=102414438
7 : C:  type=5    (Extended), size= 15366172 KB, Lba Pos=173887560
8 : C:  type=83     (Linux native), size= 15366141 KB, Lba Pos=173887623
9 : C:  type=5     (Extended), size= 2104515 KB, Lba Pos=204619905
10 : C:  type=82      (Linux swap), size= 2104483 KB, Lba Pos=204619968

Now the one at 8th number is my native Linux partition. Now run bootpart 8 c:\linux.bin (Here 8 is my Linux partition number and linux.bin is the name of the file which it will create in C drive) It automatically adds the entry to boot.ini So now you are ready to go. Just reboot and you will see 2 options there. Windows & Linux 🙂

Happy NTLDR’ing…

Sidhu