The original charm of Linux brings old machines back to life

Source: Internet
Author: User
Article Title: The original charm of Linux brings old machines back to life. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
People say that Linux makes old machines useful. Is this true? In this new series, Peter Seebach uses an obsolete laptop and builds a household appliance that can really do something meaningful with a budget of $50 per month.
  
When people talk about Linux on old hardware, they usually refer to hardware that has been in use for a year or two, and those materials are still very practical. The hardware discussed in this article is well-maintained, reasonably maintained, and has a very good specification-maybe it is even an old server. However, for this article, we will focus on machines with lower configurations.
  
   Challenge 1
  
On the left side of the stage, there is an old gateway box (I absolutely do not mean disrespectful to the gateway ). In October 1997, I spent nearly $3000 to buy a laptop with the current top-level configuration. It has a Pentium 133 processor, 32 MB high-speed SDRAM, and 800x600 tft LCD display, it also has a memory of 1.15 MB, which is enough for the display of 800x600 resolution 16-bit colors.
  
I still remember that this machine was daunting because I used a 33 Mhz 68030 machine. But that was eight years ago. A few years ago, a cup of wine poured onto it. Low-cost art film fans in 1980s will understand this situation: it will no longer recover consciousness, and all it needs is repair.
  
Unfortunately, the cartana slot will never be restored and errors are often reported. A few years ago, it suffered another El-Al Porter, which broke its screen and was no longer usable. Its only advantage is that it has an additional 64 MB memory, which was installed the year before it was poured into the wine.
  
According to the current standards, this machine is a toy. You can purchase embedded systems from companies such as Alibaba logic, which have better basic specifications and other features such as built-in Ethernet. It is not even complete.
  
Therefore, the challenge here is to prove that the machine can still be used. In this article, I will build it as a practical household appliance.
  
Good! The challenge is rule-based, and the rule is simple-I pay no more than $50 for each project. Since it takes 60 projects to reach the initial value of the machine, I will consider using "free" hardware (at least four years of use and unused hardware ). Otherwise, you must consider the overhead. By the way, the download is free.
  
   Install hardware
  
Obviously, the 2 GB disk attached to the machine may be a little small. Fortunately, I had an idle 6 GB disk, which was originally in PowerBook G3 in 2000 -- it was four years ago, so it complies with the rules. Installing that device is not difficult at all, although I did the wrong thing for the first time; the drive must set the jumper to a slave disk (I have no idea about this ).
  
After the problem was solved, I had a 6 GB disk machine. The last formatting of the disk was done on Mac around 2001, therefore, it is obviously unable to guide.
  
I have an LCD display purchased in 2001. It is a little too new and should not be used (according to rules), But I Can "borrow" it during installation. The monitor is useful during installation, but I plan to stop using it after the system is established and runs.
  
The machine has a BIOS setting for deciding whether to use an external display, an internal display, or both. To my surprise, an external monitor is called a "CRT", even if it is not a CRT.
  
After connecting the display and the new disk drive, the machine can boot. A problem occurs at startup-The drive sounds loud, so it may fail. But don't forget, it's free. And it may run for several months.
  
What we need now is an operating system.
  
Download Linux remember that the free download can be considered as unnecessary. I originally planned to use my SUSE Linux installation CD in this project, but I encountered two problems. The first problem is that the system requires 128 MB of memory. The second problem is that I only have a DVD, and it takes me to buy a new optical drive.
  
I decided to adopt a cheap method: download. After consulting, I was advised to use a small, lightweight release (distro) named Slackware ).
  
Slackware's Web presence recommends that people use 16 MB or less memory. That's great for me. I downloaded BitTorrent (a tool that supports "cooperative distribution" to reduce bandwidth overhead for more popular downloads) and started downloading the CD version of Slackware 10.0.
  
The next morning, I burned some CD. (Actually four of them. When I got them not long ago, empty CDs cost money, so I said they cost $0.50 each .) Then I found that Slackware 10.1 was just released.
  
I downloaded the 10.1 CD. An Important Note: When downloading is completed, do not close BitTorrent immediately. The main point of the collaboration network is to contribute something to the community. At least out of courtesy, you should keep it running until the number of uploaded data is at least the same as the number of downloaded data.
  
   Run and install
  
When the first Slackware disc was available, I immediately made a copy and started to install it. This time I only burned two CDs, excluding the source code CD. Another budget is provided in another day.
  
Boot the installer and find a disk drive in/dev/hdb. At this time, I found that my drive is set to a slave disk. After a few minutes of busy working with screwdrivers and small pliers, my work began to get on track.
  
The Slackware installer is very lightweight. It is not a graphical installer; it does not use frame cache drives or X or anything else. Before running the installer, it tells you to partition the hard disk and then gives a logon prompt.
  
There is no prompt about selecting too many partitions; this is inconvenient. As an old BSD user, I like to separate the root file system from/usr. I will also create separate partitions for/var and/home, and divide a swap partition.
  
The number I guessed proved reasonable; the root is about 128 MB (there is enough extra space for testing the kernel), the swap partition is 256 MB,/var is up to 1 GB, /usr 2 GB, and the remaining space is allocated to/home.
  
Slackware divides files by top level very easily. I removed all X-based parts, including GNOME and KDE, and installed all other parts. This machine is not suitable for use as a graphics workstation, so it can occupy a lot of space.
  
   Exceptions during installation
  
Using the installer does not completely solve the problem. When I have formatted the disk and started the installation, the information is that LILO is not running and I need to fix it before the reboot. The installer provides a shell command prompt when I process the target disk mounted to/mnt. When browsing/etc/lilo. conf, the problem is found:
  
Listing 1. Aha! Culprit
  
Boot = (IN
[...]
Root = (IN
  
I don't know what this is. I changed it to a value that may take effect:
  
Listing 2. Useful legacy parameter values
  
Boot =/dev/hda
[...]
Root =/dev/hda1
  
Re-run LILO without any errors, so I restarted. If so, the machine starts up completely normally.
  
That is why the installation fails.
  
   Browse
  
Now that the system has been installed, I can verify the speculation about the partition size.
  
Listing 3. A good guess
    
Not too bad. If I want to install many other software, the space in/usr may be insufficient. Of course, there is not enough space to install all resources. Fortunately, the Web page root (/var/www/htdocs) has enough space, and if I really need to load some other content, I can move some files to/home and create symbolic links.
  
View/usr to find some details. Here, du-m will be helpful. Unfortunately, except for the word "HUMAN", which indicates the use of readable numbers, this version of du cannot recognize other values in $ BLOCKSIZE. In addition, you can set it to 1 M, then, use 1 MB block for df and du. Run sort-n on the output of du to obtain the list of top-level directories sorted by size in/usr:
  
Listing 4. Ah: directories sorted in an ascending order
  
In short, some of the biggest things to install are TeX software and support files, kernel source code, and Java Runtime Environment. On a machine with a small amount of memory, Java may be meaningless. Therefore, if my space is insufficient, I prefer to delete it. Kernel source code may waste a lot of space, and TeX may also be something I can delete. So if I need a few hundred megabytes of space, I can get it. I'm glad to know that while having enough space, all the things I want have been installed.
  
   What do we do now?
  
The first thing is to get an Ethernet port. Unfortunately, an inexplicable error occurred while connecting my aging USB cable with an Ethernet port, so I decided to use the inexpensive Targus USB "dock" (obtained a week or two ago) for testing.
  
It provides PS/2 keyboard and mouse ports (not used for me), another serial port, another parallel port, and two other USB ports ...... And a 10 Mbps Ethernet port.
  
You might think 10/100 would be better (that's probably because the sales price for this small device dropped from $70 a year or two years ago to $29.99), but on a USB 1.1 machine, 100 Mbps support is meaningless.
  
My hub automatically detects the port and does not need to be managed by me. The 2 Mbps USB bandwidth I have not used can be used to run the device later.
  
The device is automatically detected. It is strange that dhclient cannot act on that interface. It says it cannot find the broadcast interface. Manual interface configuration and manual resolv. conf solve this problem.
  
I was a little surprised: the syntax I used, route add default gateway, triggered a very inexplicable error message, SIOCADDRT: No such device. I quickly reviewed the manual and corrected my spelling-route add default gw gateway.
  
After that, the machine can work normally on the network. In the LAN, it is accessible and can use my broadband connection to access the world outside. I can also ssh in.
  
No Logon Allowed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.