On 4/6/07, Lauri Kasanen <[EMAIL PROTECTED]> 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 2.6.20.4 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? > > > > Tijnema > > How about mounting by the label? Then the device wouldn't matter... Never heard of mounting by label.... Site? > Do you have both ram disk & initrd support in your kernel? Yes Is the ram disk size big enough to hold your initrd uncompressed? My initrd is uncompressed 350K, and in my kernel config i find these lines: CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 So, does this mean the RAM disk is 4096 bytes, or 4096 Kilobytes? If it's the first, it doesn't fit :) Does it matter if i set that to 524288?
> > 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) > > Lauri What i've wanted to do inside my initrd was chrooting, so you mean i should use RAM disk instead? Can i use compression on a RAM disk? I mean i want to push as much as i can on those damn small floppys :) I'm interested in every solution that does the thing :) Tijnema ps. I don't know if it is a big problem, but i have no device nodes in /dev, except /dev/console. I tried to copy them from my system, but i can't because they act like very big files..., and so i get a error msg that there's no space left on the device. So, do i need to force udev or something to create devices in /mnt/initrd/dev? > > -- > _______________________________________________ > Surf the Web in a faster, safer and easier way: > Download Opera 9 at http://www.opera.com > > Powered by Outblaze > -- > http://linuxfromscratch.org/mailman/listinfo/blfs-support > FAQ: http://www.linuxfromscratch.org/blfs/faq.html > Unsubscribe: See the above information page > -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
