How to add a swapfile with Linux and thoughts on the Die Hard 4.0 movie.

To create a new swapfile on your Linux machine to complement the existing /swap partition; the dd command will come in handy. This command will create the swap file as a loopback filesystem.

adeptus-mechanicus ~ # dd if=/dev/zero of=swapfile bs=1024 count=524288

This command will make the filesystem a valid swap file.

adeptus-mechanicus ~ # mkswap swapfile

Then use the swapon command to switch on the new swap file.

adeptus-mechanicus ~ # swapon swapfile

This is how easy it is to create a new swap filesystem on Linux. And this command is the easy way to list the swap partitions and filesystems on your Linux system.

adeptus-mechanicus ~ # cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/sdb5                               partition	2559996	4	-1
/root/swapfile                          file		524284	0	-2

And the free command will also show more information about your swap partitions.

adeptus-mechanicus ~ # free
             total       used       free     shared    buffers     cached
Mem:       6043644    5928368     115276          0     997724    4300648
-/+ buffers/cache:     629996    5413648
Swap:      3084280          4    3084276

I was just watching the Die Hard 4.0 movie again and I noticed that the computer used by Warlock is a FreeBSD machine running kernel 7.0 and it is running Xorg and the Opera web browser. The names are different; but that is what he is running. Apparently he is a big UNIX fan. I doubt though that is would be that easy to crack into the FBI servers and patch a phone call through to a certain FBI agent to alert them of the location of the terrorists as shown in the movie. The IP address shown is; this does not seem to be a valid Internet IP address; this is more of an internal network LAN address instead. The computer Matthew Farrel is using appears to have 12 processors; this is some super-fast multi CPU machine that is running a custom FreeBSD build. FreeBSD is very good for running on a server machine like the one that Matthew Farrel is using; I would not mind running a 12 processor computer; that would be very fast indeed. For ripping DVD movies to the hard disk and crunching complex numbers it would be very powerful indeed. The part of the movie where Bruce Willis is driving the truck and he gets shot up by the F25 with the 25mm cannons is pretty unrealistic; driving the truck up the incline whilst being shot at is a bit much. The IT parts are slightly more realistic but not as much as the NMAP and SSH scenes in the Matrix Reloaded.

At least that movie was using real tools. The movies these days are getting more and more into the technological side of things but they are not always getting the information technology aspects right. Apparently the same sort of cyber-terrorism trope is in the new Skyfall film; but I have not seen that one yet and I can not make a judgment on it. In the original Wargames movie; Matthew Broderick is using a 300 baud acoustic coupler to connect his computer to the phone lines to dial into the server machine to play the Wargames program. That is really how the acoustic coupler works. A dial-up modem from the 1990s works the same way; it modulates and demodulates the computer data to send it over the telephone lines. But even a 33.6 kilobits per second modem is far faster than a 300 baud acoustic coupler would be these days. A modern ADSL connection that can give you about 10 megabits per second is the way to go; you can download and stream content far faster than with a 56 kilobits per second modem. Typically that would actually be 48 kilobits per second. I have used a dial up modem back in the day and it was not a bad connection to use for updating your Geocities page and checking your Yahoo E-Mail,you would not want to use such a slow connection these days. But surely no-one would be using a 300 baud connection in these times of bloated web 2.0 pages and massive advertising banners.

Matthew Farrel`s FreeBSD machine.
Matthew Farrel`s FreeBSD machine.

You used to be able to download weather photographs by connecting your shortwave receiver set to your computer and tuning into a certain frequency; then you could access data that was transmitted as radio waves and retrieve weather photographs that way. But these days you can access high resolution photographs of weather conditions by using your mobile phone. How times have changed. technology is marching ahead at an accelerated rate. The technological progress we are seeing is a small indication of what we will see in the future. Will we eventually create a computer that is so powerful it can think and imagine just like a human can? Only time will tell. That would require a lot of computing power and a massive amount of memory. But in the far future we could create AI that could rival a human being. Ideally it would be good to build a computer that could design and build future versions of itself negating the need for humans to design the microprocessors and intricate connections between the many components. But would an intelligent AI really need humans or would it try and take over the world? Perhaps if it was made to understand that it was a valued member of society with the ability to solve many of humanity’s problems. One thing that we do need though is a clean energy source that can provide electricity cheaper than the current fossil fuels do.

No comments have been made. Use this form to start the conversation :)

Leave a Reply