LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 03-16-2013, 05:27 AM   #1
smdaudhilbe
Member
 
Registered: Feb 2013
Posts: 43

Rep: Reputation: Disabled
LFS- grub configuration


Hi friends,

At last I reached chapter 8.4 of LFS 7.3-rc1...Up to this there is no error at all. But as per the book suggestion

"In order for the procedure below to work, you need to jump ahead to BLFS and install xorriso from the libisoburn package."

I got "libisoburn-1.2.6" package and when I tried to configure and install inside Chroot environment I got error

root:/sources/libisoburn-1.2.6# ./configure --prefix=/usr --disable-static &&
> make
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... yes
checking for fseeko... (cached) yes
checking for iconv() in separate -liconv ... no
checking for libiconv in -liconv... no
checking for const qualifier with iconv() ... no
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/*.conf: No such file or directory
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/*.conf: No such file or directory
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for a BSD-compatible install... /usr/bin/install -c
checking target operating system... linux
checking for overridden pkgconfig directory path... no
checking for desired functions in libreadline... yes
checking sys/acl.h usability... no
checking sys/acl.h presence... no
checking for sys/acl.h... no
checking attr/xattr.h usability... no
checking attr/xattr.h presence... no
checking for attr/xattr.h... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compressBound in -lz... yes
checking libjte/libjte.h usability... no
checking libjte/libjte.h presence... no
checking for libjte/libjte.h... no
enabled xorriso external filter programs
disabled xorriso external filter programs under setuid
enabled xorriso command -launch_frontend
disabled xorriso command -launch_frontend under setuid
disabled xorriso write size default 64 KB on DVD and BD
enabled strict symbol encapsulation
checking libburn/libburn.h usability... no
checking libburn/libburn.h presence... no
checking for libburn/libburn.h... no
checking libisofs/libisofs.h usability... no
checking libisofs/libisofs.h presence... no
checking for libisofs/libisofs.h... no
checking for LIBBURN... skipped, no --enable-pkg-check-modules
checking for LIBISOFS... skipped, no --enable-pkg-check-modules
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/doxygen.conf
config.status: creating version.h
config.status: creating libisoburn-1.pc
config.status: executing depfiles commands
depbase=`echo libisoburn/burn_wrap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if /bin/sh ./libtool --silent --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"libisoburn\" -DPACKAGE_TARNAME=\"libisoburn\" -DPACKAGE_VERSION=\"1.2.6\" -DPACKAGE_STRING=\"libisoburn\ 1.2.6\" -DPACKAGE_BUGREPORT=\"http://libburnia-project.org\" -DPACKAGE=\"libisoburn\" -DVERSION=\"1.2.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D_FILE_OFFSET_BITS=64 -DHAVE_FSEEKO=1 -DICONV_CONST= -DHAVE_DLFCN_H=1 -DHAVE_LIBZ=1 -I. -I. -DXorriso_with_readlinE -DXorriso_allow_external_filterS -DXorriso_allow_launch_frontenD -DLibisofs_with_zliB -DDEBUG -g -pedantic -Wall -Wextra -Wno-unused-parameter -g -O2 -MT libisoburn/burn_wrap.lo -MD -MP -MF "$depbase.Tpo" -c -o libisoburn/burn_wrap.lo libisoburn/burn_wrap.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi
libisoburn/burn_wrap.c:36:29: fatal error: libburn/libburn.h: No such file or directory
compilation terminated.
make: *** [libisoburn/burn_wrap.lo] Error 1

but as per the earlier procedure I log out from root account and I tried the same procedure by normal lfs user, unfortunately I got error again


lfs@boss:/media/LinuxFromScratch/sources$ tar -xf libisoburn-1.2.6.tar.gz
lfs@boss:/media/LinuxFromScratch/sources$ cd libisoburn-1.2.6
lfs@boss:/media/LinuxFromScratch/sources/libisoburn-1.2.6$ ls
AUTHORS INSTALL acinclude.m4 config.sub frontend missing xorriso
CONTRIBUTORS Makefile.am aclocal.m4 configure install-sh releng
COPYING Makefile.in bootstrap configure.ac libisoburn test
COPYRIGHT README compile depcomp libisoburn-1.pc.in texinfo.tex
ChangeLog TODO config.guess doc ltmain.sh version.h.in
lfs@boss:/media/LinuxFromScratch/sources/libisoburn-1.2.6$ ./configure --prefix=/usr --disable-static &&
> make
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /tools/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

I can't understand both errors, Please Help me in this...

Is that mandatory to install this package before configuring GRUB????
 
Old 03-16-2013, 05:33 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi

No it,s not mandatory that is if you cant boot your lfs from grub.
If you can get back into lfs from a live cd that will do,
If you were to overwrite your host bootloader that is what you would use.
 
Old 03-16-2013, 05:53 AM   #3
smdaudhilbe
Member
 
Registered: Feb 2013
Posts: 43

Original Poster
Rep: Reputation: Disabled
LFS - grub

Hi,

Thanx for your quick reply....

Actually LFS book suggest me to install this pack before doing anything with grub...you can refer

http://www.linuxfromscratch.org/lfs/...er08/grub.html

And FYI I am not using any live cd...I just building a LFS in seperate partition.

As per your advice here is the output for version-check

cot@boss:~/Desktop/7.3-rc1$ ./version.sh
bash, version 4.1.5(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Debian) 2.20.1-system.20100303
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 8.5
diff (GNU diffutils) 3.0
find (GNU findutils) 4.4.2
GNU Awk 3.1.7
/usr/bin/awk -> /usr/bin/gawk
gcc (Debian 4.4.5-4) 4.4.5
(Debian EGLIBC 2.11.2-6boss1) 2.11.2
GNU grep 2.6.3
gzip 1.3.12
Linux version 3.7.8-pimpi3 (elcot@boss) (gcc version 4.4.5 (Debian 4.4.5-4) ) #1 SMP Mon Feb 18 16:15:26 IST 2013
m4 (GNU M4) 1.4.14
GNU Make 3.81
patch 2.6
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.23
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 4.999.9beta
gcc compilation OK


Kindly help me in this...

Whether I need to install this package by being inside "chroot" environment or outside of it....

Last edited by smdaudhilbe; 03-16-2013 at 05:57 AM.
 
Old 03-16-2013, 06:00 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi
I have never used this as I have live cd around so I can boot into the systems from it, I would of thought your host came on a cd which is proberly a live cd

FYI the version check is more needed at the begining of the build you way past that but thks for noticing.

Last edited by spiky0011; 03-16-2013 at 06:01 AM.
 
Old 03-16-2013, 08:09 AM   #5
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 465

Rep: Reputation: 133Reputation: 133
Hello everybody,

And pardon the intrusion, but to someone on the sidelines, this right here seems to reveal a misunderstanding of spiky0011's post about a live CD...

Quote:
Originally Posted by smdaudhilbe

Actually LFS book suggest me to install this pack before doing anything with grub...you can refer

http://www.linuxfromscratch.org/lfs/...er08/grub.html

And FYI I am not using any live cd...I just building a LFS in seperate partition.
First, most of us here are well aware of what the book says regarding installing libisoburn and creating a boot disk before installing GRUB. But what spiky0011 meant (I believe) is that one alternative to doing that step in the book is to create one of the well-known live CDs already in existence and available for download (such as Knoppix, System Rescue CD, or one of the distro live CDs, etc.). In other words, the libisoburn step is only there to provide a way to boot your computer in case you bust its boot loader installing GRUB in your LFS system (it happens all the time), and there are other ways to obtain a boot disk without diverting your efforts to libisoburn at this time. Of course do what you think is best, but I never do that boot disk step in the LFS book because I already possess about dozen disks that are capable of emergency booting my computer.

Last edited by stoat; 03-16-2013 at 10:01 AM.
 
Old 03-16-2013, 09:24 AM   #6
smdaudhilbe
Member
 
Registered: Feb 2013
Posts: 43

Original Poster
Rep: Reputation: Disabled
LFS - grub

Hi,

Thanx,

Tell me precautions step, to take before doing all the stuff..

FYI, my laptop holds MS Windows 7, with LINUX (kernels 2.6.32, 2.6.36, 3.7.8) and I builded all LFS system in a new partition of my hard drive.

I will approciate if any one direct (suggest) me to take correct decision.

Even this lines are horrible to me

" Warning
The following command will overwrite the current boot loader. Do not run the command if this is not desired, for example, if using a third party boot manager to manage the Master Boot Record (MBR).

$ grub-install /dev/sda "


I need to understand deep of grub..

Please help me in this....
 
Old 03-16-2013, 09:52 AM   #7
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Thks stoat we did get crossed wires.

Yes what you have put will overwrite the grub which is installed by your host.
What you need to do is boot back into your host system CAN YOU LET US WHICH HOST, Then you will have to update grub from there. The host grub should identify lfs.
 
Old 03-17-2013, 05:55 AM   #8
smdaudhilbe
Member
 
Registered: Feb 2013
Posts: 43

Original Poster
Rep: Reputation: Disabled
LFS - grub

Hi Spiky,

As per your advice I updated my grub from there but it is not detecting my LFS there, It is normally updating with the earlier settings.

see this


cot@boss:~$ sudo update-grub
Generating grub.cfg ...
Found background image: boss-grub.png
Found linux image: /boot/vmlinuz-3.7.8-pimpi3
Found initrd image: /boot/initrd.img-3.7.8-pimpi3
Found linux image: /boot/vmlinuz-3.7.8-pimpi3.old
Found initrd image: /boot/initrd.img-3.7.8-pimpi3
Found linux image: /boot/vmlinuz-2.6.39-bpo.2-686-pae
Found initrd image: /boot/initrd.img-2.6.39-bpo.2-686-pae
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686
done



even I created a script at /etc/grub.d/ inside my LFS partition, but none works for me

FYI, my laptop is dual boot, which holds windows 7, and linux (with more than one kernel), I builded LFS at seperate partition(which can be mounted in my system).

Share me any suggestion regarding this...
 
Old 03-17-2013, 06:02 AM   #9
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi

What files do you have in lfs /boot

Maybe post output of
Code:
sudo blkid
from host
 
Old 03-17-2013, 06:20 AM   #10
smdaudhilbe
Member
 
Registered: Feb 2013
Posts: 43

Original Poster
Rep: Reputation: Disabled
LFS - grub

Hi,

From Host it is

cot@boss:~$ sudo blkid
/dev/sda1: UUID="DAEECC96EECC6C77" TYPE="ntfs"
/dev/sda2: UUID="DA32CE2232CE038B" TYPE="ntfs" LABEL="C_drive"
/dev/sda4: UUID="348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda6: LABEL="E_drive" UUID="6FBCF650240F75F3" TYPE="ntfs"
/dev/sda5: LABEL="D_drive" UUID="76A3A9B37781E328" TYPE="ntfs"
/dev/sda7: LABEL="LinuxFromScratch" UUID="4d466b11-8221-4a4b-9bd9-b23276276372" TYPE="ext3" SEC_TYPE="ext2"
 
Old 03-17-2013, 06:22 AM   #11
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
What files are in lfs boot
 
Old 03-17-2013, 08:59 AM   #12
smdaudhilbe
Member
 
Registered: Feb 2013
Posts: 43

Original Poster
Rep: Reputation: Disabled
LFS - grub

Hi,

Inside chroot environment


root:/# blkid
/dev/sda1: UUID="DAEECC96EECC6C77" TYPE="ntfs"
/dev/sda2: LABEL="C_drive" UUID="DA32CE2232CE038B" TYPE="ntfs"
/dev/sda4: UUID="348b3406-e11c-4fa9-ac4b-fdc5cc7ccb20" TYPE="ext3" PTTYPE="dos"
/dev/sda5: LABEL="D_drive" UUID="76A3A9B37781E328" TYPE="ntfs"
/dev/sda6: LABEL="E_drive" UUID="6FBCF650240F75F3" TYPE="ntfs"
/dev/sda7: LABEL="LinuxFromScratch" UUID="4d466b11-8221-4a4b-9bd9-b23276276372" TYPE="ext3" PTTYPE="dos"
/dev/sr0: UUID="2010-06-13-10-00-00-00" LABEL="Reliance" TYPE="iso9660" PTTYPE="mac"
root:/#

and lfs /boot has


root:/# ls -l /boot/
total 11532
-rw-r--r-- 1 root root 81032 Mar 16 15:07 config-3.7.9
drwxr-xr-x 4 root root 4096 Mar 17 14:07 grub
-rw-r--r-- 1 root root 2250247 Mar 16 15:06 System.map-3.7.9
-rw-r--r-- 1 root root 4717984 Mar 16 15:03 vmlinuz-3.7.9-audhillfs-7.3-rc1
-rw-r--r-- 1 root root 4717984 Mar 16 15:05 vmlinuz-3.7.9-lfs-7.3-rc1
root:/#

I can't find

initrd.img here.....

How to solve this issue...?
 
Old 03-17-2013, 09:02 AM   #13
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Did you name those files in LFS /boot? Were they the 1,s you created in chapter 8.3
 
Old 03-17-2013, 09:27 AM   #14
smdaudhilbe
Member
 
Registered: Feb 2013
Posts: 43

Original Poster
Rep: Reputation: Disabled
LFS - grub

Here is my chapter 8.3

http://www.linuxfromscratch.org/lfs/...08/kernel.html

I followed everything as directed...

But only thing I done was for the first time I configured my kernel myself...(I am not sure whether I made any mistake in configuration)..

As a result of this I got

1) vmlinuz
2) system.map
3) config-3.7.9

not any initrd file....
 
Old 03-17-2013, 09:31 AM   #15
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
There should not be any intrd file the others are all correct.

I see you have a /boot/grub dir have you created a grub.cfg file if so post it, and /etc/fstab
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Help with network configuration in Chapter 7.2.2 of LFS 7.1 engineer Linux From Scratch 9 01-21-2013 08:11 PM
[SOLVED] Configuration and compilacion kernel LFS 7.1 is possible? poisoning Linux From Scratch 2 07-03-2012 04:21 PM
LFS keyboard permanent configuration aloisius-a Linux From Scratch 2 06-06-2010 04:35 AM
Problem with section 8.4.3 of LFS 6.6 book (Testing the Grub configuration) jackplughd Linux From Scratch 1 04-14-2010 08:24 AM
DHCP, Network configuration on LFS chawarma Linux From Scratch 1 02-18-2009 06:19 AM


All times are GMT -5. The time now is 03:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration