[SOLVED] ...Busybox
Posted: 21 Sep 2016, 13:11
P: _I'm not sure about how to implement Busybox.
Q: _What is the exact procedure?
This is what I located so far...
https://sourceforge.net/projects/microd ... =directory
http://distro.ibiblio.org/baslinux/
Pls Note: ...I already successfully installed "musl" and "tcc".
...also a http://forum.porteus.org/viewtopic.php?f=74&t=6151 would be preferable to busybox
Q: _What is the exact procedure?
This is what I located so far...
@ http://www.slackware.com/install/rootdisk.php
rescue.dsk This is a BusyBox-based rescue disk for Linux. It is a reasonably complete mini-Linux system running from a four megabyte ramdisk, and contains an editor (vi), networking tools like ifconfig, route, telnet, ping, and wget, and other tools that might be handy for fixing your Linux machine if you ever get locked out for some reason, or any time you just need to boot Linux to "edit something quickly".
@ http://pbraun.nethence.com/unix/sysutil ... ramfs.html@ http://freecode.com/projects/slakbootebs
slakbootEBS is a software development kit for the automated creation of bootable embedded systems based on Slackware and Busybox. The focus is on i486 and ARM systems that use compact flash devices (handhelds and PC104 type boards). The distribution consists of a primary archive with tools, scripts, and documentation, and additional archives for the i486 and PXA250 binary components.
Code: Select all
Busybox and Slackware init
Note. you need to be root to extract the device files from the cpio archive
Make sure you've got XZ (http://tukaani.org/xz/) first. It's available on recent Slackware distros. It's also available as package with Redhat/CentOS,
rpm -q xz
Prerequesties,
wget ftp://ftp.slackware.at/slackware-13.1/isolinux/initrd.img
mv -f initrd.img initrd.dist
wget ftp://ftp.slackware.at/slackware-13.1/slackware/a/lvm2-2.02.64-i486-1.txz
xz -d lvm2-2.02.64-i486-1.txz
don't forget initrd's relative kernel image, it might help to build the PXE or memstick later on !
wget ftp://ftp.slackware.at/slackware-13.1/kernels/hugesmp.s/bzImage
Extract a sample initramfs,
rm -rf sample/
mkdir sample/
cd sample/
gzip -dc ../initrd.dist | cpio -id
cd ..
note. "-id" or "--extract --make-directories"
Prepare the rescue initramfs,
rm -rf tmp/
mkdir -p tmp/etc/ tmp/lib/ tmp/_keymap/
cp -a sample/dev/ tmp/
cp -a sample/lib/modules/ tmp/lib/
cp -a sample/etc/group tmp/etc/
cp -a sample/etc/passwd tmp/etc/
tar xzf sample/etc/keymaps.tar.gz -C tmp/_keymap/
sed 's/mknod --mode=600/mknod/' sample/dev/devmap_mknod.sh > tmp/dev/devmap_mknod.sh
chmod +x tmp/dev/devmap_mknod.sh
Eventually enable PCMCIA,
#mkdir -p tmp/etc/rc.d
#cp -a sample/etc/rc.d/rc.pcmcia tmp/etc/rc.d
Note. for rc.pcmcia to work you also need pcmciautils package
Enable the network connectivity,
cp -a sample/scripts/network.sh tmp/sbin/
chmod +x tmp/sbin/network.sh
Make it LVM2 capable,
rm -rf addons/
mkdir addons/
mkdir -p tmp/sbin/
tar xf lvm2-2.02.64-i486-1.tar -C addons/
cp addons/sbin/lvm.static tmp/sbin/lvm
Note. this isn't needed,
#wget ftp://ftp.slackware.at/slackware-12.2/slackware/a/device-mapper-1.02.28-i486-1.tgz
#tar xzf device-mapper-1.02.28-i486-1.tgz -C addons
Note. and there's no udev.static binary provided by Slackware.
Create the initialization script,
cd tmp/
cat > init <<EOF9
#!/bin/sh
/bin/rm -f /etc/mtab* /etc/nologin 1> /dev/null 2> /dev/null
mkdir -p /proc /sys
mount -t proc none /proc
mount -t sysfs none /sys
/dev/makedevs.sh
/dev/devmap_mknod.sh
lvm vgscan --mknodes --ignorelockingfailure
lvm vgchange -ay --ignorelockingfailure
#blkid (floppy error)
loadkmap < /_keymap/fr-latin1.bmap
echo
echo "run network.sh to enable network cards"
echo
exec /linuxrc
EOF9
chmod 700 init
cd ..
Note. change the keymap accordingly
Configure linuxrc,
cd tmp/
mkdir -p etc/init.d/
touch etc/init.d/rcS
chmod +x etc/init.d/rcS
cd ..
Tune your environment,
cd tmp/
cat > .profile <<EOF9
alias ll='ls -alkF'
EOF9
cd ..
Finish up
Generate the initramfs and clean up,
cd tmp/
find . | cpio -co | gzip -9 > ../initrd.img
cd ..
#mkdir -p /tftpboot/rescue32/
#cp bzImage /tftpboot/rescue32/
#cp initrd.img /tftpboot/rescue32/
http://distro.ibiblio.org/baslinux/
Pls Note: ...I already successfully installed "musl" and "tcc".
...also a http://forum.porteus.org/viewtopic.php?f=74&t=6151 would be preferable to busybox