Tuesday, March 8, 2011

Partitioning the boot partition.

After having completed my Micro Core Linux installation I got an annoying error message when I rebooted. Basically the computer immediately told me that it didn't find any hard drive. Let me walk you though the steps of my partitioning process so that you might save some time troubleshooting this issue.


Partitioning.

If you read the official installation guide for Tiny Core Linux it says to use:
root@box:~# fdisk -l
to get the name of the partition you want to install to. In most cases this will be sda or hda, but if you're installing to a USB pen or a SD-card it will be something else.


After that you it says to use:
root@box:~# cfdisk /dev/hda
to get to the ncurses interface where you do the actual partitioning. The guide explains quite nicely with pictures how to complete these steps. Note however that you don't need cfdisk to set up your partition table. You can do all of that with fdisk, but cfdisk helps you visualise what you're doing.


Getting a working bootflag on your boot partition.

This is the part where the manual tells you to do it in cfdisk, but my computer disagreed completely with that assessment.A Google search of my error message revealed that parted does a better job at this particular task.


Time to download parted. You have to be a regular user to do this, so unless you 've already downloaded parted this would be a good time to do so. To log out of root and download type:
root@box:~# exit
tc@box:~$ tce-load -iw parted.tcz
Before moving on to the part where you write the ext3 filesystem to the disks, you should type the following to add a bootflag to your partition:
tc@box:~$ sudo su
root@box:~# parted /dev/hda1 set 1 boot on
Replace hda1 with whatever partition you want to boot from. Now we move on to writing the filesystem and rebuilding fstab.
root@box:~# mkfs.ext3 /dev/hda1
At this point I like to check that everything is okay by typing:
root@box:~# fdisk -l
That should tell you all the information you need about your new disk setup, and if everything is okay you are ready to move on to the actual installation. Congratulations!

Sunday, March 6, 2011

Downloading packages from CLI.

I started setting up Micro Core in VirtualBox yesterday. Initially I was a bit sceptical as to whether or not my Eee 1001HA would be able to handle running VirtualBox, but it's actually been running rather smoothly. That introduction aside; installing Micro Core is always a bit challenging. I read up on the installation guide on the Tiny Core website plus the "Adding a Desktop to Micro Core" tutorial in the wiki. As usual things didn't go as smooth as lined out, but I learnt a lot from the experience. Basically I've installed and reinstalled it four times since then and I'm still having some issues. I'm certain I'll work it out in the end so for now let's go through the good stuff I've learnt these past 24 hours.

Getting and installing packages.

I initially thought I had to install the command line version of the Appbrowser to get the tools I needed to prepare the install. This is how I used to download and install it:
tc@box:~$ wget -c http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/appbrowser-cli.tgz
tc@box:~$ wget -c http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/appbrowser-cli.tgz.md5sum.txt
tc@box:~$ md5sum -c appbrowser-cli.tgz
tc@box:~$ tce-load -w -i appbrowser-cli.tgz
Tedious, isn't it? I did all of that before I even started doing anything else. In addition I did it with the wrong keymap for my keyboard. After I followed the steps I lined out above I'd launch the ncurses interface in order to install the stuff I really wanted by typing:
tc@box:~$ appbrowser-cli
In short, the whole process was long-winded and tiresome, so I'm happy that I've discovered a better way of doing it. You don't need 'appbrowser-cli' at all. Why not you ask? Because the 'tce-load -iw' command takes care of all that annoying stuff for you. What tce-load does is finding the location of you package you requested, downloads it, handles the dependencies for it and then installs the whole bunch. Basically it's Tiny/Micro Core's version of 'apt-get install' and I've fallen in love with it. Here's an example of how to use it:
tc@box:~$ sudo tce-load -iw cfdisk.tgz
VoilĂ , now grub splash is installed on your system. Note that you're not allowed to use tce-load in the root shell so you have to be logged in as a regular user and sudo it. As for the appbrowser-cli itself you don't have to use the ncurses interface. There's another more frugal interface to it; namely the 'ab' command.
tc@box:~$ sudo ab grub-0.97-splash.tcz
After typing that you get presented with a interactive screen where you have to select the package you want before confirming that you want to download it.

In summary, we've now covered four ways of downloading packages. 'tce-load -iw' is my favorite.

Welcome.

From time to time I like to play around with GNU/Linux and other *nix based operating systems. One of my favourites is Mac OSX (based on freeBSD); another one is Micro Core Linux. Even though I think Ubuntu is very nice as well it's always been a hassle for me to set it up properly. To me, Ubuntu is too complicated despite the fact that I've installed it quite a few times on different computers. I used to love Slackware a lot but there's so many options when installing it that it's a bit overwhelming. At least to a newbie like me.

What is Micro Core Linux?

Micro Core Linux is basically a stripped down version of Tiny Core Linux. It's blazingly fast, frugal and simple, but in no way easy to get started with. Documentation is sparse compared to other distros, and to me that's it's main drawback. I still love it though, because it always makes me feel like I've got my hands under the hood of the operating system. My reason for starting this blog is because whenever I install it on one of my netbooks I have a hard time finding the documentation I need. The forum is great, but I don't want to run over there and post every-time I have a problem; - which, let's face it, it quite often.

My hope is that this blog will be useful to someone else who want's to play around with Micro Core Linux. The things I discuss here will be useful to users of Tiny Core as well so long they are not scared of the command line.

You can download both of them from the Tiny Core Linux download page.