What are the dependencies to install bash from source in empty partition?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What are the dependencies to install bash from source in empty partition?
What are the dependencies to install bash from source in empty partition? Linux kernel is in that partition's(/dev/sda7) /boot directory, nothing else. If I want to compile and install bash to that partition, what are the packages do I need to install there before installing bash?
The existing linux is Debian jessie here. It's in /dev/sda9.
sory, but do not really understand it. You never install anything into a partition, but into a directory (probably). The directory should belong to a filesystem, the filesystem should belong to a partition and all these things should belong to a working os. And you will install anything into this os, and into a specific directory. The dependencies of bash are to have a working os and enough space.
so you want to install just a kernel + bash as the ultimately minimal system? something like that?
if you use everything from debian repositories, there's no need to compile?
you could manually install bash (it's really just the binary 'bash', plus documentation, which you don't strictly need).
and its dependencies. on my (archlinux) system they are: readline>=6.3 glibc ncurses libncursesw.so=6-64 (this is for bash 4.3.46, on debian the dependency versions are likely different, but similarly strict i guess).
so you want to install just a kernel + bash as the ultimately minimal system? something like that?
if you use everything from debian repositories, there's no need to compile?
you could manually install bash (it's really just the binary 'bash', plus documentation, which you don't strictly need).
and its dependencies. on my (archlinux) system they are: readline>=6.3 glibc ncurses libncursesw.so=6-64 (this is for bash 4.3.46, on debian the dependency versions are likely different, but similarly strict i guess).
Yes, I want to install just a kernel+bash as ultimately minimal system.
I've added this entry in grub.cfg:
Code:
linux /boot/vmlinuz-4.8.0 root=/dev/sda7 ro init=/bin/bash
But got error like this:
Code:
Kernel panic, attempted to kill init!
bash not tainted
And the system is in freeze/hang mode. Can't do anything from there.
sory, but do not really understand it. You never install anything into a partition, but into a directory (probably). The directory should belong to a filesystem, the filesystem should belong to a partition and all these things should belong to a working os. And you will install anything into this os, and into a specific directory. The dependencies of bash are to have a working os and enough space.
What I tried:
Code:
mount /dev/sda7 /media/sda7
Installed kernel-4.8.0 in /media/sda7/boot. Then I tried to install bash in /media/sda7/bin.
I've added this entry in grub.cfg:
Code:
linux /boot/vmlinuz-4.8.0 root=/dev/sda7 ro init=/bin/bash
But got error like this:
Code:
Kernel panic, attempted to kill init!
bash not tainted
And the system is in freeze/hang mode. Can't do anything from there.
glibc:
cd /media/sda7/packages/glibc-2.24
./configure --prefix=/media/sda7 --enable-kernel=2.6.32
make
make install
binutils:
cd /media/sda7/packages/binutils-2.27
./configure --prefix=/media/sda7
make
make install
ncurses:
cd /media/sda7/packages/ncurses-5.9
./configure --prefix=/media/sda7 --with-shared --with-termlib
make
make install
readline:
cd /media/sda7/packages/readline-6.3
./configure --prefix=/media/sda7
make
make install
bash:
cd /media/sda7/packages/bash-4.4
./configure --prefix=/media/sda7
make
make install
cd /media/sda7/usr/src/linux-4.8
make menuconfig
make INSTALL_MOD_PATH=/media/sda7 modules_install
cp -v arch/x86/boot/bzImage /media/sda7/boot/vmlinuz-4.8.0
cp -v System.map /media/sda7/boot/System.map-4.8.0
cp -v .config /media/sda7/boot/config-4.8.0
So you installed those libraries into /media/sda7. You need to tell bash to look for those libraries there, not in /usr/lib. So you need to use ldconfig (or something similar).
But I'm still not sure if that works.
(I'm working toward like this, from NuTyX, for VBox Atom N270, but didn't dare ask ...
attached is my .config based on `make tinyconfig` +IDE +a mess of essential¬ ...)
Build your minimal Linux kernel, get it installed and running. From there you have two options:
Grab bash from another location, such as that Debian Jesse, it will be in /bin, and also grab those so libraries and make links shown in your first post
Compile bash from source on this minimal kernel and install it
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.