Buildroot :: Problem in Installing Grub for i386

Philippe Ney philippe.ney at pardes.ws
Tue Mar 21 08:02:42 UTC 2006


On Mon, 20 Mar 2006 20:22:11 +0530
"conn itnel" <connintel1 at gmail.com> wrote:

> Thank you very much.
> 
> I am building the environment for the target system which is i386 arch. I
> have successfully created the rootfs for that. I also able to chroot to the
> rootfs. But i dont find the grub command in that. So what i need to do for
> that.

You have to had it in target/x86/grub/grub.mk
That mean having something like that :

[...]

grub-target_binary: $(GRUB_DIR)/$(GRUB_BINARY)
        $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GRUB_DIR) install

grub-target_files:
        # Copy the necessary file in /boot/grub
        mkdir -p $(TARGET_DIR)/boot/grub
        cp -f $(GRUB_DIR)/stage1/stage1 $(TARGET_DIR)/boot/grub
        cp -f $(GRUB_DIR)/stage2/stage2 $(TARGET_DIR)/boot/grub
        cp -f $(GRUB_DIR)/stage2/e2fs_stage1_5 $(TARGET_DIR)/boot/grub
        cp -f target/x86/grub/menu.lst $(TARGET_DIR)/boot/grub
        (cd $(TARGET_DIR)/boot/grub; ln -sf menu.lst grub.conf;)

grub: grub-target_binary grub-target_files

[...]

Philippe


> Thank You.
> Have a Nice time and good day ahead...
> 
> Ankur.
> 
> On 3/20/06, Philippe Ney <philippe.ney at pardes.ws> wrote:
> >
> > > Thank you for your reply.
> > >
> > > But how to do chroot. When i use chroot buildroot/build_i386/root it
> > gives
> > > me following error.
> > >
> > > "debian:/home/winner# chroot /home/source/buildroot/build _i386/root
> > > chroot: cannot run command `/bin/bash': No such file or directory "
> > >
> > > Now what i Need to do to solve the above problem ???
> > >
> > > Thank You.
> > >
> > > Have a Nice time and good day ahead..
> > >
> > > Ankur.
> >
> > Ummh... with the information you give, I would say...
> >
> > First, read the error message, then :
> >
> > # cd /home/source/buildroot/build _i386/root/bin
> > # ln -s ash bash
> >
> > or
> >
> > # chroot /home/source/buildroot/build _i386/root /bin/ash
> >
> >
> > Philippe
> >
> >
> > > On 3/18/06, Bernhard Fischer <rep.nop at aon.at> wrote:
> > > >
> > > > On Sat, Mar 18, 2006 at 07:43:17PM +0530, conn itnel wrote:
> > > > >Hello friends,
> > > > >
> > > > >
> > > > >   I am using Buildroot and have enable the Grub package in "make
> > > > menuconfig
> > > > >". And then "Make" which works out smoothly. But in the
> > build_1386/root/
> > > > >directory. i didnot find any grub utilities.
> > > > >
> > > > >But there is grub directory in buildroot/build_i386/grub-0.97/ . So
> > Now
> > > > to
> > > > >install grub in root/ what steps I need to follow ?
> > > > >
> > > > >Thank You in Advance.
> > > >
> > > > As already stated in IRC, cp
> > > > stage{1/stage1,2/{stage2,e2fs_stage1_5}} grub/grub to/your/rootfs,
> > > > then either cd or chroot into your rootfs
> > > > and install grub onto your block-device. This last step is widely
> > > > documented (see README and INSTALL as well as docs/* in your
> > > > grub-sourcedir or look it up on the web).
> > > >
> > > > That said, you do something like
> > > > grub
> > > > device /dev/loop0 (hd0) # optional!
> > > > root (hd0,0) # or wherever your boot/grub resides
> > > > setup (hd0)
> > > > quit
> > > >
> > > > or variations thereof.
> > > > >
> > > > >Have a Nice time and good day ahead.
> > > > >
> > > > >Regards,
> > > > >Ankur.
> > > >
> > >
> > _______________________________________________
> > uClibc mailing list
> > uClibc at uclibc.org
> > http://busybox.net/cgi-bin/mailman/listinfo/uclibc
> >
> 



More information about the uClibc mailing list