Thanks for all responses. I now have the compactflash working. I have not used LABEL options yet. I found I had missed a few other configuration steps in my kernel and buildroot configuration.
- I had to enable a bunch of ATA and IDE device drivers in buildroot kernel configuration and recompile the kernel. I booted it over tftp/nfs-root and verified that the compactflash is accessible as /dev/hda1 - Second, buildroot configuration should enable grub (under Target Options). - Third. Check grub.mk file in your buildroot/package/grub directory. The file I had was using grub version 0.97 and was applying a patch. It took some experimentation to find that the patch does not work. Standard distribution of grub 0.97 works well. Here are the first few lines of the correct grub.mk file. GRUB_SOURCE:=grub-0.97.tar.gz GRUB_SITE=ftp://alpha.gnu.org/gnu/grub GRUB_CAT:=$(ZCAT) GRUB_DIR:=$(BUILD_DIR)/grub-0.97 GRUB_BINARY:=grub/grub GRUB_TARGET_BINARY:=sbin/grub GRUB_SPLASHIMAGE=$(TOPDIR)/target/x86/grub/splash.xpm.gz - On my laptop that has Opensuse 10.2, grub-install script exists, but it is not the original. It can't be used for programming grub on your compactflash. It does not use the command-line parameter "--root-directory". I think standard grub binary would have worked, but I didn't use it. - Preparing the compact flash: 1. The compactflash is plugged into the flash-reader and is accessible from Opensuse as /dev/sdc1 - If there is a file system, Opensuse may mount it in /media/disk. Unmount it. 2. fdisk /dev/sdc1 - delete the existing partition and create a new one with partition id 0x83 save the partition. Just create one partition with the default parameters for start and end cylinders. - mke2fs /dev/sdc1 - create a ext2 file system on that partition. - tune2fs -c -1 /dev/sdc1 - optional. To disable unnecessary sanity checks of the file system I guess.. 3. unplug and plug the compactflash. The device is now available in /media/disk (if not mount it explicitly). Copy all files from /nfs/* to /media/disk - Modify /media/disk/etc/fstab and /nfs/etc/fstab so that the root file system is from the flash. change from: /dev/root / ext2 rw,noauto 0 1 to: /dev/hda1 / ext2 noatime 1 1 - unmount the flash. 4. Place the compactflash on the board, but boot from TFTP/NFS. 5. Once the board boots the kernel, you can run the binary /sbin/grub on the board. - Only two commands are needed in grub. There is no need for /boot/grub/device.map file for this board . root (hd0,0) setup (hd0) quit 6. Create /boot/grub/menu.lst file. It should be like: # cat menu.lst default 0 timeout 5 serial --unit=0 --speed=19200 terminal serial title whatever root (hd0,0) kernel /boot/bzImage root=/dev/hda1 console=ttyS0,19200n81 7. Reboot the board.. now the kernel loads from flash. The root file system is in read-only mode. - ardenfort On Dec 26, 2007 12:50 PM, william estrada <[EMAIL PROTECTED]> wrote: > Ardenfort, > > Without going in to detail, I would: > 1) copy the NFS file system to your CF. > 2) Update /etc/fstab to reflect the new disk layout. > 3) Install Grub on the CF. > 4) Update /boot/grub/grub.conf or /boot/grub/menu.lst, grub will > use which ever it finds. > 5) Try booting on your laptop as a test. You may need to get into > Grub command mode to adjust the kernel options. > 6) Install it on you Soekris and boot it. > > I would use the LABEL options for fstab and grub.conf. It is more flexible > that /dev/hda1 or /dev/sdax. If you do this you will need to change the label > on you CF using e2label. > > Hope that helps? Good luck. > > -- > William Estrada > [EMAIL PROTECTED] > Mt-Umunhum-Wireless.net ( http://Mt-Umunhum-Wireless.net ) > Ymessenger: MrUmunhum > > > Message: 6 > > Date: Tue, 25 Dec 2007 18:51:11 -0800 > > From: "Floating Integer" <[EMAIL PROTECTED]> > > Subject: [Soekris] very basic questions on booting from compactflash > > To: [email protected] > > Message-ID: > > <[EMAIL PROTECTED]> > > Content-Type: text/plain; charset="iso-8859-1" > > > > > I now have a Soekris 4521 board running Linux and some utilities on it. I > > did all of my initial application development using NFS as it was a simple > > thing to do. On my laptop, /nfs directory now contains all the files and > > directories that the board needs. > > > > I used buildroot. It created a file system in tar. I untar it into /nfs. I > > customize the files under /nfs. The board performs a PXE boot, downloads > > kernel from /tftpboot of the laptop. The pxelinux.cfg/default directory > > tells the board to look for the root file system under /nfs. > > > > The total size of all files and directories in /nfs is ("du -s /nfs") about > > 128MB. The compactflash has 1GB. The board has 64MB of RAM. When the kernel > > has loaded and other modules have loaded, about 9MB of the main memory is in > > use. So far so good. > > > > I have one issue that is still not resolved. How do create a bootable > > compact-flash with what is available on /nfs? What are the steps? I am > > missing some fundamentals of the boot process here. It seems like I should > > create a ramdisk image of a subnet of files from /nfs and place the ramdisk > > image in /nfs/boot directory. Should the ramdisk-image be created for 64MB > > of RAM that the board has? > > > > On my laptop, /nfs/boot/ - this contains the kernel "bzImage" and also > > "grub" the kernel-loader. Buildroot didn't create menu.lst by default. > > /dev/ram exists. What would be a common menu.lst file if the system boots > > from flash? > > > > Any pointers (books, website anything) will be greatly appreciated. > > > > thanks, > > ardenfort > > > _______________________________________________ Soekris-tech mailing list [email protected] http://lists.soekris.com/mailman/listinfo/soekris-tech
