Building LFS/BLFS on USB.
curaga at operamail.com
Fri Apr 6 00:23:47 PDT 2007
> > > 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 188.8.131.52 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?
How about mounting by the label? Then the device wouldn't matter...
Do you have both ram disk & initrd support in your kernel? Is the ram disk size big enough to hold your initrd uncompressed?
Just more questions.. But maybe these will help..
The difference is, well that an initrd is loaded by the bootloader, and meant to be switched to some other root, and root on ram disk is loaded by the kernel, and it stays as root (though in it pivot_root or chroot can be used)
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com
Powered by Outblaze
More information about the blfs-support