ivandavidov / minimal-linux-script

One script which generates live Linux ISO image with minimal effort. Based on the first published version of Minimal Linux Live: http://github.com/ivandavidov/minimal
GNU General Public License v3.0
219 stars 70 forks source link

Fails to build #18

Open scsijon opened 4 years ago

scsijon commented 4 years ago

Building is giving me this error from sccript lline 12>


Any ideas? I was planning on a toybox instead of busybox version, but that won't pass this problem either.

thanks

ivandavidov commented 4 years ago

I guess your build dependencies are either to old or too new. Try this build in a virtual machine with clean Ubuntu, where you have satisfied the MLS build dependencies. If this error persists, then we can investigate further.

scsijon commented 4 years ago

i'm in a Quirky Linux named Xenial Xerus (Ubuntu 16.04 LTS). libc and libc6 both v2.23 at /lib/x86_64-gnu-linux and /usr/include/x86_64-gnu-linux; existing system linux headers and kernel are v4.4.44 if of interest; ?maybe to old? will try an easyOS and see what happens, will give feedback (or more questions :-) thanks for the quick reply

scsijon commented 4 years ago

Yup, doesn't like Ubuntu 16.04 LTS, doesn't like OpenEmbeded Linux versions either (they use gcc6.3.0 as standard for it's small sizes of builds), looks like I have to try a deb buster next and see what happens, but sorry I'm not impressed at this point, I thought I had found something good to base with. With no earlier releases to try with either, this may be a stopper point.

scsijon commented 4 years ago

and debian buster can build with warnings,

0- a lot of warnings against busybox/miscutils/ and procps/

1- at steps after AR util-linux/volume_id/lib.a LINK busybox_unstripped Static linking against glibc, can't use --gc-sections

2- busybox binary setuid root to ensure all configured applets will work properly

haven't tried burning and booting yet, that will happen on the first workstation with dvd r/w priviledges.

scsijon commented 4 years ago

And booting the iso gives errors >

ALSA device list: no soundcards found platform regulatory.0: Direct firmware load for regulatory.db failed with error-2 cfg80211: failed to load regulatory.db

Also>

ata3: and ata4: both say SATA link down (SStatus 0 Scontrol 300)

as I understand it, it means nothing is connected, but they are ssd's and ata3 was where it was built.

at least I get a responsivea # prompt to start with,

UPDATE: trying to shutdown / halt / etc gives a kernel panic.

i'll persevere and try toybox ilo busybox and a updated kernel next, but not sure if it's suitable for my idea as an interim chroot base towards musl/clang/llvm.

scsijon commented 4 years ago

Problem with toybox relates to the init starting script failing and giving a kernel panic, I've asked Rob Landley and the Toybox team to have a look.

An alpha quality kernel-toybox-syslinux script called minimal-2.sh is listed below, some #'d lines have wrapped.


!/bin/sh

source minimal-linux at github.com/ivandavedov/minimal gpl3 with kernel, busybox, syslinux

20191122 scsijon test alpha only, new kernel, toybox ilo busybox, syslinux, use .gz src on purpose

20191122 scsijon some hashed out as downloaded already and rm not wanted first time, fix later

set -ex KERNEL_VERSION=5.3.12 TOYBOX_VERSION=0.8.2 SYSLINUX_VERSION=6.03

rm -rd isoimage

rm -rd linux-${KERNEL_VERSION}

rm -rd toybox-${TOYBOX_VERSION}

rm -rd syslinux-${SYSLINUX_VERSION}

wget -O kernel.tar.gz http://kernel.org/pub/linux/kernel/v5.x/linux-${KERNEL_VERSION}.tar.gz

wget -O toybox.tar.gz https://landley.net/toybox/downloads/toybox-${TOYBOX_VERSION}.tar.gz

wget -O syslinux.tar.gz http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-${SYSLINUX_VERSION}.tar.gz

tar -xvf kernel.tar.gz tar -xvf toybox.tar.gz tar -xvf syslinux.tar.gz mkdir isoimage cd toybox-${TOYBOX_VERSION} make distclean LDFLAGS="--static" make defconfig toybox mkdir ./_install make toybox install PREFIX=./_install cd _install rm -f linuxrc mkdir dev proc sys echo '#!/bin/sh' > init echo 'dmesg -n 1' >> init echo 'mount -t devtmpfs none /dev' >> init echo 'mount -t proc none /proc' >> init echo 'mount -t sysfs none /sys' >> init echo 'setsid cttyhack /bin/sh' >> init chmod +x init find . | cpio -R root:root -H newc -o | gzip > ../../isoimage/rootfs.gz cd ../../linux-${KERNEL_VERSION} make mrproper defconfig bzImage cp arch/x86/boot/bzImage ../isoimage/kernel.gz cd ../isoimage cp ../syslinux-${SYSLINUX_VERSION}/bios/core/isolinux.bin . cp ../syslinux-${SYSLINUX_VERSION}/bios/com32/elflink/ldlinux/ldlinux.c32 . echo 'default kernel.gz initrd=rootfs.gz' > ./isolinux.cfg xorriso \ -as mkisofs \ -o ../minimal_linux_live.iso \ -b isolinux.bin \ -c boot.cat \ -no-emul-boot \ -boot-load-size 4 \ -boot-info-table \ ./ cd .. set +ex


don't foget the empty last line if you copy it.

scsijon commented 4 years ago

Just an update at this point.

From the Toybox team came the word that the inbuilt init wasn't at release state at this point, it's still classed at pending, their sugestion is to add and use oneit (which is) instead, by adding a link > ln -s /sbin/oneit /sbin/init and > setsid cttyhack /bin/sh becomes exec /sbin/oneit /bin/sh ; and i've stuffed the script by building toybox twice, once as static then again dynamic, so i've sorted that out.

I did say it's a test alpha, however it's ok otherwise at this point.

I shall persevere, and update this thread as I go if you care to leave it open, as i like your system and if my output is of use to you, then have fun with it.