Posts Tagged Linux

Up for a Challenge?

For those who don’t already know, I’m a big fan of Linux. I’ve got some variation of it on practically every computer I own. Something I have only done with moderate success, though, is build my own system from scratch. I just saw today, where Linux from Scratch has just released LFS-6.6-rc1. Personally, if it’s your first time through, I would recommend going with their stable release, instead. The biggest issue is that you have to have a good solid Linux distribution to build from in the first place. Either Debian or Ubuntu will work quite well for this, or you can download the live CD from Linux from Scratch to use that as your base. (A small note about the LFS Live CD: The current stable release is 6.5, but the live CD is only at version 6.3. It will still meet the requirements to build 6.5, or you can build 6.3 directly from the CD, but due to security issues that have come to light since then, I wouldn’t recommend it.)

You may be wondering exactly what the point of building your own Linux system from source is. Well, for me, the point was to learn more about the functionality of Linux. While a good deal of the commands you use are spelled out for you, they are also explained to some degree. This is not, however, a task for beginners. You do need some rudimentary knowledge of Linux and compiling programs. There are some excellent resources mentioned on the site and in the distribution instructions to help you with this.

A small word of advice if you do decide to take on this challenge: Make sure you have a relatively fast system. While you can build this on relatively old hardware, there are components that may take the better part of a day, if not longer to complete, if your system is fairly slow. My first attempt was on a 300 MHz machine with only 384 MB RAM, and compiling some of the beefier tools needed to actually perform the build took over 24 hours to complete. Admittedly, when I tried again on my 1.7 GHz machine, things did go much faster, it would have been better if I would have had more than 768 MB RAM. Ideally, a system for this project should have at least a 2 GHz processor and at least 1.5 GB RAM. Hard drive space, ironically, isn’t quite as important. A 40 GB drive properly partitioned should be more than adequate if your intended use is primarily a desktop or laptop workstation.

,

No Comments

Windows 7 and Linux Can Coexist.

Until I got my laptop last year, I had been using Linux almost exclusively for almost two years. The main reason was that I was too cheap to buy a legitimate copy of Windows XP or Vista. When I got my new laptop, however, it came preloaded with Windows Vista. Admittedly, I didn’t exactly love it, but I didn’t find it to be quite so unappealing as many other’s did. Nevertheless, I quickly repartitioned the hard-drive and dual-booted my system with my favorite flavor of Linux at the time. All was wonderful.

Despite the fact that things seemed to be working rather well, I had come to the realization that my computer was a 64-bit system, and the versions of Vista and Linux I had been running were only 32-bit, so I decided to do some upgrading. I got the 64-bit version of Windows 7, and switched to the 64-bit distribution of Ubuntu. Unfortunately, after installing both in the traditional fashion, allowing GRUB to manage the boot process, Windows 7 decided that something was wrong and kept uninstalling all my programs—even Microsoft Office 2007. It turns out that Windows 7 would not accept anything in the MBR except the Windows Boot Loader. This made dual-booting with Linux a little tricky, but not impossible. I will now provide you with the steps I had to use to get Windows 7 and Linux to coexist peaceably. Using the following configuration, you can successfully have Windows 7 and Linux on the same machine, and Windows 7 will remain content and not think that something is wrong, because Windows Boot Loader will still be in control. Whether or not everyone out there has this problem, I don’t know, but I do know that I am not the only one to have experienced it.

**NOTE** This is written under the assumption that Windows 7 is already installed to a primary partition, and that unpartitioned space has been allotted on the hard-drive for the Linux installation.

Step 1: Make sure you have a separate boot partition for your Linux install. Typically, when I set up a normal Linux desktop install, I use 3 partitions. One 50 – 100 MB ext3 partition for /boot, another partition equal to the amount of system RAM for the swap partition, and a final ext3 partition for the root (/) directory. These are naturally in addition to the NTFS partition for Windows. This is the type of setup I would recommend. Naturally, your exact partition structure should be customized to meet your specific needs, but for dual-booting a desktop/laptop system, this will accomplish the installation with the use of four primary partitions, and provide you with the separate boot partition.

Step 2: Install your Linux distribution as usual, until it asks about configuring GRUB. For the most part, this is a by-the-book installation for Linux. Use all the typical settings and preferences that you would normally use for your system, except for where you install GRUB. I’ll talk about that next.

Step 3: Install GRUB to the /boot partition. Assuming you’ve followed my advice, and created all your partitions as primary partitions, most likely, your NTFS partition is /dev/sda1, /boot is /dev/sda2, the swap partition is /dev/sda3, and the root (/) partition is /dev/sda4. (It is possible that it might be /dev/hda instead of /dev/sda.) The default location for GRUB to install is to the master boot record (MBR) of the disk on which you are installing Linux. This is most likely going to be identified as /dev/sda0 (or possibly /dev/hda0). Change this to /dev/sda2 (or to whichever partition you have assigned /boot). This will install GRUB without overwriting the MBR. Once Linux is done installing, you’ll need to reboot into Windows 7 and make some changes.

Step 4: Change the Windows Boot Loader to offer your Linux install as an option. After your system reboots, it will load straight into Windows 7. While it is possible to edit the Windows Boot Loader manually using bcdedit from the command line, the better thing to do is download EasyBCD from NeoSmart.net. This handy-dandy little tool will give you a GUI to edit the Windows Boot Loader, which is far easier. Simply install the program, start it up, select Add/Remove Entries, pick the Linux tab on the bottom, choose GRUB and the appropriate partition, type in the name of your distro, and click Add. Once back on the first screen, click the Change Settings button. Then adjust the bootloader timeout length and the default OS option if desired. Once you apply your changes, you can reboot.

You should now see your newly added Linux entry on the Windows Boot Loader. Select that option and hit the enter key. This should take you to the GRUB menu. Now press enter to load Linux. Once you have loaded into Linux, you can make changes to the GRUB menu so that Winows 7 isn’t listed in GRUB, and/or you can remove the timer delay altogether, and have GRUB automatically load the default option once it takes over, though often, there are multiple boot configurations for Linux, so this may not be such a good idea.

, , , , , , , ,

No Comments