Building LFS/BLFS on USB.

Tijnema ! tijnema at
Thu Apr 5 09:46:44 PDT 2007

On 4/5/07, Lauri Kasanen <curaga at> wrote:
> > Hi,
> > I want to build a LFS/BLFS system on a USB pendrive. I have a 1GB
> > pendrive, from which i want to boot through Floppy drive. What i have
> > now is a LFS system installed on the USB stick. I created a very small
> > kernel that is about 990K, so that it fits on my floppy :) It has USB
> > storage drivers and ext2 drivers built in. I installed syslinux on my
> > floppy, and it does boot the floppy, then i tell syslinux to boot the
> > small kernel, and load an initrd file. I created this myself so i'm
> > not sure if i did it right.
> > This is the part of my syslinux.cfg file:
> >
> > KERNEL kern26
> > APPEND initrd=initrd.gz root=/dev/ram0 init=/etc/start
> >
> > First I didn't had the root=/dev/ram0 item, but it doesn't make any
> > difference. It also doesn't make any sense if i replace it with
> > root=/dev/rd/0 as some sites suggest. After the kernel loads, and the
> > initrd.gz is uncompressed. It gives me the error:
> >
> > No filesystem could mount root, tried:
> > Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
> >
> > So what did i do wrong? It should mount the initrd file and start
> > /etc/start script in the initrd file right? There i've written a
> > script to mount USB and do the work there. But it seems that the
> > /etc/start script is never executed because it doesn't mount the
> > initrd file?
> > What me confuses is that it didn't try to mount any filesystem, as
> > there isn't anything after the tried:
> >
> > Any ideas?
> >
> > Tijnema
> >
> > ps. Using the kernel from LFS SVN.
> Is the usb stick vfat? If it is, add the driver...

Nope, it's ext2, and that's compiled directly into the kernel.

> I think you could just drop the initrd and boot straight to usb; like
> APPEND root=/dev/sda1

I thought about that, but it seems that USB devives are not always
mounted at /dev/sda1. Somehow i even needed to mount /dev/sda to get
the first(and only) partition on my USB stick. That's why i've written
a script and would like to execute that and do the mount part myself

> I can't help more than that, never used syslinux or initrd..
> Though I did create a 2-floppy system for building LFS with the livecd, but that's another story.. Anyway it runs solely in ram but using a normal ram disk instead of initrd...
> Lauri

What's the difference between normal ram disk and initrd? Can i use
that on my floppy system too?


More information about the blfs-support mailing list