Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Making a init thingy. Step two I guess.
Date: Sat, 17 Sep 2011 21:33:28
Message-Id: CAK2H+efk0SB95BpFtLKy6QOS0SEb92Ggmw+58sS-hUbzWp_mCQ@mail.gmail.com
In Reply to: Re: [gentoo-user] Making a init thingy. Step two I guess. by Dale
1 On Sat, Sep 17, 2011 at 2:17 PM, Dale <rdalek1967@×××××.com> wrote:
2 > Mark Knecht wrote:
3 >>
4 >> On Sat, Sep 17, 2011 at 1:51 PM, Michael Mol<mikemol@×××××.com>  wrote:
5 >>>
6 >>> On Sat, Sep 17, 2011 at 4:44 PM, Dale<rdalek1967@×××××.com>  wrote:
7 >>>>
8 >>>> Mark Knecht wrote:
9 >>>>>
10 >>>>> On Sat, Sep 17, 2011 at 1:02 PM, Dale<rdalek1967@×××××.com>    wrote:
11 >>>>
12 >>>> That's what I was thinking to.  I know busybox does a LOT of things but
13 >>>> I
14 >>>> didn't think it was a nano replacement either.  OK.  I got both of those
15 >>>> in
16 >>>> there at least.  First problem dealt with I guess.  Wonder what else I
17 >>>> should put in there too.<  scratches head>
18 >>>
19 >>> Anything that makes life convenient, I'd guess.
20 >>>
21 >>> I'd look at stuffing these in there:
22 >>> * screen
23 >>> * file
24 >>> * ssh
25 >>> * links/lynx/w3m
26 >>>
27 >>> You'd also need the .so files those depend on. I don't know how to
28 >>> identify those.
29 >>>
30 >>> --
31 >>> :wq
32 >>>
33 >>>
34 >> Supposedly
35 >>
36 >> ldd /usr/bin/screen
37 >> ldd /usr/bin/file
38 >> ldd /usr/bin/ssh
39 >>
40 >> etc.
41 >>
42 >> I think that's what I did when I built one a while back...
43 >>
44 >> - Mark
45 >>
46 >>
47 >
48 > Yep, that's how the howto says it too.  It seems to work.
49 >
50 > root@fireball / # ldd /bin/nano
51 >        linux-vdso.so.1 =>  (0x00007fffc25ff000)
52 >        libncursesw.so.5 => /lib64/libncursesw.so.5 (0x00007f25fb500000)
53 >        libc.so.6 => /lib64/libc.so.6 (0x00007f25fb171000)
54 >        libdl.so.2 => /lib64/libdl.so.2 (0x00007f25faf6d000)
55 >        /lib64/ld-linux-x86-64.so.2 (0x00007f25fb75f000)
56 > root@fireball / #
57 >
58 > So, I copied those over too.
59 >
60 > Adding ssh and screen are good ideas.  I very rarely use file.  Still might
61 > tho. Interesting:
62 >
63 > root@fireball / # ldd /usr/bin/screen
64 >        linux-vdso.so.1 =>  (0x00007fffe1573000)
65 >        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f921dfca000)
66 >        libncursesw.so.5 => /lib64/libncursesw.so.5 (0x00007f921dd6b000)
67 >        libpam.so.0 => /lib64/libpam.so.0 (0x00007f921db5c000)
68 >        libc.so.6 => /lib64/libc.so.6 (0x00007f921d7cd000)
69 >        libdl.so.2 => /lib64/libdl.so.2 (0x00007f921d5c9000)
70 >        /lib64/ld-linux-x86-64.so.2 (0x00007f921e230000)
71 > root@fireball / # ldd /usr/bin/ssh
72 >        linux-vdso.so.1 =>  (0x00007fffc6bff000)
73 >        libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0
74 > (0x00007ff6aa7b9000)
75 >        libdl.so.2 => /lib64/libdl.so.2 (0x00007ff6aa5b5000)
76 >        libz.so.1 => /lib64/libz.so.1 (0x00007ff6aa39d000)
77 >        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ff6aa186000)
78 >        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff6a9f69000)
79 >        libc.so.6 => /lib64/libc.so.6 (0x00007ff6a9bda000)
80 >        /lib64/ld-linux-x86-64.so.2 (0x00007ff6aab73000)
81 > root@fireball / #
82 >
83 > Those seem to have a bit in common and no static flag for either.
84 >
85 > Dale
86
87 While I was out walking my dog I sort of remembered that there are
88 just a few apps I had to build static, or at least that I build
89 static. One, I think was grub. The first and only time I did it I had
90 to do it 3 or 4 times before I got everything I needed working
91 correctly. This page which is like the first one Google comes up with
92 talks about that stuff, although you have to sort of dig it out and
93 read between the lines.
94
95 http://en.gentoo-wiki.com/wiki/Initramfs
96
97 And, I think with the ldd command as long as you include the libraries
98 ldd points at in your equivalent /lib directory within the initramfs
99 then that works for most apps and keeps the initramfs smaller.
100
101 HTH,
102 Mark

Replies

Subject Author
Re: [gentoo-user] Making a init thingy. Step two I guess. Dale <rdalek1967@×××××.com>