Sunday, 21 April 2013

The naming of the operating systems.


Have you ever wondered what “XP” stands for or where “Ubuntu” comes from? Some operating systems get their names from obvious places, but others need some explaining. Read on to find out where your favorite OS got its name.

MS-DOS

Micro Soft Disk Operating System (MS-DOS) was originally licensed from Seattle Consumer Products’ Quick and Dirty Operating System (QDOS). MS-DOS had no graphical user interface (GUI) and instead everything was inputted by users via a command prompt. The DOS acronym does not always mean MS-DOS. DOS is a generic term for “Disk Operating System” and MS-DOS was just one of many including Apple DOS, AmigaDOS, freeDOS, and many others.

Windows 1.0 – NT 4.0
The Windows name came from the fact that the new operating system, Windows 1.0, had windows a user could interact with in the GUI. The “Windows” name carries through all the way to current operating system and the number or name following “Windows” is how you can tell what version of Windows you have.
Microsoft stuck with the numbering scheme for 1.0-3.1 when it started to work on its New Technology (NT) branch of the operating system. Windows NT 4.0 was the first to implement the new NT kernel and was released in 1996 using the Windows 95 user interface.

Windows 95 – ME

Microsoft for a short while began naming their Windows operating system with the year of release indicating the version. Windows 95, 98, and Millennium Edition were all built off of the original Windows 3.1 kernel. Millennium Edition was release in 2000 and was designed to be used on home computers while Windows 2000 was designed for business computers.
Windows 2000 used the NT kernel and was the direct successor to NT 4.0, it was later replaced by Windows XP.

Windows XP, Vista, and Windows 7

Windows XP was released in 2001 and the XP stands for eXPerience. This experience lasted all the way until 2007 when Microsoft released Windows Vista. According to Microsoft, Vista got its name because “At the end of the day…what you’re trying to get to is your own personal Vista.” It was very philosophical of Microsoft but ultimately they moved to a more simple approach with Windows 7.
Windows 7 is the seventh version of Windows since 95. Even though 95 wasn’t the first version of Windows if you count 1.0 – 3.1, but Windows 10 just doesn’t have the same ring to it. Plus people might get it confused with Mac OS 10.

System 1 – 7.5

Apple’s System operating system was developed for the Macintosh personal computer. The operating system has always followed a basic revision numbering scheme with every major release getting a 1 point increment with minor updates getting a 0.1 increment.
The Apple Macintosh computer was released in 1984 and got its name from the McIntosh apple.
Each new version featured incremental updates and feature enhancements as well as support for newer Apple computers. System 1-4 had no multitasking support which may sound familiar to another Apple operating system.
The first seven versions of the operating system were simply called “System 1-7.” This held true until 7.6 when the word “System” was dropped in favor of a more marketable “Mac OS” name.
Mac OS 8 came out in 1997 shortly after Steve Jobs came back to work for Apple. Mac OS 8 was supposed to be called version 7.7 but was changed to 8 because of a legal loophole that allowed Apple to shut down the 3rd party Macintosh market.
Mac OS 9 is now known as the last of the “Classic” Mac OSs and was the final release to be based on Apple’s in house code.
OS X (OS Ten) is the tenth version of the Mac operating system and the first Mac OS based on Berkeley Software Distribution (BSD). The underlying OS was developed by the company Steve Jobs started while away from Apple, NeXTSTEP, which Apple acquired in 1997.

Linux
Linux itself got its name from Ari Lemmke who ran the FTP server the original Linux Kernel was uploaded to. Linus Torvalds, the creator of the Linux kernel, wanted to name the kernel Freax, but Ari instead gave him a folder called “linux” to upload his kernel to. The Linux name came from “Linus’ Minix” which was the operating system Linus was trying to replace for himself.

Ubuntu

Like many Linux distributions, Ubuntu releases have two names for every release, a development code name and a version name. The numerical name for the release is based on the year and month of the release, e.g., version 10.04 was released in April of 2010. Every two years a long term support (LTS) release is also made which carries the LTS lettering and also has an incremental release for bug fixes. The current long term support version is Ubuntu 10.04.2 LTS.
Ubuntu also has derivatives that have either a specific focus, location, or major difference in the operating system that requires a different distribution name. Some of the official derivatives are Kubuntu, Xubuntu, Mythbuntu, and Eubuntu. All of the official derivatives follow the same naming scheme as Ubuntu.

Debian
Debian got its name from Ian Murdock the creator of the Debian distribution. He named the distribution after his girlfriend Debra Lynn by combining her name and his into “Debian.”
Each stable Debian release has an associated version number (1.0, 2.0, etc.), but it also has a code name based on a character from the movie 1995 movie Toy Story. The latest 6.0 release is named after the toy aliens “Squeeze.” The development branch of Debian is permanently named “Sid” from the emotionally unstable neighbor in the movie.

Red Hat/Fedora/CentOS

Red Hat Linux received its name because red hats have been the symbol of freedom and revolution in both the U.S. and France. Red Hat comes in a few different flavors, Red Hat Enterprise Linux (RHEL), Fedora Project, and CentOS
Red Hat Enterprise Linux does not use code names and instead just uses version numbers similar to OS X.
Fedora gets its name from the Red Hat logo in which Shadowman, the man in the logo, wears a red fedora hat. Fedora 1-6 were known as Fedora Core while later versions dropped “core” from the name.
CentOS is the community-supported version of RHEL. The name comes from Community ENTerprise Operating System and is one of the most popular web server operating systems. Version numbers for CentOS follow RHEL version numbering and does not have code names.

Gentoo

Gentoo got its name from Daniel Robbins after renaming his Enoch Linux distribution. Gentoo was first renamed when Daniel and the other developers began using the EGCS compiler instead of the GCC compiler for added features and speed. Gentoo is named after the fastest swimming penguin, the Gentoo penguin.
The stylized “g” logo resembles a silver Japanese Magatama which were often found at grave sites as offerings to deities.

SuSE

SuSE is a German distribution which originally stood for “Software und System Entwicklung” which in English translates to “Software and System Development.” Since 1998 the acronym is no longer used and the the name of the company is simply SUSE.
The original release of SuSE Linux was version 4.2 instead of 1.0 in reference to the “Answer to the Ultimate Question of Life, the Universe, and Everything” from The Hitchhiker’s Guide to the Galaxy.
SUSE’s mascot is a Veiled chameleon named “Geeko” from the words “gecko” and “geek.”
SUSE is now owned by Novell and the free Linux distribution is known as openSUSE.

Thursday, 18 April 2013

Entrepreneurial Advice in Exactly 3 Words


1) Defy conventional wisdom.

2) Pick founders carefully.

3) Break the rules.

4) Hire generalists early.

5) Hire specialists later.

6) Invest in culture.

7) Avoid tempting distractions.

8) Hire to elevate.

9) Delight customers daily.

10) Foster diverse thinking.

11) Guard your time.

12) Get sufficient sleep.

13) Decide with data.

14) Treat vendors well.

15) Respect your competitors.

16) Face the facts.

17) Celebrate your successes.

18) Ship then test.

19) Avoid stealth mode.

20) Trust your instincts.

21) Keep it real.

22) Always be recruiting.

23) Never accept mediocrity.

24) Forego your ego.

25) Make some memories.

26) Enjoy the ride.

27) Dare to dream.

28) Fire corrosive customers.

29) Walk your talk.

30) Tell great stories.

31) Always be yourself.

Tuesday, 9 April 2013

Linux booting process


Introduction
In this article, we’ll take a closer look at the booting process of the Linux operating system. We’ve already described the booting process in this article, especially how the system boots if the system partition is encrypted. Let’s take a look again at the same picture that was presented in that article:
We can see from the picture that the booting process starts from the MBR (Master Boot Record), but actually, the booting process begins with the BIOS and continues from there. It’s the BIOS’s job to tell the computer which hard drives are available and to try to search for an active MBR record in the primary hard drive. The MBR record then tells the booting process where the /boot partition is located. Afterwards, the /boot partition is read and examined for any boot loader, which in our case is GRUB.
At that point, the booting of a computer is handed to the GRUB boot loader, which loads the grub.conf file and the kernel of the Linux system and then mounts the root partition, which in this case is /dev/sda3. The execution continues with the kernel image located on the /boot partition. The kernel is loaded and the execution is handed over to the Gentoo init process (with a PID number 1), which is already located on the system partition and is responsible for starting the entire system.
The init process takes care of everything the system needs to boot up successfully. One of the things it does is to start the required scripts, usually located in the /etc/rc.d/ directory. It must also mount the partitions that are listed in the /etc/fstab configuration file. Once everything is done, the login window appears, allowing us to log in to our operating system.[1]
We’ve described the process of booting the Linux operating system only, but it’s quite the same for other operating systems too. In the next part of the article, we’ll take a look at more details regarding the booting process but only at what happens until the operating system itself gains control and does its thing. This way, we’ll eliminate the need to explain the booting process of every single operating system, because each and every OS does things differently and we’re not interested in those at the moment.
BIOS and the MBR
First, we must be aware that the majority of computers have something called the BIOS that begins the initial booting process right after we turn on the computer. But why do we even need BIOS? The reason is that the boot loader is located on a hard drive we have in our machine, and right upon turning on the computer, the processor doesn’t know anything about the boot loader being available on the hard drive. It’s the BIOS’s job to find and load the boot loader installed on the hard drive.
We all know that when we turn on the computer, the BIOS first scans for devices, determines the amount of memory available, etc. After that, the BIOS must scan for bootable devices as configured in the BIOS settings, in that order. Typically, the BIOS finds the hard drive that contains the MBR (Master Boot Record), which must also contain the primary boot loader code.
When the BIOS finds the MBR record, it passes control to the primary boot loader. The primary boot loader must then scan the partition table that is also written in the MBR record and find the active partition, which contains the secondary boot loader. Let’s first dump the MBR in Linux and check its contents. To do that, we must copy the first sector of the disk to the mbr.bin file with the dd command like this:
1
2
3
4
# dd if=/dev/sda of=/tmp/mbr.bin bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0006952 s, 736 kB/s
Now we can use the all-powerful file command to display the contents of the MBR in a more readable format. We could read the hex bytes directly, but why should we? Note that we’ve used the tr command only to replace all the ‘;’ characters with the new line characters to make the output easier to read:
1
2
3
4
5
6
# file /tmp/mbr.bin | tr ';' '\n'
/tmp/mbr.bin: x86 boot sector
 GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200
 partition 1: ID=0x83, starthead 32, startsector 2048, 3906250 sectors
 partition 2: ID=0x83, starthead 71, startsector 3908298, 78125000 sectors
 partition 3: ID=0x83, starthead 85, startsector 82033298, 418084894 sectors, code offset 0x48
We can see that the MBR image has knowledge of three partitions, which have the ID of 0×83 that identifies them as ext3 file system. We can see that none of the partitions is marked as active partitions, but that isn’t absolutely necessary for the system to boot successfully (my system boots fine without this). But let’s mark the first partition as bootable with the fdisk command:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
        # fdisk /dev/sda
    Welcome to fdisk (util-linux 2.22.2).
        Command (m for help): p
       Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     3908297     1953125   83  Linux
/dev/sda2         3908298    82033297    39062500   83  Linux
/dev/sda3        82033298   500118191   209042447   83  Linux
 
Command (m for help): a
    Partition number (1-4): 1
 
Command (m for help): p
       Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     3908297     1953125   83  Linux
/dev/sda2         3908298    82033297    39062500   83  Linux
/dev/sda3        82033298   500118191   209042447   83  Linux
 
Command (m for help): w
    The partition table has been altered!
We’ve entered the p command in the fdisk to display all the partitions. We can see from the output that none of the partitions is currently active. After that, we used the a command to mark the first partition as active and printed the partitions again. This time, the first partition contains the ‘*’ character in the output in the second column, which means that that partition is currently active. At the end, we also have to enter the w command to save the changes we’ve just made to the MBR sector.
Now we need to reboot the system for the changes to take effect. After rebooting, we should dump the contents of the MBR sector again and print them with the file command. The contents of the MBR are shown below:
1
2
3
4
5
6
# file /tmp/mbr.bin | tr ';' '\n'
/tmp/mbr.bin: x86 boot sector
 GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200
 partition 1: ID=0x83, active, starthead 32, startsector 2048, 3906250 sectors
 partition 2: ID=0x83, starthead 71, startsector 3908298, 78125000 sectors
 partition 3: ID=0x83, starthead 85, startsector 82033298, 418084894 sectors, code offset 0x48
We can see that the first partition is the active partition. We’ve identified that the MBR contains the first boot loader as well as the partition table, which is very important information since, without it, the operating system cannot boot. The job of the BIOS is to identify the first bootable device that contains the MBR record and pass control to the primary boot loader, who must then determine which partition is active and load the secondary boot loader from that partition.
The structure of the normal MBR record is as follows (the picture was taken from [3]):
You can see that the first boot loader takes the first 446 bytes of the 512-byte MBR, which is 88% of the size. There are also four partition entries, which clearly gives us the idea why we can only set up four primary partitions in any partition editor. If we want to set up more partitions, we have to use logical partitions. The MBR entry also ends with the boot signature 0x55aa, as we can see on the picture above.
Let’s dump the contents of the mbr.bin file we’ve dumped previously:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# xxd /tmp/mbr.bin | sed 's/  .*//g'
0000000: eb48 9010 8ed0 bc00 b0b8 0000 8ed8 8ec0
0000010: fbbe 007c bf00 06b9 0002 f3a4 ea21 0600
0000020: 00be be07 3804 750b 83c6 1081 fefe 0775
0000030: f3eb 16b4 02b0 01bb 007c b280 8a74 0302
0000040: ff00 0020 0100 0000 0002 fa90 90f6 c280
0000050: 7502 b280 ea59 7c00 0031 c08e d88e d0bc
0000060: 0020 fba0 407c 3cff 7402 88c2 52be 7f7d
0000070: e834 01f6 c280 7454 b441 bbaa 55cd 135a
0000080: 5272 4981 fb55 aa75 43a0 417c 84c0 7505
0000090: 83e1 0174 3766 8b4c 10be 057c c644 ff01
00000a0: 668b 1e44 7cc7 0410 00c7 4402 0100 6689
00000b0: 5c08 c744 0600 7066 31c0 8944 0466 8944
00000c0: 0cb4 42cd 1372 05bb 0070 eb7d b408 cd13
00000d0: 730a f6c2 800f 84ea 00e9 8d00 be05 7cc6
00000e0: 44ff 0066 31c0 88f0 4066 8944 0431 d288
00000f0: cac1 e202 88e8 88f4 4089 4408 31c0 88d0
0000100: c0e8 0266 8904 66a1 447c 6631 d266 f734
0000110: 8854 0a66 31d2 66f7 7404 8854 0b89 440c
0000120: 3b44 087d 3c8a 540d c0e2 068a 4c0a fec1
0000130: 08d1 8a6c 0c5a 8a74 0bbb 0070 8ec3 31db
0000140: b801 02cd 1372 2a8c c38e 0648 7c60 1eb9
0000150: 0001 8edb 31f6 31ff fcf3 a51f 61ff 2642
0000160: 7cbe 857d e840 00eb 0ebe 8a7d e838 00eb
0000170: 06be 947d e830 00be 997d e82a 00eb fe47
0000180: 5255 4220 0047 656f 6d00 4861 7264 2044
0000190: 6973 6b00 5265 6164 0020 4572 726f 7200
00001a0: bb01 00b4 0ecd 10ac 3c00 75f4 c300 0000
00001b0: 0000 0000 0000 0000 3455 0000 0000 0020
00001c0: 2100 8347 1ef3 0008 0000 ca9a 3b00 0047
00001d0: 1ff3 8355 f5f2 caa2 3b00 c817 a804 0055
00001e0: f6f2 83e9 7f9a 92ba e304 1e78 eb18 0000
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa
Notice that the signature of the MBR is indeed 0x55aa at the end of the dump.
The secondary boot loader is often GRUB or LILO for Linux and Bootmgr for Windows. Their job is to load the kernel and boot the operating system. The primary boot loader searches for the active partition and loads its VBR (Volume Boot Record) into memory. The VBR is a boot sector that contains the machine code for bootstrapping programs, usually operating systems stored in other parts of the device.[2]
It’s also often the case that we install the GRUB or LILO boot loader directly into the MBR, because if we don’t, the BIOS still needs a primary boot loader that loads the secondary one. But why shouldn’t we install GRUB directly in the MBR as the primary boot loader instead? This is actually the default way that GRUB/LILO is installed today.
Let’s take a look at how we would install GRUB to be the primary and secondary boot loader. To install Grub as the primary boot loader, therefore on the MBR, we should run the following:
1
# grub-install --no-floppy /dev/sda
But if we would like to install Grub on the VBR of a partition /dev/sda1, we should run the following:
1
# grub-install --no-floppy /dev/sda1
Let’s also take a look at the contents of the /boot/grub/ folder, which are listed below:
1
2
3
# ls /boot/grub/
default     e2fs_stage1_5  ffs_stage1_5  iso9660_stage1_5  menu.lst        reiserfs_stage1_5  stage1  stage2.old       ufs2_stage1_5    xfs_stage1_5
device.map  fat_stage1_5   grub.conf     jfs_stage1_5      minix_stage1_5  splash.xpm.gz      stage2  stage2_eltorito  vstafs_stage1_5
This gives us a clear indication that the boot loader must also support the file system that the system is using. In our case, since we’re using ext3 file system, GRUB should be able to support it, because it must mount it and pass control to the operating system. GRUB supports the following file systems: ext2, DOS FAT16, FAT32, FFS, JFS, ReiserFS, MinixFS, UFS, XFS, VstaFS and Iso9660.
Conclusion
We’ve taken a look at how GRUB boots the Linux operating system, but we’ve also reviewed the role the BIOS has in the whole picture. We’ve seen that the BIOS is pretty important when it comes to booting the primary boot loader, as without it, it wouldn’t be possible to boot the operating system from the hard drive in normal computers.