[Clfs-support] it is not able to boot after -- Building the Basic Tools

appzer0 appzer0 at free.fr
Mon Oct 18 07:13:50 PDT 2010


On 18/10/2010 11:31, kevin631012 wrote:
> Hi All,
> I have been tring for days , now the rootfs I build is able to boot up now . but what I did is to copy all of libraried in /tools/lib which I build in chapter 6 and 7 to /lib .
> I wonder why I wrote /tools/lib in ld.so.conf . it suppose to find needed libraried under /tools/lib , isn't it ? why do I need to copy those libraries to lib ?
> It doesn't make sense , does it ?
>    
Please avoid top-posting, it makes the discussion less understandable.

I don't know what you've done in details, but what I'm sure about is 
that you got a "final" system with binaries pointing towards /tools, 
which is bad IMHO. You should have final binaries in /bin, /usr/bin and 
libs in /lib, /usr/lib. My advice is that you really should stick to the 
method in the clfs book to avoid messing up your system.

My other advice is to NEVER ever copy files from host to the clfs root 
fs (binaries, libs), you should already have got them built.

Now you say your system boots and works or seems to. If you really can 
compile with that system then try to rebuild any incomplete package, 
avoiding critical package like glibc binutils gcc, etc.

Why not restarting over to master the techniques ? :)
>>>>> Hi All ,
>>>>> I try to build  SH's clfs . what I did is
>>>>>            
>> use
>>      
>>>>> file-5.04
>>>>> gmp-5.0.1
>>>>> mpc-0.8.2
>>>>> mpfr-3.0.0
>>>>> ppl-0.10.2
>>>>> cloog-ppl-0.15.9
>>>>> binutils-2.20.51
>>>>> gcc-4.2.4-67
>>>>> glibc-2.10.1-63
>>>>>
>>>>> to build Temporary System as
>>>>>
>>>>> # Binutils-2.18
>>>>> # GCC-4.2.4
>>>>> # Ncurses-5.6
>>>>> # Bash-3.2
>>>>> # Bzip2-1.0.4
>>>>> # Coreutils-6.9
>>>>> # Diffutils-2.8.7
>>>>> # Findutils-4.2.32
>>>>> # Zlib-1.2.3
>>>>> # File-4.23
>>>>> # Gawk-3.1.6
>>>>> # Gettext-0.17
>>>>> # Grep-2.5.3
>>>>> # Gzip-1.3.12
>>>>> # Make-3.81
>>>>> # Patch-2.5.9
>>>>> # Sed-4.1.5
>>>>> # Tar-1.20
>>>>> # Texinfo-4.11
>>>>>
>>>>>
>>>>> I choose to BOOT  ( not chroot ) , so I
>>>>>            
>> creat
>>      
>>>> some necessary symlink and do something for
>>>>          
>> temporary
>>      
>>> system
>>>        
>>>> bootable .
>>>>          
>>>>> but I get stuck when every time I try to
>>>>>            
>> boot .
>>      
>>> I
>>>        
>>>> check my root file system /bin/ , I find
>>>>          
>>>>> ls /etc/
>>>>> fstab  group  inittab  opt
>>>>>            
>>>> passwd  udev
>>>>          
>>>>>
>>>>> bash ->   /tools/bin/bash
>>>>> and I parse /tools/bin/bash
>>>>> it needs
>>>>>
>>>>> Dynamic Section:
>>>>>      NEEDED
>>>>>            
>>>>       libdl.so.2
>>>>          
>>>>>      NEEDED
>>>>>            
>>>>       libc.so.6
>>>>          
>>>>> I put those libraries under /lib .
>>>>> looks every fine ,but it still not working
>>>>>            
>> .
>>      
>>>>> can any1 tell my , what else I need to do ?
>>>>>            
>> do I
>>      
>>> have
>>>        
>>>> enought configure files under /etc ? I dont see
>>>>          
>> to
>>      
>>> creat
>>>        
>>>> /etc/rc.d something likes that in chapter 6 . is
>>>>          
>> it
>>      
>>> good
>>>        
>>>> enought for system to boot ?
>>>>          
>>>>> Thanks
>>>>>
>>>>> BRs
>>>>> KevinSK
>>>>>
>>>>>
>>>>>            
>>>> I think you need the bootscripts, you /etc/
>>>>          
>> seems
>>      
>>>> desperatly empty. And
>>>> why do you have a 'opt' under /etc ?
>>>>
>>>> You need to have 'rc.d' and 'init.d' dirs
>>>>          
>>> (bootscripts)
>>>        
>>>> under /etc. And
>>>> you don't have any '/etc/ld.so.conf', either.
>>>>          
>> I'm
>>      
>>> afraid
>>>        
>>>> this system is
>>>> broken. Moreover, an 'etc' dir does have nothing
>>>>          
>> to
>>      
>>> do
>>>        
>>>> under /bin. Make
>>>> sure you follow the book. Sorry not having more
>>>>          
>> clues
>>      
>>> about
>>>        
>>>> your problem.
>>>>
>>>>
>>>> appzer0
>>>>          
>>>        
>> Hi appzer0
>>
>>
>> 1) what I do for bootscript is " make DESTDIR=${CLFS}
>> install-minimal " , I found two directories have been
>> installed , rc.d and sysconfig . it seems to be not
>> enought
>> bootscripts as you mention . so I refer my own linux
>> system
>> copy a /etc/init.d /etc/ld.so.conf into cross-lfs rootfs .
>> is still not working . can I have other more suggestions
>> that I can continu to figure out SysVinit process .
>>
>> 2) I wonder when I done to chapter 6 ,construc a temporary
>> system , and chapter 7 ,If You Are Going to Boot . should
>> I
>> do following chapter like chapter 9 , Constructing
>> Testsuite
>> Tools ,  and chapter 10 , Installing Basic System
>> Software , in my cross-lfs root filesytem or I can
>> continuous chapter 9 and 10 in my HOST_CLFS machine ?
>>    I think I should be able to boot from my cross-lfs
>> system . I know some of very important script for boot or
>> networking but if I can't not boot how I can continu to
>> construct test suit and install basic system software .
>>
>> below is my rootfs .
>>
>> ll etc/
>> total 40
>> -rw-r--r--  1 clfs clfs  583 2010-10-15 10:11
>> fstab
>> -rw-r--r--  1 clfs clfs  170 2010-10-15 10:02
>> group
>> drwxr-xr-x  2 test test 4096 2010-07-30 10:43 init.d
>> -rw-r--r--  1 clfs clfs  455 2010-10-15 09:59
>> inittab
>> -rw-r--r--  1 clfs clfs   43 2010-10-15
>> 17:56 ld.so.conf
>> drwxr-xr-x  2 clfs clfs 4096 2010-10-15 09:40 opt
>> -rw-r--r--  1 clfs clfs  396 2010-10-15 10:02
>> passwd
>> drwxr-xr-x 11 clfs clfs 4096 2010-10-15 10:59 rc.d
>> drwxr-xr-x  3 clfs clfs 4096 2010-10-15 10:38
>> sysconfig
>> drwxr-xr-x  3 clfs clfs 4096 2010-10-15 10:01 udev
>>
>> ll bin/
>> lrwxrwxrwx 1 clfs clfs     15
>> 2010-10-15 09:43 bash ->  /tools/bin/bash
>> lrwxrwxrwx 1 clfs clfs     14
>> 2010-10-15 09:43 cat ->  /tools/bin/cat
>> -rwxr-xr-x 1 clfs clfs  13733 2010-10-15 09:52 dmesg
>> lrwxrwxrwx 1 clfs clfs     15
>> 2010-10-15 09:43 echo ->  /tools/bin/echo
>> -rwxr-xr-x 1 clfs clfs  61651 2010-10-15 09:51
>> findmnt
>> lrwxrwxrwx 1 clfs clfs     15
>> 2010-10-15 09:43 grep ->  /tools/bin/grep
>> -rwxr-xr-x 1 clfs clfs  62498 2010-10-15 09:51 login
>> -rwxr-xr-x 1 clfs clfs  11753 2010-10-15 09:59 lsmod
>> -rwxr-xr-x 1 clfs clfs  70867 2010-10-15 09:52 more
>> -rwsr-xr-x 1 clfs clfs 194240 2010-10-15 09:52 mount
>> -rwxr-xr-x 1 clfs clfs   5072 2010-10-15
>> 09:58 mountpoint
>> lrwxrwxrwx 1 clfs clfs     16
>> 2010-10-15 09:58 pidof ->  ../sbin/killall5
>> lrwxrwxrwx 1 clfs clfs     14
>> 2010-10-15 09:43 pwd ->  /tools/bin/pwd
>> lrwxrwxrwx 1 clfs clfs      4 2010-10-15
>> 09:43 sh ->  bash
>> lrwxrwxrwx 1 clfs clfs     16
>> 2010-10-15 09:43 sleep ->  /tools/bin/sleep
>> lrwxrwxrwx 1 clfs clfs     15
>> 2010-10-15 09:43 stty ->  /tools/bin/stty
>> -rwxr-xr-x 1 clfs clfs   6927 2010-10-15
>> 17:51 test
>> -rwsr-xr-x 1 clfs clfs 135427 2010-10-15 09:52 umount
>>
>>
>> ll lib
>> total 884
>> lrwxrwxrwx 1 clfs clfs     17
>> 2010-10-15 09:51 libblkid.so.1 ->  libblkid.so.1.1.0
>> -rwxr-xr-x 1 clfs clfs 622632 2010-10-15 09:51
>> libblkid.so.1.1.0
>> lrwxrwxrwx 1 clfs clfs     17
>> 2010-10-15 09:51 libmount.so.1 ->  libmount.so.1.1.0
>> -rwxr-xr-x 1 clfs clfs 193829 2010-10-15 09:51
>> libmount.so.1.1.0
>> lrwxrwxrwx 1 clfs clfs     16
>> 2010-10-15 09:51 libuuid.so.1 ->  libuuid.so.1.3.0
>> -rwxr-xr-x 1 clfs clfs  61706 2010-10-15 09:51
>> libuuid.so.1.3.0
>> drwxr-xr-x 4 clfs clfs   4096 2010-10-15
>> 10:01 udev
>>
>> ll tools/
>> total 52
>> drwxr-xr-x  2 clfs clfs  4096 2010-10-15 09:55
>> bin
>> drwxr-xr-x  2 clfs clfs  4096 2010-10-15 09:55
>> etc
>> drwxr-xr-x 38 clfs clfs  4096 2010-10-15 09:55
>> include
>> drwxr-xr-x  2 clfs clfs  4096 2010-10-15 09:20
>> info
>> drwxr-xr-x  6 clfs clfs 12288 2010-10-15 09:55 lib
>> drwxr-xr-x  5 clfs clfs  4096 2010-10-15 09:32
>> libexec
>> drwxr-xr-x  6 clfs clfs  4096 2010-10-15 09:04
>> man
>> drwxr-xr-x  2 clfs clfs  4096 2010-10-15 09:55
>> sbin
>> drwxr-xr-x  4 clfs clfs  4096 2010-10-15 08:48
>> sh4-unknown-linux-gnu
>> drwxr-xr-x 18 clfs clfs  4096 2010-10-15 09:55 share
>> drwxr-xr-x  2 clfs clfs  4096 2010-10-15 09:18
>> var
>>
>>
>> ll sbin
>> total 5616
>> -rwxr-xr-x 1 clfs clfs   41480 2010-10-15
>> 09:51 agetty
>> -rwxr-xr-x 1 clfs clfs   71530 2010-10-15
>> 09:51 blkid
>> -rwxr-xr-x 1 clfs clfs   30380 2010-10-15
>> 09:51 blockdev
>> -rwxr-xr-x 1 clfs clfs   11844 2010-10-15
>> 09:58 bootlogd
>> -rwxr-xr-x 1 clfs clfs  153733 2010-10-15 09:51
>> cfdisk
>> -rwxr-xr-x 1 clfs clfs   10891 2010-10-15
>> 09:52 ctrlaltdel
>> -rwxr-xr-x 1 clfs clfs  218712 2010-10-15 09:59
>> depmod
>> lrwxrwxrwx 1 clfs clfs      18 2010-10-15
>> 09:55 e2fsck ->  /tools/sbin/e2fsck
>> -rwxr-xr-x 1 clfs clfs  237475 2010-10-15 09:51 fdisk
>> -rwxr-xr-x 1 clfs clfs   12011 2010-10-15
>> 09:51 findfs
>> -rwxr-xr-x 1 clfs clfs   73311 2010-10-15
>> 09:52 fsck
>> -rwxr-xr-x 1 clfs clfs   32076 2010-10-15
>> 09:51 fsck.cramfs
>> lrwxrwxrwx 1 clfs clfs      21 2010-10-15
>> 09:55 fsck.ext2 ->  /tools/sbin/fsck.ext2
>> lrwxrwxrwx 1 clfs clfs      21 2010-10-15
>> 09:55 fsck.ext3 ->  /tools/sbin/fsck.ext3
>> lrwxrwxrwx 1 clfs clfs      21 2010-10-15
>> 09:55 fsck.ext4 ->  /tools/sbin/fsck.ext4
>> -rwxr-xr-x 1 clfs clfs   53381 2010-10-15
>> 09:51 fsck.minix
>> -rwxr-xr-x 1 clfs clfs   15066 2010-10-15
>> 09:52 fsfreeze
>> -rwxr-xr-x 1 clfs clfs    9936 2010-10-15 09:58
>> halt
>> -rwxr-xr-x 1 clfs clfs   79833 2010-10-15
>> 09:52 hwclock
>> -rwxr-xr-x 1 clfs clfs   31140 2010-10-15
>> 09:58 init
>> -rwxr-xr-x 1 clfs clfs   28706 2010-10-15
>> 09:59 insmod
>> -rwxr-xr-x 1 clfs clfs 2790774 2010-10-15 09:59
>> insmod.static
>> -rwxr-xr-x 1 clfs clfs   10224 2010-10-15
>> 09:58 killall5
>> -rwxr-xr-x 1 clfs clfs   74105 2010-10-15
>> 09:52 losetup
>> -rwxr-xr-x 1 clfs clfs   13345 2010-10-15
>> 09:51 mkfs
>> -rwxr-xr-x 1 clfs clfs   35115 2010-10-15
>> 09:51 mkfs.bfs
>> -rwxr-xr-x 1 clfs clfs   55933 2010-10-15
>> 09:51 mkfs.cramfs
>> -rwxr-xr-x 1 clfs clfs   50641 2010-10-15
>> 09:51 mkfs.minix
>> -rwxr-xr-x 1 clfs clfs   55100 2010-10-15
>> 09:51 mkswap
>> -rwxr-xr-x 1 clfs clfs   91997 2010-10-15
>> 09:59 modinfo
>> -rwxr-xr-x 1 clfs clfs  175194 2010-10-15 09:59
>> modprobe
>> -rwxr-xr-x 1 clfs clfs    9289 2010-10-15 09:52
>> pivot_root
>> lrwxrwxrwx 1 clfs clfs       4
>> 2010-10-15 09:58 poweroff ->  halt
>> lrwxrwxrwx 1 clfs clfs       4
>> 2010-10-15 09:58 reboot ->  halt
>> -rwxr-xr-x 1 clfs clfs   31549 2010-10-15
>> 09:59 rmmod
>> -rwxr-xr-x 1 clfs clfs    3396 2010-10-15 09:58
>> runlevel
>> -rwxr-xr-x 1 clfs clfs  155974 2010-10-15 09:51
>> sfdisk
>> -rwxr-xr-x 1 clfs clfs   18276 2010-10-15
>> 09:58 shutdown
>> -rwxr-xr-x 1 clfs clfs    9968 2010-10-15 09:58
>> sulogin
>> -rwxr-xr-x 1 clfs clfs   27465 2010-10-15
>> 09:51 swaplabel
>> lrwxrwxrwx 1 clfs clfs       6
>> 2010-10-15 09:52 swapoff ->  swapon
>> -rwxr-xr-x 1 clfs clfs   63014 2010-10-15
>> 09:52 swapon
>> -rwxr-xr-x 1 clfs clfs   18452 2010-10-15
>> 09:52 switch_root
>> lrwxrwxrwx 1 clfs clfs       4
>> 2010-10-15 09:58 telinit ->  init
>> -rwxr-xr-x 1 clfs clfs  389473 2010-10-15 10:01
>> udevadm
>> -rwxr-xr-x 1 clfs clfs  369299 2010-10-15 10:01 udevd
>> -rwxr-xr-x 1 clfs clfs   35667 2010-10-15
>> 09:51 wipefs
>>
>>
>>
>> cat etc/ld.so.conf
>> /lib/
>> /usr/lib/
>> /tools/lib/
>> /tools/usr/lib
>>
>>      
>

appzer0



More information about the Clfs-support mailing list