Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 23 Feb 2019, 22:48
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Misc
minibase
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
sc0ttman


Joined: 16 Sep 2009
Posts: 2660
Location: UK

PostPosted: Sun 27 Jan 2019, 17:31    Post subject:  minibase
Subject description: "an alternative base system / early userspace for Linux"
 

May be of interest to those who like small C programs, static binaries,
playing with the boot process or initrd (etc)...

https://github.com/arsv/minibase

Quote:
What is this project
~~~~~~~~~~~~~~~~~~~~
This is an alternative base system / early userspace for Linux.

The role of this project in a system is similar to that of busybox
in small custom distributions. Boot the system, load modules, mount
partitions, establish networking, provide basic services. It is aimed
more at personal devices running GUIs however, more like systemd.

The project builds into small statically-linked executables with no
external dependencies. There are no build-time library dependencies
either, not even libc. It can be built with any toolchain that can
build the kernel.

Supported targets: x86_64 arm aarch64 rv64 mips mips64 i386.
(anything else will not work even if toolchain is available)

This project should be mostly useful for people building their own
custom systems, distribution, or maybe even looking for tools to put
into initrd.


Project status
~~~~~~~~~~~~~~
The project is ONGOING but not yet complete or even stable.
Components currently included in the package:

* batch command runner / script interpreter (msh)
* early-stage boot utils (switchroot, modprobe, mount).
* non-encrypted block device locator (findblk).
* encrypted device locator and passphrase prompt (passblk).
* support tooling for disk encryption (dektool, dmcrypt).
- no fsck for any file system yet.

* process supervision suite (svhub, reboot).

* udev event monitor (udevmod).
* syslogd and related tools.
* non-privileged mount service (mountd, pmount).
* controlled privilege escalation service (suhub, sudo)

* VT/DRI/input multiplexer (vtmux)
* simple non-graphical greeter (ctrlvt).

* network interface monitor (ifmon)
* DHCP client (dhcp)
* Wi-Fi client and connection manager (wsupp) [WPA2-PSK only]
* manual interface setup tools (ip4cfg, ip4info) [incomplete]
- no sntpd yet.

* simple interactive shell (cmd).
* basic command line tools (cat, ls, du, df etc).
* small linux-specific tools (systime, sync, dmesg etc).

- no package manager / download tool yet.
- no audio tools of any kind.

With everything in place, the system should boot on kernel and minibase alone
to the point where it can run X or Wayland GUI, establish internet connection
and start downloading packages.

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 13562
Location: Gatineau (Qc), Canada

PostPosted: Mon 28 Jan 2019, 17:57    Post subject:  

Hi, sc0ttman.

Interesting. Is this entirely your own work or have you been putting together
progs from other people?

The above is not meant negatively. IMO, "arrangers" should get as much
respect as "composers". (E.g. the name of jazzman Gil Evans comes to mind.)

Keep up the good work.

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3222
Location: The Blue Marble

PostPosted: Fri 01 Feb 2019, 10:01    Post subject:    

Good find Scott. Thanks.
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8830
Location: Perth, Western Australia

PostPosted: Sat 02 Feb 2019, 21:40    Post subject:  

sc0ttman,
Thanks from me too. Looks really interesting, have added it to my check-this-out list.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8830
Location: Perth, Western Australia

PostPosted: Fri 08 Feb 2019, 20:07    Post subject:  

I have started to check it out. Have got as far as setting up with the ethernet utilities:

http://bkhome.org/news/201902/basic-ethernet-setup-with-minibase.html

...a first go, might have to modify the scripts. But, looks real good.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1480
Location: Ukraine

PostPosted: Sat 09 Feb 2019, 08:35    Post subject:  

Dear Scott,

What a nice find. Thanks. I am also looking at this and see potential.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8830
Location: Perth, Western Australia

PostPosted: Wed 20 Feb 2019, 19:43    Post subject:  

The minibase network utilities are in the latest release of EasyOS, version 1.0.8, given the name "UltraSNS" (Ultra Simple Network Setup):

http://bkhome.org/news/201902/easyos-x8664-version-108-released.html

And I have written some notes if anyone feels motivated to port UltrsSNS to Puppy Linux, or a derivative:

http://bkhome.org/news/201902/notes-for-porting-ultrasns-to-puppy-linux.html

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Leon

Joined: 22 Jun 2005
Posts: 255

PostPosted: Thu 21 Feb 2019, 19:27    Post subject: Ultra Simple Network Setup for Quirky Beaver 8.7.1  

BarryK wrote:
The minibase network utilities are in the latest release of EasyOS, version 1.0.8, given the name "UltraSNS" (Ultra Simple Network Setup):

http://bkhome.org/news/201902/easyos-x8664-version-108-released.html

And I have written some notes if anyone feels motivated to port UltrsSNS to Puppy Linux, or a derivative:

http://bkhome.org/news/201902/notes-for-porting-ultrasns-to-puppy-linux.html

Congratulation an thank you for UltraSNS and the instructions.

I made a pet package to install UltraSNS in Quirky Beaver 8.7.1.

After installing the pet I successfully established a working wired and wireless internet connection by using UltraSNS.

I like the encrypted password for wireless connection.
UltraSNS-0.1-qb871.pet
Description  Ultra Simple Network Setup for Quirky Beaver 8.7.1
pet

 Download 
Filename  UltraSNS-0.1-qb871.pet 
Filesize  65.12 KB 
Downloaded  6 Time(s) 
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8830
Location: Perth, Western Australia

PostPosted: Yesterday, at 21:25    Post subject: Re: Ultra Simple Network Setup for Quirky Beaver 8.7.1  

[quote="Leon"]
BarryK wrote:
I made a pet package to install UltraSNS in Quirky Beaver 8.7.1.


Great!

I have received a pm, how can UltraSNS handle a static LAN? Fixed IP addresses.

I don't know, presume that /etc/net/mode-lan0 would have to be edited -- currently it just does this:

Code:
#!/bin/sh
echo "+++ mode-lan0 $1"
ifconfig $1 up
ifctl $1 auto-dhcp


...that last line causes dhcp, the DHCP client, to run. Which, effectively is just like we would do if using dhcpcd:

Code:
ifconfig $1 up
dhcpcd $1


...but, don't try to do this with USNS daemons running, as dhcp and dhcpcd will clash.

I have never setup a static LAN, and can't think of the steps, but the info could be found.

There is documentation on the minibase utilities:

http://distro.ibiblio.org/easyos/amd64/packages/pet/pet_packages-pyro/minibase-net_DOC-20190218-p1-amd64.pet

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
rufwoof

Joined: 24 Feb 2014
Posts: 2823

PostPosted: Yesterday, at 22:59    Post subject: Re: Ultra Simple Network Setup for Quirky Beaver 8.7.1  

BarryK wrote:
I have never setup a static LAN, and can't think of the steps, but the info could be found.

This is what I've used, taking your kernel and initrd, editing init to leave the top bit (mounts etc.), striping out the middle bit (Easy stuff), and dropping in at the bottom (instead of the switch-root parts) ...
Code:
echo "nameserver 192.168.1.2" >/etc/resolv.conf

echo "127.0.0.1 localhost EASYPC18131" >/etc/hosts

mkdir -p /etc/network
echo "auto lo" >/etc/network/interfaces
echo "iface lo inet loopback" >>/etc/network/interfaces
echo "#auto eth0" >>/etc/network/interfaces
echo "#iface eth0 inet dhcp" >>/etc/network/interfaces
echo "iface eth0 inet static" >>/etc/network/interfaces
echo "address 192.168.1.4" >>/etc/network/interfaces
echo "netmask 255.255.255.0" >>/etc/network/interfaces
echo "network 192.168.1.0" >>/etc/network/interfaces
#echo "broadcast 192.168.1.255" >>/etc/network/interfaces
echo "broadcast 0.0.0.0" >>/etc/network/interfaces
echo "gateway 192.168.1.2" >>/etc/network/interfaces
#echo "post-up iptables-restore </etc/iptables.up.rules"
echo "dns-nameservers 192.168.1.4 192.168.1.2" >>/etc/network/interfaces

mkdir -p /etc/NetworkManager
echo "[ipupdown]" >/etc/NetworkManager/NetworkManager.conf
echo "managed=true" >>/etc/NetworkManager/NetworkManager.conf

mkdir -p /var/run/network # needed by ifup
# dmesg on my system indicates sky2 for Ethernet
modprobe sky2
#udevadm trigger
#udevadm settle
ifup eth0

/etc/net/dhcp-dns      # dns

echo "#!/bin/sh" >/capdrop
echo "capsh --drop=cap_sys_chroot --chroot=/ --" >>/capdrop
chmod +x /capdrop
setsid cttyhack /capdrop
while :; do
   /bin/busybox sh
done

14MB combined initrd.gz and vmlinuz after stripping out pretty much all other firmware/modules/drivers to just leave my sky2 hardwired eth0. Messing around with that - creating html documents manually using mc editor, and viewing them using lynx. Tested the download speed and it pulled down a 350MB Bionicpup iso in 40 seconds, so reasonable enough.

That's for dhcp using a static IP (my PC is set to a fixed IP (.4) in the ISP's router (.2 ... which I found by using peasy lan scanner set to port 80 i.e. the routers admin login html page. HardInfo menu option is another great tool for discovering things). The very last bit of that is just me messing around, having compiled/installed lynx I've opted to look at some isolation - hence the capsh bits and pieces (early stages, more ideally it would set up a chroot directory so the main system could mount sda3 or whatever, to a mount point outside of the chroot (making it inaccessible inside the chroot)). A interesting bit is the setsid cttyhack code, where more usually you might run setsid cttyhack sh .. which creates a child shell that gets you out of pid 0 and rids you of the "tty job control disabled" complaints that otherwise prevent running capsh. But I digress, the code above that is indicative of one way to set up a static connection. Not sure its the right way though (but it works for me).

_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Misc
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0639s ][ Queries: 13 (0.0114s) ][ GZIP on ]