Here is a quick overview of the Linux Boot Process, if you are a little rusty. After all, it’s not every day that you need to look into, troubleshoot or adjust the boot process of a Linux box. This might come handy before your next SysAdmin job interview too.
Computer Science from the Bottom Up — A free, online book designed to teach computer science from the bottom end up. Topics covered include binary and binary logic, operating systems internals, toolchain fundamentals and system library fundamentals.
The #! magic, details about the shebang/hash-bang mechanism on various Unix flavours
Linux Insides – a little bit about a Linux kernel
unix-history-repo – a git repository representing the Unix source code history
Here is a excellent Quora question: how many lines of code, if any, from Linux 1.0 are still in the modern Linux kernel, and what is it? And an evenly excellent answer:
According to git diff, 21228 of the 176250 lines from Linux 1.0 (1994-03-14) are still present in Linux 3.12 (2013-11-03):$ empty_tree="$(git mktree < /dev/null)" $ git diff --shortstat "$empty_tree" 1.0 561 files changed, 176250 insertions(+) $ git diff --shortstat -M -l99999 1.0 v3.12 44905 files changed, 17702349 insertions(+), 155022 deletions(-)
Over half of these lines are blank or consist entirely of punctuation; only 10419 of them have at least one letter or number.
We can go back even farther to the very first public release, Linux 0.01 (1991-09-17). Of the 10239 lines in Linux 0.01, 954 survive in Linux 3.12, of which just 242 have at least one letter or number. 123 of them were structs and constants in include/a.out.h (now include/uapi/linux/a.out.h), and 26 of them were the S_* macros in include/sys/stat.h (now include/uapi/linux/stat.h). The rest were scattered through 24 other files with at most 9 lines each.
It might appear that not much. But it is in fact impressive. How much code have you written that survived for over 20 years in a project that has changed so much – from a hobby experiment to a dominant operating system across servers, mobiles, and embedded devices?
Wired.com is running a good piece on the price of the operating systems. It covers a bit of history and shows how things are now and how it all came a full circle – from free operating systems of the past, all through highly profitable years of Microsoft and Apple, and back to free operating systems of today’s mobile world.
In a way, operating systems are returning to their roots as a kind of loss leader. Before the personal computer revolution of the late 1970s, operating systems were just one piece in a vertically integrated stack of technology, a stack that also included hardware and support services. Operating systems like Unix and VMS were used to sell minicomputers and workstations, and companies made their profits on hardware and support contracts. OSes such as BSD UNIX were completely free, and programmers would pass them around at will. Under the same philosophy, Apple gave away new versions of its Macintosh operating system until the crisis years of the late 1990s, when hardware sales slowed dramatically.
In the rapidly developing smartphone and tablet markets, tightly-coupled stacks are once again dominant, so OS makers can subsidize their operating systems with profit from the products integrated into them. Google, for example, subsidizes its mobile OS by selling online ads, and, in theory at least, by selling Motorola-branded hardware. Apple’s iPhone profits come from hardware and service sales, not the OS.
The article also shows how problematic is this new situation for Microsoft.
Microsoft’s OS sales once generated 47 percent of its revenue, but they contributed just 25 percentlast year on decelerating Windows licensing (and even that figure is inflated by ad revenue from Windows Live). In response, Microsoft is restructuring as a “devices and services” business — meaning a company that sells hardware like the Xbox and web services like Azure. In other words, it’s becoming more like Apple. Apple isn’t really a software company. It makes software and services that run on its own hardware devices.
Yes, even Microsoft is moving towards the vertical stack. It recently acquired phone maker Nokia and sells its own tablets. But this game of cross-subsidizing the operating system will be tougher for Microsoft, since the company is no Apple when it comes to hardware — and no Google when it comes to online services. The company rose to prominence in the horizontal PC era, when Microsoft could play one hardware vendor against another, dictate prices, and keep a computer’s hefty OS markup hidden from consumers. Those were the days.
And more specifically:
So to the average consumer, the 21st Century sea change in OS pricing might not be particularly apparent. But to Microsoft shareholders, it will look very real and very scary. The company must make up that 25 percent somewhere else.
It’ll be interesting to see how it plays out.
This seems handy. Description from the app page:
DriveDroid allows you to boot your PC from ISO/IMG files stored on your phone. This is ideal for trying Linux distributions or always having a rescue-system on the go… without the need to burn different CDs or USB pendrives.
DriveDroid also includes a convenient download menu where you can download USB-images of a number of operating systems from your phone.
You can also create USB-images which allows you to have a blank USB-drive where you can store files in. Another possibility is to use tools on your PC to make a bootable USB-drive out of the blank image that DriveDroid created.
Every operating system has its problems. Some things work better than in others, some do worse. Here is an interesting (and very up-to-date) overview of the problems in the Linux space. The good thing about it is that it’s not just bashing Linux over Windows or Mac and it doesn’tjust wine about minor things here and there. There are issues all over, some are being worked on, and some are not, for a variety of reasons. But just knowning these issues is already a good start in fixing them.
I came across a good reminder of the operating system’s purpose in this Slashdot comment:
The point of an OS is to make the software independent of the underlying hardware. Windows lost that independence a LONG while ago (Windows NT / 95). Linux still has it because of the underlying design of the whole thing.
The same comment also brought back some memories of the times when I was working as a system administrator at what is now known as PrimeTel.
Move a Windows server – you can be in for a world of hurt unless you want to fresh-deploy it every time. Move a Windows-client, historically you’d be prepared for blue-screens because you have the “wrong” processor type (Intel vs AMD – requires disabling some randomly named service via the recovery console, for example), reinstalling the vast majority of the drivers (probably from a 640×480 safe mode) and even then can’t be guaranteed to get anything back and working – not to mention activation, DRM, different boot hardware (e.g. IDE vs SATA), etc.
Move a Linux server – unless your OWN scripts do something incredibly precise and stupid with an exact piece of hardware, it will just move over. At worst, you’ll have to reassign your eth ports to the names you expect using their MAC address (two seconds in Linux, up to 20 minutes in Windows and a couple of reboots).
It’s been a few years since I did that. But I remember vividly how we used to move servers from one piece of hardware to another, and since we used a mixture of Windows and Linux servers, the difference was obvious. With everything else being equal, we could migrate a dozen of Linux servers in two-three hours, moving them in parallel. Windows machines took days and had to be approached with very little concurrency.