initrd boot programs
Closed this issue · 12 comments
We need separate builds for these as they should not be pets.
Here's the list
cp X done
disktype X done
e2fsck X done
e3 X done
elspci X done
find X done
fsck X done
fusermount X done
grep X done
guess_fstype X done
losetup X done
lsmod X done
modinfo X done
modprobe X done
ntfs-3g X done
resize2fs X done
vercmp X done
waitmax X done
xargs X done
I have built all these previously either with build_root or musl. Perhaps @dimkr you might have some replacements?
I also have to back out the busybox_static build from 'pets', but I'll leave it there for now.
I think some of these can be kicked - e3 is useless (it's x86-only anyway), we can use elvis or nvi instead (easier to build). I'm not sure whether guess_fstype and losetup are really needed in 2014, because mount has -o loop and a type guessing function. hotplug2stdout is the ugliest hack ever and it should not exist.
The rest shouldn't be very hard to build statically if we use busybox or toybox - I have static builds for most of these in RLSD's initramfs.
EDIT: take a look at http://dimkr.insomnia247.nl/i686/ - you can extract these using tar -xJf.
I have a working e3 right now, I think I got it from build_root, can't recall atm (old man's disease).
guess_fstype is handy for usb stick installs and the dreaded ntfs installs. Personally, I would dump ntfs but the punters want it and it's not my decision. losetup? dunno. hotplug2stdout? Agreed. I'll try and weed out what depends on it.
I took a look at rc.sysinit a couple of days ago - I started a major overhaul (e.g removal of ugly code for udev < 150 and floppy support), but gave up. There's simply way too much code in there. Every quirk in every package ever included in Puppy deserves 3-5 lines in this huge pile of obfuscated code. Oh, and many sleep calls (no wonder why Puppy boots so slowly).
I guess that this is the price for booting from all kinds of media to all kinds of older machines.
Besides you boot only once a day. However would be nice to get rid of some of the ancient code used by nothing these days. You can not even build a pup2/3/4 with woof anyway.
I agree with @dimkr
hotplug2stdout can go, so can the old wait4usb_classic. Since slacko 5.3 I have been building in ehci and friends so it is redundant as well as defunct. We're not even supporting 2.6 kernels (after all 3 has been out near 4 years). I dumped Barry's wait_usb patch as soon as I started compiling kernels, it didn't work.
init does need a lot of clean up. What slows it down is the search. I reckon default to 1 deep and 2 deep can be a kernel parameter, that will cut boot by any number of seconds, especially on large slow HDD's.
"sleeps" IMHO, should only be needed for the user to see a message. If the "dust" hasn't "settled" it is likely a poor program as it hasn't kept track of any forked processes.
I took a look at rc.sysinit a couple of days ago - I started a major overhaul
.. and that's after I already chopped it by nearly half!
As a comparison, here is the content of Fatdog's initrd (FatdogArm and Fatdog64).
- busybox 1.22.1 with guess-fstype patch (uclibc, aboriginal 1.2.4)
- busybox init 1.22.1 (uclibc, aboriginal 1.2.4), compiled separately for memory reasons
- dropbear 2014.63 (aboriginal x64_64 static binary 1.2.7)
- losetup-klibc (losetup from klibc 2.0.1)
- ntfs-3g 2014.2.15 (uclibc, aboriginal 1.2.4 --disable-mtab)
- wpa_supplicant (uclibc, br 2012.02) # due for update
- iwconfig (uclibc, br 2012.02)
- sdparm 1.07 (can't remember I used musl or uclibc or klibc)
- lvm 2.02.98 w/o udev - (uclibc, aboriginal cross compiler 1.2.0)
- cryptsetup 1.6.0 (uclibc, aboriginal cross compiler 1.2.0)
- e2fsck 1.42.6 (uclibc, aboriginal cross compiler 1.2.0)
- dosfsck 3.0.13 (uclibc, aboriginal cross compiler 1.2.0)
- mount.cifs 1.10-apple187 (uclibc, aboriginal cross compiler 1.2.0)
- mdadm 3.2.6 (uclibc, aboriginal cross compiler 1.2.0)
- katz-git abb56e4c07 (musl, musl-gcc)
- evtest 0e14da978e (musl, musl-gcc)
- strace 4.8 (aboriginal x86_64 static binary 1.2.7)
- full fledged init, supports coldplug and hotplug
- barebones rc.sysinit & rc.cleanup
Binaries that are only rarely used or only executed once are upx-ed:
- init, ntfs-3g, wpa_supplicant and friends, iw_config, lvm/dmsetup, strace,
sdparm, dropbear, cryptsetup, e2fsck, dosfsck, mount.cifs, mdadm, katz, evtest
Busybox is built with almost-all applets, and its shell (ash) is configured to CONFIG_FEATURE_PREFER_APPLETS and CONFIG_FEATURE_SH_NOFORK.
cheers!
On Fri, 17 Oct 2014 01:16:22 -0700
Mick Amadio notifications@github.com wrote:
We need separate builds for these as they should not be pets.
Here's the list
cp disktype e2fsck e3 elspci find fsck fusermount grep guess_fstype X hotplug2stdout_notimeout losetup lsmod modinfo modprobe ntfs-3g resize2fs vercmp waitmax xargs
I have built all these previously either with buid_root or musl. Perhaps @dimkr you might have some replacements?
I also have to back out the busybox_static build form 'pets', but I'll leave it there for now.
Reply to this email directly or view it on GitHub:
#3
James B jamesbond3142@gmail.com
And here the contents of RLSD's initramfs. All these files are static builds against musl -
files present in the initramfs
INITRAMFS_FILES="bin/toybox
bin/init
bin/ksh
bin/awk
bin/syslogd
bin/klogd
bin/mkdir
bin/cp
bin/chroot
bin/cttyhack
bin/grep
bin/losetup
bin/mount
bin/umount
bin/luufs
bin/fusermount
bin/sleep
bin/clear
bin/cat
bin/contain
bin/poweroff
bin/reboot
etc/rc.d/rc.initramfs
etc/rc.d/rc.shutdown"
I'm pretty sure we can make Puppy's initramfs clean and simple like this one.
On Fri, 17 Oct 2014 01:33:03 -0700
Mick Amadio notifications@github.com wrote:
I have a working e3 right now, I think I got it from build_root, can't recall atm (old man's disease).
The only source of working e3 is from its website: https://sites.google.com/site/e3editor/. But e3 is such a small binary (17K) it doesn't really matter. You can always have busybox vi if you want to. I don't know how the size compared to static elvis or nvi.
guess_fstype is handy for usb stick installs and the dreaded ntfs installs. Personally, I would dump ntfs but the punters want it and it's not my decision.
Don't frop NTFS. It's one of Puppy's selling features. You don't want to end like ChromiumOS trying to drop support for ext2/3/4 (hint: it's ugly and after some PR nightmare the guys decided to re-instate suppoort).
Technically speaking "blkid" (busybox's version is good) does the same thing as guess_fstype, but it returns too much information. And many puppy scripts are tied with the output of guess_fstype, so perhaps it should stay.
losetup? dunno.
losetup is needed for encrypted savefile. Busybox's one can't handle encryption.
hotplug2stdout? Agreed. I'll try and weed out what depends on it.
Don't know whether it is still used, but yes I agree this needs to go away. If hotplug mode fallback is still needed, technosaurus' script (or is it a C program?) is a far better choice.
cheers!
James B jamesbond3142@gmail.com
Don't frop NTFS. It's one of Puppy's selling features. You don't want to end like ChromiumOS trying to drop support for ext2/3/4 (hint: it's ugly and after some PR nightmare the guys decided to re-instate suppoort).
Oh no, I got enough flack over my rant there already. It stays :)
hotplug2stdout? Agreed. I'll try and weed out what depends on it.
Don't know whether it is still used, but yes I agree this needs to go away. If hotplug mode fallback is still needed, technosaurus' script (or is it a C program?) is a far better choice.
It is old legacy stuff used well before we started building stuff into the kernel. I think it was pretty much useless since lupu, the first kernel for Puppy I built.
And here the contents of RLSD's initramfs. All these files are static builds against musl -
Covers quite a bit of what we need 👍
Uploaded a new repo
https://github.com/puppylinux-woof-CE/initrd_progs
I'll tidy up this one tomorrow.
All members have write privileges