Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem installing busybox, x86 snapshop with LUKS?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
thomaskerin
n00b
n00b


Joined: 04 Jan 2013
Posts: 2

PostPosted: Fri Jan 04, 2013 5:37 pm    Post subject: Problem installing busybox, x86 snapshop with LUKS? Reply with quote

Hi guys! First post and all, but I'm finally back using Gentoo after a few years so I'll be returning here for sur![/code]

I started installing gentoo today, and am building from a stable ubuntu system. I've used this set of instructions (http://en.gentoo-wiki.com/wiki/DM-Crypt_with_LUKS) along with the handbook. Everything went fine until I began building setting up initramfs.

I have unpacked and configured the busybox source, however when I run 'make' it fails. I've checked around and similar errors have been reported due to not having glibc, in some cases findutils, and then binutils also, so I have emerged these also. Because of the error I have also emerged dev-libs/libmcrypt, bu these are the only deviations I've taken from the install procedure.

Has anyone encountered this before, or have any other suggestions for how I can get past this?


Code:
portalab busybox-1.20.2 # make
  LINK    busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -static -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group
==========
debianutils/lib.a(mktemp.o): In function `mktemp_main':
mktemp.c:(.text.mktemp_main+0xa8): warning: the use of `tempnam' is dangerous, better use `mkstemp'
networking/lib.a(nslookup.o): In function `print_host':
nslookup.c:(.text.print_host+0x34): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(ipcalc.o): In function `ipcalc_main':
ipcalc.c:(.text.ipcalc_main+0x205): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_resolve':
inet_common.c:(.text.INET_resolve+0x4e): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `reread_config_file':
inetd.c:(.text.reread_config_file+0x6d2): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(netstat.o): In function `ip_port_str':
netstat.c:(.text.ip_port_str+0x3a): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `reread_config_file':
inetd.c:(.text.reread_config_file+0x65a): warning: Using 'getrpcbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `unregister_rpc':
inetd.c:(.text.unregister_rpc+0x13): undefined reference to `pmap_unset'
networking/lib.a(inetd.o): In function `register_rpc':
inetd.c:(.text.register_rpc+0x46): undefined reference to `pmap_unset'
inetd.c:(.text.register_rpc+0x61): undefined reference to `pmap_set'
networking/lib.a(inetd.o): In function `prepare_socket_fd':
inetd.c:(.text.prepare_socket_fd+0x82): undefined reference to `bindresvport'
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1476

PostPosted: Fri Jan 04, 2013 7:54 pm    Post subject: Reply with quote

yes. Don't panic! your almost there.

I recommend you use genkernel to make a generic initramfs. That way you can boot while you work out your custom one,

I believe the following will do it:

Code:
emerge genkernel
genkernel --luks --lvm --no-ramdisk-modules initramfs


Genkernel docs

Second, abandon that doc for the initramfs. Use this guide instead
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
thomaskerin
n00b
n00b


Joined: 04 Jan 2013
Posts: 2

PostPosted: Fri Jan 04, 2013 8:59 pm    Post subject: Reply with quote

Oh great! I see the handbook includes these steps, I'll give it a go! I'll make a backup in case things break down, I hope it sets up the LUKS mapping when it's working! I'll report back shortly, thanks for your help!
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4121
Location: Houston, Republic of Texas

PostPosted: Sat Jan 05, 2013 10:51 am    Post subject: Re: Problem installing busybox, x86 snapshop with LUKS? Reply with quote

thomaskerin wrote:
I have unpacked and configured the busybox source, however when I run 'make' it fails. I've checked around and similar errors have been reported due to not having glibc, in some cases findutils, and then binutils also, so I have emerged these also. Because of the error I have also emerged dev-libs/libmcrypt, bu these are the only deviations I've taken from the install procedure.

Has anyone encountered this before, or have any other suggestions for how I can get past this?


yes. build busybox from within your gentoo chroot
you need only 'emerge busybox' with USE="static"
This flag is best set on a per-package basis - you do not want every package on your system to be statically linked.This is done via package.use (in the handbook)

there are some other packages emerge will tell you need to be built with either "static" or "static-libs" - add these to a package.use entry as well

a package.use file (mkdir /etc/portage/package.use and then edit a file named 'crypt' or anything else you feel like calling it - name is only cosmetically important) like this should do the trick

Code:

sys-apps/busybox static
sys-fs/cryptsetup static
sys-apps/util-linux static-libs
dev-libs/libgcrypt static-libs
sys-fs/lvm2 static-libs


save, emerge busybox and cryptsetup. Done and done. No need to manually compile.
You can then worry about crafting your initramfs, should you still prefer the manual route

and if it's of any use, after reading the initramfs entry on the unofficial wiki, I've put my own little guide together.

EDIT: ha! cool! Just noticed my howto referenced here, on the official wiki. Neat.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
yaccz
n00b
n00b


Joined: 23 Mar 2013
Posts: 1

PostPosted: Sat Mar 23, 2013 6:50 pm    Post subject: Reply with quote

After disabling
Code:

CONFIG_FEATURE_HAVE_RPC=y
CONFIG_FEATURE_INETD_RPC=y


It links successfully but I'm not sure what the impact is on the built binaries.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum