The officially official Devuan Forum!

You are not logged in.

#1 2017-08-18 19:56:50

alluredbit
Member
From: Chicago, IL
Registered: 2017-08-18
Posts: 24  
Website

A Better Reduce for Devuan?

The Debian forum at https://wiki.debian.org/ReduceDebian has some info about all the stuff could be cut, but the few times I tried getting rid of them did not end well.

I suspect the entire list does not mount to much savings in storage and mips, but I could be wrong. Does it worth paying attention to this, and keep trying? I would like to place the list in a script and run it through all the vbox images I am going to build if there is measurable benefit to it.


start.webtechbazaar.com
Describe whats important, what seldom or never change - then give it away!

Offline

#2 2017-08-18 23:01:46

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: A Better Reduce for Devuan?

Wow. I have not seen that page before. That is extreme. Just how small do you need it to be? For most people's needs, you can start with a minimal install and add just what you want.

Here's dev1fanboy's minimal install guide. This is kind of at the other extreme. Either way will be a learning experience.

Here's the easy method:
-  uncheck stuff at the tasksel window during installation. Some people like to un-check everything. I like to keep Standard system utilities checked.
- after install, start adding what you want.
- don't install recommends (apt-get --no-install-recommends install <packages> or aptitude -R install <packages>)
- don't install anything with 'task-' in the name. Avoid metapackages in general.

I'm not the expert on minimal installs here. Others can offer more specific information and/or help with problems you run into.

Offline

#3 2017-08-18 23:29:29

alluredbit
Member
From: Chicago, IL
Registered: 2017-08-18
Posts: 24  
Website

Re: A Better Reduce for Devuan?

I auto install my boxes with preseed to the default minimal, then I run this script:

#!/bin/bash
# ###
#
sudo apt-get update
#
sudo apt-get -y install mysql-server mysql-client
sudo systemctl restart mysql.service
#
sudo apt-get -y install php5-common libapache2-mod-php5 php5-cli
sudo apt-get -y install mcrypt
sudo systemctl restart apache2
#
sudo apt-get -y install phpmyadmin
#
sudo sh -c 'echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list'
sudo wget -qO - http://www.webmin.com/jcameron-key.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install webmin
#
sudo apt-get clean
sudo apt-get -y autoremove

This is for Jessie as I need the php5 stuff still, and of course there is 'service'. I am going to start working on Devuan installs soon and rework this script.

By the way, the last time I ran this scrip on a Devuan 1.0 virtualbox image all worked except Webmin, but I remember reading something about that being resolved by the good people there.

I am going to try and create a list similar to the one on Debian, because it might be extreme but there are also a lot of stuff there nobody needs anymore. I cant remember the last time I saw a modem LOL


start.webtechbazaar.com
Describe whats important, what seldom or never change - then give it away!

Offline

#4 2017-08-19 08:28:01

FOSSuser
Member
From: Surrey/Hants border UK
Registered: 2016-12-11
Posts: 167  

Re: A Better Reduce for Devuan?

It's not that long ago that I was using a modem, just about 7 years ago in fact, & I'm in the UK. So, whilst you may think it superflous, others may not.
Some countries, I believe have very poor internet structure, & a modem may be their only means of connecting.
(Also, don't some admins still use a modem to connect to their servers?)

Offline

#5 2017-08-19 14:15:15

alluredbit
Member
From: Chicago, IL
Registered: 2017-08-18
Posts: 24  
Website

Re: A Better Reduce for Devuan?

The modem was just an example of something that is part of the minimal install, and it is currently recommnended to be removed by Reduce. It could be added and removed with apt anytime.

  When we consider Devuan's bithdate there is a lot of legacy stuff already. Other distros may extend back all the way to the days of 386, whie Devuan was born in the Cloud already and the farthest back is Pentium. It seems logical that legacy stuff to be optional, not default.

  This might be like to the Itanium stuff in Windows, every time someone configures a WSUS server there is that list of Itanium stuff recommended to be Declined. Of course someone else might come allong and say "Put that back, we just bought a bunch of those. we are going to install Windows XP 64-bit on them to replace the ones on our production floor". No doubt it could happen. Industrial stuff especially keep lingering on and never seem to become obsolete.

  I guess one of the reasons besides space and mips savings for Reduce could be just to avoid that extra code which could by chance bring a server down or open the door to an attack. Both also very unlikely, but again there is a chance.

  My personal reasons for posting about this is the virtual stuff. VirtualBox is providing a lot of the facilities for each instance, and the minimal install could be very different for a VritualBox install from a bare-metal or another hypervisor install. I work with full OS images, as my virtualbox instances are models of real-world scenarios. Each VirtualBox maybe moved to another computer and provisioned the full resource pool there, or scaled back and shared with a number of other images on one machine. Once all is working fine the virtual is replaced with a real box.

  There might be scenarios where Virtualbox images are used for production, but my guess is they are used more in testing and educational context. A more recent distribution like Devuan could implement a bit of a house-cleaning in this area, and support cleaner and leaner virtual installations better than other distros.


start.webtechbazaar.com
Describe whats important, what seldom or never change - then give it away!

Offline

#6 2017-08-25 17:47:45

alluredbit
Member
From: Chicago, IL
Registered: 2017-08-18
Posts: 24  
Website

Re: A Better Reduce for Devuan?

I tested a few automated Devuan VirtualBox installs with this script.

d-i debian-installer/locale string en_US
d-i keyboard-configuration/xkb-keymap select us
d-i netcfg/choose_interface select auto
d-i mirror/protocol string http
d-i mirror/country string us
d-i mirror/http/hostname string auto.mirror.devuan.org
d-i mirror/http/directory string /merged
#d-i mirror/http/proxy http://192.168.1.2:3142
d-i passwd/root-login boolean false
d-i passwd/user-fullname string Tom Thumb
d-i passwd/username string tom
d-i passwd/user-password password tom2mot
d-i passwd/user-password-again password tom2mot
d-i clock-setup/utc boolean true
d-i time/zone string US/Central
d-i clock-setup/ntp boolean true
d-i clock-setup/ntp-server string pool.ntp.org
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/mount_style select uuid
d-i base-installer/kernel/image string linux-image-amd64
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
#d-i apt-setup/services-select multiselect security, updates
#d-i apt-setup/security_host string security.debian.org
tasksel tasksel/first multiselect standard
d-i pkgsel/include string openssh-server
d-i pkgsel/upgrade select safe-upgrade
popularity-contest popularity-contest/participate boolean false
d-i grub-installer/only_devuan boolean true
d-i grub-installer/bootdev  string /dev/sda
d-i finish-install/reboot_in_progress note

It seems to work fine as it did create the user and password. The script is still loading from pulic_html/d-i/jessie/preseed.cfg
Should any part of this script be changed to something else?

Also, I do not know enough about apt-cacher to say this for sure, but it seems to be working. On disk all I see is the Debian depositories nothing Devuan-related, and with base isntalls it is difficult to say...

I am still trying to have a chance to install webmin, as the next step would be to test d-i and make sure the hostnames and the IPs are also automated by a DHCP server. To manually configure DHCP/DNS is just too much work for me as I am no expert.

Anyone has a d-i script or a vagrant box used for base installs, or other advise to help me improve VirtualBox base installs?


start.webtechbazaar.com
Describe whats important, what seldom or never change - then give it away!

Offline

#7 2017-08-25 18:20:36

alluredbit
Member
From: Chicago, IL
Registered: 2017-08-18
Posts: 24  
Website

Re: A Better Reduce for Devuan?

preseed has a lot of control, and I am planning on putting together something where preseed late_command would run the Reduce script, preseed classes would target the full-install type (for LAMP, Tomcat and stuff). From there, DHCP/DNS would control which network the new clients go. LDAP would authenticate users across the networks / Devuan clients. I never used preceed with late_command or with classes, so if you have a quick example please post it.


start.webtechbazaar.com
Describe whats important, what seldom or never change - then give it away!

Offline

#8 2017-08-25 20:11:16

greenjeans
Member
Registered: 2017-04-07
Posts: 543  
Website

Re: A Better Reduce for Devuan?

Well proud to say that I have already eliminated a whole lotta stuff on that Debian list from the link in the first post from my stuff, but there's a few things on there I guarantee will break some installs.

I have a LAMP server iso somewhere in my files that a guy custom built from Puppy linux packages way back in the day, like a 40 mb iso and it's actually still running a small home server at a friend's house. That's as small as i've seen a system that would run a server.

How small are you shooting for with your Devuan project?


https://sourceforge.net/projects/vuu-do/
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.

Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#9 2017-08-25 22:15:51

alluredbit
Member
From: Chicago, IL
Registered: 2017-08-18
Posts: 24  
Website

Re: A Better Reduce for Devuan?

What I could use is examples to build and configure the virtual boxes. I am hoping someone already put some work into a vagrant base box, or has preseed cfg files on the web I can use.
Eventually I am going to work my way through this page https://wiki.debian.org/DebianInstaller, but again that is for Debian. When things break I need to test both Debian and Devuan to be able to tell if the error is in my cfg file or it is due to deviation between the two OS. Eventually most of the errors are going to be deviations, but as of right now my preceed files are pretty basic and full of errors.

With preseed I actually need to finish the installation and boot to the box to tell if the script worked. In some cases the install is going to finish, without any errors. I think preseed breaks only over critical errors - no network, bad mirror address and such, otherwise it grabs some default values where the ones in preseed are invalid or missing. Not something anyone would want, obviously. so I wish preceed would stop the installation when there is any issue.

The most time-consuming is to make DHCP / DNS work, and that is where, I assume, a vagrant base could be of some help. Not perfect for my use though, Vagrant requires the first network card to be NAT - which is not what I want. I want internal network so all virtual interfaces are exposed via kernel routing and IP masquerading. Again, I currently have this on Debian. It is the most time consuming, because when there is any error in the stack of parameters the new install is going to boot to a random hostname with a random IP - and that is not what I want. I want the hostname and the IP that is assigned to the MAC, every time the box is rebuilt.

Manual configuration is not helping me since the purpose of my project is to automate the most. I have a plan but I have little time to play as this is not what I do for living. I really like Bitnami and my idea is about the same, except the Bitnami 'product' is still heavy binaries. I much prefer typing a few commands, and the box is automatically built and configured. mostly from cache on my network. On a box with i5 and RAID 10 I should be able to build 5 base Devuan clients concurrently, with LAMP and Joomla! installed in less than 5 minutes.

This is all talk at this point, I have a lot of work to do until I have something to show.


start.webtechbazaar.com
Describe whats important, what seldom or never change - then give it away!

Offline

#10 2017-08-25 22:37:46

greenjeans
Member
Registered: 2017-04-07
Posts: 543  
Website

Re: A Better Reduce for Devuan?

Dang, kinda sounds like the hardest way possible to do what you are trying to do and the most difficult way to build Devuan, have you thought about just making yourself a nice little basic install iso with Refractasnapshot?

alluredbit wrote:

What I could use is examples to build and configure the virtual boxes. I am hoping someone already put some work into a vagrant base box, or has preseed cfg files on the web I can use.
Eventually I am going to work my way through this page https://wiki.debian.org/DebianInstaller, but again that is for Debian. When things break I need to test both Debian and Devuan to be able to tell if the error is in my cfg file or it is due to deviation between the two OS. Eventually most of the errors are going to be deviations, but as of right now my preceed files are pretty basic and full of errors.

With preseed I actually need to finish the installation and boot to the box to tell if the script worked. In some cases the install is going to finish, without any errors. I think preseed breaks only over critical errors - no network, bad mirror address and such, otherwise it grabs some default values where the ones in preseed are invalid or missing. Not something anyone would want, obviously. so I wish preceed would stop the installation when there is any issue.

The most time-consuming is to make DHCP / DNS work, and that is where, I assume, a vagrant base could be of some help. Not perfect for my use though, Vagrant requires the first network card to be NAT - which is not what I want. I want internal network so all virtual interfaces are exposed via kernel routing and IP masquerading. Again, I currently have this on Debian. It is the most time consuming, because when there is any error in the stack of parameters the new install is going to boot to a random hostname with a random IP - and that is not what I want. I want the hostname and the IP that is assigned to the MAC, every time the box is rebuilt.

Manual configuration is not helping me since the purpose of my project is to automate the most. I have a plan but I have little time to play as this is not what I do for living. I really like Bitnami and my idea is about the same, except the Bitnami 'product' is still heavy binaries. I much prefer typing a few commands, and the box is automatically built and configured. mostly from cache on my network. On a box with i5 and RAID 10 I should be able to build 5 base Devuan clients concurrently, with LAMP and Joomla! installed in less than 5 minutes.

This is all talk at this point, I have a lot of work to do until I have something to show.


https://sourceforge.net/projects/vuu-do/
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.

Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#11 2017-08-25 23:19:37

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: A Better Reduce for Devuan?

Offline

Board footer