Archive

Archive for January, 2007

Linux From Scratch on Ubuntu Part 3 – Step By Step

January 25th, 2007 mike Comments off

Okay so the build in Linux From Scratch on Ubuntu Part 2 was simple enough, now all that’s left is a bootloader and a reboot.

Make sure your LFS environment variable is set and mount the running dev filesystem into your LFS build:

sudo mkdir -pv $LFS/{dev,proc,sys}
sudo mount --bind /dev $LFS/dev
sudo mount -vt devpts devpts $LFS/dev/pts
sudo mount -vt tmpfs shm $LFS/dev/shm
sudo mount -vt proc proc $LFS/proc
sudo mount -vt sysfs sysfs $LFS/sys

Now we’ll chroot into the new system:

sudo chroot "$LFS" /tools/bin/env -i \
    HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login +h

and set a root password:

passwd root

The following COULD overwrite your current bootloader, so you MIGHT WANT TO READ THE LFS BOOK FIRST!

grub
root(hd0,0)
setup (hd0)
quit

Then create your grub.conf:

cat > /boot/grub/menu.lst << "EOF"
# Begin /boot/grub/menu.lst
# By default boot the first menu entry.
default 0
# Allow 30 seconds before booting the default.
timeout 30
# Use prettier colors.
color green/black light-green/black
# The first entry is for LFS.
title LFS 6.2
root (hd0,0)
kernel /boot/lfskernel-2.6.16.27 root=/dev/hda1
EOF

a little standards compliance:

mkdir -v /etc/grub &&
ln -sv /boot/grub/menu.lst /etc/grub

echo 6.2 > /etc/lfs-release

then we’ll reboot:

logout
sudo umount -v $LFS/dev/pts
sudo umount -v $LFS/dev/shm
sudo umount -v $LFS/dev
sudo umount -v $LFS/proc
sudo umount -v $LFS/sys
sudo umount -v $LFS

shutdown -r now

Now, since we created a separate disk for this, simply make the IDE disk the first in the boot order and boot it up. If you did exactly what I did, with the same hardware setup, this should work for you as easily as it did me.

Have fun! Oh and did I mention to READ THE LFS BOOK before you email me questions at mike@imapenguin.com?

In Part 4 we’ll talk about where to go from here.

Categories: How-To, Linux, Programming Tags:

CentOS RPM Dependency Problem

January 25th, 2007 mike Comments off

Here’s an interesting one. This morning I went to upgrade a CentOS 4.3 to 4.4 via yum and got:

Error: Missing Dependency: rpm = 4.3.3-13_nonptl
is needed by package rpm-build
Error: Missing Dependency: rpm = 4.3.3-13_nonptl
is needed by package rpm-devel

doing

rpm --erase rpm-build-4.3.3-13_nonptl
rpm --erase rpm-devel-4.3.3-13_nonptl
yum upgrade -y && yum install rpm-build rpm-devel

seemed to clear it up, but I’m not sure how it got that way. Anyway, I figured I publicly post that in case you run into the same issue.

Categories: How-To, Linux Tags:

Linux From Scratch on Ubuntu Part 2 – Step By Step

January 18th, 2007 mike Comments off

This is Part 2 of a 4 part series. Part 1 is here.

It’s important to note that I’m an advanced Linux geek and I DID READ THE ENTIRE LFS BOOK FROM COVER TO COVER.

That being said, I decided to start with the excellent jhalfs tool which is part of Automated Linux from Scratch to automate my first LFS build.

The spoiler is that I didn’t have much trouble and things went off without any issues.

Since most people are really impatient and don’t want to actually read the book

SHAME ON YOU!

But none the less, here’s a quick overview of what I did:

Installed Ubuntu 6.10 Server in a VMWare VM (you could use any VM software, I just happen to have several available VMWare servers in a build farm) with default options, no additional software on SCSI emulated disks. I used SCSI disks in VMWare because I wanted my LFS fstab file with a sane device layout with IDE disks. I intend to install a number of these custom OS’s on an appliance platform that come prebuilt with IDE hard drives.

I added a single IDE hard drive after the Ubuntu install. I used fdisk to partition the drive with 2 primary partitions, one for the filesystem and one for swap space.

Then it was on to:

export LFS=/mnt/build_dir
sudo mkdir /mnt/build_dir
sudo mke2fs -f /dev/hda1
sudo mount /dev/hda1 /mnt/build_dir
sudo chown -R lfs.lfs /mnt/build_dir
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install openssh-server subversion \
make libncurses5-dev gcc gawk xsltproc bc tidy \
docbook-utils byacc
mkdir ~/src
cd ~/src
wget http://www.linuxfromscratch.org/alfs/downloads\
/jhalfs/stable/jhalfs-2.1.tar.bz2
tar -xjvf jhalfs-2.1.tar.bz2
cd jhalfs-2.1

At this point you can type

make

and you’ll get a nice ncurses based menu to select your options, save the makefile and let it start the build.

If you are REALLY LAZY and want all of the work done for you, I’ve made my config files available online. You could continue with:

wget http://download.imapenguin.com/LFS/md/LFS-build-md-1.0.tgz
tar -xzvf LFS-build-md-1.0.tgz
make

You’ll now get the menuconfig screen, you can just exit, select yes to save your changes and get a cup of tea while it builds for you.

I’ll be happy to help you with any issues at mike@imapenguin.com ONLY IF YOU HAVE ACTUALLY READ THE LFS BOOK! You have to at least make the effort to get free help.

In Part 3, we’ll install the bootloader, do some housecleaning and talk about where to go next.

Categories: How-To, Linux, Programming Tags:

Linux From Scratch Day 1

January 16th, 2007 mike Comments off

lfs-logo.pngWell, I’m off to build a LFS distribution. For the record, I’m doing a released version, not the SVN version, so 6.2 will be my first LFS.

It says “read this entire book”, so day 1 is reading the book :-)

Since I’m very familiar with Linux systems in general and my first install was waayyy back in 1997, I’m pretty hopeful about maybe even understanding most of this from the start.

Well get started in part 2.

Categories: How-To, Linux, Programming Tags:

Moving to Linux From Scratch

January 16th, 2007 mike Comments off

We penguins over here are often in need of either very lightweight Linux installations, or installations that just get out of the way.

An example would be a MySQL server in our network. As an organization, what we need are the functions of that SQL machine, and we really don’t care what operating system it runs on. We want to maintain the operating system less.

We’ve been working for about 12 months with rPath’s rBuilder suite to build these custom server “appliances” both for our own use and public consumption.

We’re running into a number of packaging problems with the conary based system and they’ve developed to the point where we spend more time troubleshooting the packaging system’s failed builds than actually building software on top of it.

For the next few weeks, we’re going to try an experiment with Linux From Scratch to see if there is some headway we can make in that direction.

Don’t worry, anything we do with be 100% open source, and yes, we will continue to maintain the Ruby on Rails appliance “rPath” version for the foreseeable future.

Categories: Linux Tags:

No iPhone version 1 for me

January 12th, 2007 mike Comments off

I’m as excited as the next guy about some of the things introduced with the now famous iPhone introduction in the Macworld 2007 keynote. There are two (maybe 2 and 1/2 if you count having to switch to Cingular) reasons I wont have the version that Steve Jobs introduced:

1. No Keyboard

Keyboards are essential to what business users are using their phones for - email.

I have an aging Treo 650 which has BOTH the touch interface and the keyboard. You use your fingers on the Treo to press the virtual keypad on the screen when dialing phone numbers. My accuracy rate for hitting the flat button is probably about 50% in a 10 digit number. So if I dial 703-555-1212 10 times, I’ll get all 10 digits correct half the time. Can you imagine typing emails with that kind of accuracy?

Most Treo/Blackberry/etc users type hundreds of emails a week on their devices. They bought the thing BECAUSE it has a keyboard.

2. No Third Party Apps(See here)

The #1 reason for my Treo over Blackberry choice was the thousands of third party apps for Palm devices. I have 10 which I simply cannot live without.

Apple, can you say TomTom?

As an open source and Apple developer, this to me is just incredulous. What’s the point of having OS X on the thing if I can’t put my OS X apps on it?

The answer: marketing hype.

So close, yet so, so far away.

Categories: Mac, Rants Tags:

MacWorld SF Keynote Spoiler

January 9th, 2007 mike Comments off

Imapenguin has it on good authority that Steve Jobs will announce something new today!!

You heard it here first folks. That’s right. SOMETHING new.

It wont be called SOMETHING, but it will be SOMETHING.

We also know that it will be the most over reviewed and talked about new product of today.

Just remember, Imapenguin brought you this information first folks.

Oi.

Categories: Mac, Rants Tags:

Tech Stuff this week

January 8th, 2007 mike Comments off

caliWe’re watching closely at the announcements from CES and MacWorld this week like the rest of the tech world. Just thought we’d mention that the lovely Cali Lewis and friends at geekbrief.tv are doing several video podcasts a day this week to keep up.

I just watched the latest and she didn’t mention the $129 iRobot Create™ kit yet. My Credit card is coming out for that one…

Categories: Random Cool Stuff Tags:

A present for Dad

January 2nd, 2007 mike Comments off

When I came into my office this morning, I found a present from my son:

IMG_0863.JPG

Yes, that’s a whoopie cushion.

Categories: Random Cool Stuff Tags: