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!