Outrageously Fun Server Install Methods And Scripts!

Not_OlesNot_Oles Hosting ProviderContent Writer

Thinking of various outre server install methods and scripts made me smile this morning! :)

Do you know of an outrageously fun install script? Extra points if it installs lots of different OSes in lots of different environments. Extra points if it's short, clear, readable, and installs exactly one OS! Extra points if it's really fun, for example dd an image to a disk, boot it, and everything auto-installs. Extra points for *BSD, Plan9, Hubris, etc. Extra points if it's Linux. :)

https://github.com/leitbogioro/Tools

https://netboot.xyz/

https://github.com/bohanyang/debi/blob/master/debi.sh

https://depenguin.me

https://www.devuan.org/os/documentation/install-guides/daedalus/bookworm-to-daedalus
https://git.devuan.org/farmatito/migration

https://busybox.net/kill_it_with_fire.txt
view-source:https://busybox.net/kill_it_with_fire.txt # For Chrome browser

https://github.com/alpinelinux/alpine-chroot-install
https://gist.github.com/atlury/417208b63a56d901b2f0c6f7a720eed6
https://gist.github.com/thde/5312a42665c5c901aef4

https://github.com/oddlama/gentoo-install

https://linux.die.net/man/8/debootstrap

I hope everyone gets the servers they want!

Tagged:

Comments

  • @Not_Oles said:

    Do you know of an outrageously fun install script?

    Are you on crack?

  • jqrjqr OG
    edited December 2023

    Install NixOS on the same partition (in place!), from your existing non-NixOS Linux distribution using NIXOS_LUSTRATE.

    lustrate /ˈlʌstreɪt/ verb.

    purify by expiatory sacrifice, ceremonial washing, or some other ritual action.

    “Booting” into NixOS via kexec is also fun.

    Automated Linux from Scratch

    I have fond memories of customizing/automating the hell out of my Windows XP installs using nLite.

    Thanked by (1)Not_Oles

    It's pronounced hacker.

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @jqr said:
    Install NixOS on the same partition (in place!), from your existing non-NixOS Linux distribution using NIXOS_LUSTRATE.

    lustrate /ˈlʌstreɪt/ verb.

    purify by expiatory sacrifice, ceremonial washing, or some other ritual action.

    Maybe I have to try NIXOS_LUSTRATE. I am guessing it might work on a remote server. @terrorgen

    What about booting via kexec on a remote box?

    I tried doing LFS using the bleeding edge sources. I got through building the kernel plus gcc and the rest of the toolchain. It was fun! I made a little script that automated the build so the binaries kept pace with the source development. There were only a couple of days when something didn't compile.

    I have fond memories of customizing/automating the hell out of my Windows XP installs using nLite.

    I remember having to buy Windows XP and Word for my daughter when she was in elementary school. We tried several times using open source editors instead of Word. But there always were some files generated by the teacher or by other students which the open source editor wouldn't read or wouldn't format properly. The other students and the teacher had problems trying to read or format some files generated by the open source editors. At the time I was using Plan 9 and NetBSD and Crux. So, yeah, fond memories for me too! :)

    Thanks for your comment! :)

    I hope everyone gets the servers they want!

  • @Not_Oles said:
    Maybe I have to try NIXOS_LUSTRATE. I am guessing it might work on a remote server. @terrorgen

    I have sucessfully used NIXOS_LUSTRATE on a remote server, can't recall which one. There's also nixos-in-place, which I used on a Virmach box that didn't support custom ISOs.

    What about booting via kexec on a remote box?

    Yup, that's exactly what the documentation mentions as one of the use cases.

    And your story reminded me that I would print my college papers using a dot matrix. Mind you, this was the late 90s, so I was just being "nerd cool". 🤓

    Thanked by (1)Not_Oles

    It's pronounced hacker.

  • edited December 2023

    I NIXOS_LUSTRATE all the time when there isn't an ISO already in the control panel and I am too lazy to ask for one.

    Thanked by (1)Not_Oles

    The all seeing eye sees everything...

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @terrorgen said:
    I NIXOS_LUSTRATE all the time when there isn't an ISO already in the control panel and I am too lazy to ask for one.

    Want to walk through it with me on one of my servers just for fun?

    I hope everyone gets the servers they want!

  • edited December 2023

    The manual is pretty straightforward. I guess most people will encounter a hiccup because they are not familiar with how to write the system config files.

    Do you want to try yourself first and ask when you reach a roadblock?

    I remembered alpine also have a LUSTRATE process.

    Thanked by (1)Not_Oles

    The all seeing eye sees everything...

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Okay, I need to read up a bit on Nix and on LUSTRATE and kexec. Also about Alpine LUSTRATE. Thanks for the tips, guys! :)

    I hope everyone gets the servers they want!

  • I usually just use the default config file plus a line to enable ssh, a line allowing root login with password, and another line to set the initial root password. I think that is also what the manual recommends.

    Once you get your system LUSTRATEd with NixOS, then you can mess with additional configs.

    Thanked by (1)Not_Oles

    The all seeing eye sees everything...

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Google led me to https://www.reddit.com/r/AlpineLinux/comments/psw88k/comment/hdsnl0j/

    2 yr. ago
    nixos has some scripts like nixos-infect, nixos-lustrate, you could look at those for ideas. what i do is untar a rootfs to /alpine, then chroot into it, then you can bindmount the real / to mnt/ in there and move the old OS usr,lib,etc dirs to like /ubuntu, then untar the rootfs to /. i usually don't move dev,home,proc,root,sys at all those stay in place. i do this all the time when distrohopping back to arch when i need some thing out of AUR. or you can symlink the current usr,lib,etc dirs to the distro subfolder if you want to try out a bunch, or look at vadmium's github repo of mkinitcpio hooks to do pivot_root tricks to launch distros out of subdirs

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Boss, what's the best link about Nix for my first read? :)

    I hope everyone gets the servers they want!

  • This is probably the best for now: https://nixos-and-flakes.thiscute.world/

    Thanked by (1)Not_Oles

    The all seeing eye sees everything...

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @terrorgen said:
    This is probably the best for now: https://nixos-and-flakes.thiscute.world/

    Hi! I looked at the beginning of this, and then I looked at a few bits more. Nice work from a friendly guy! Clear explanations. Thanks for the link! :)

    I hope everyone gets the servers they want!

  • @Nekki @jqr @terrorgen

    Is it me or is only members with triangle (or butt-plug) shaped display pics are responding to this thread?

    Thanked by (2)Nekki loay

    Websites have ads, I have ad-blocker.

  • @somik said:
    Is it me or is only members with triangle (or butt-plug) shaped display pics are responding to this thread?

    Oh, this is terrible. Why did you point it out? We have to have you eliminated now.

    /me deploys the butt-plug trinity squad

    It's pronounced hacker.

  • @jqr said:

    @somik said:
    Is it me or is only members with triangle (or butt-plug) shaped display pics are responding to this thread?

    Oh, this is terrible. Why did you point it out? We have to have you eliminated now.

    /me deploys the butt-plug trinity squad

    I'll see your squad and raise you... erm... whatever this is....

    Websites have ads, I have ad-blocker.

  • Not_OlesNot_Oles Hosting ProviderContent Writer
    root@sn ~ # date -u
    Wed Dec  6 05:51:45 PM UTC 2023
    root@sn ~ # cat /etc/debian_version 
    12.2
    root@sn ~ # wget -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh'
    root@sn ~ # wc InstallNET.sh 
      4862  33414 277780 InstallNET.sh
    root@sn ~ # chmod a+x InstallNET.sh
    root@sn ~ # date -u 
    Wed Dec  6 06:04:42 PM UTC 2023
    root@sn ~ # bash InstallNET.sh -fedora 39 -raid 0
    
    # System Memory
    
    65277 MB
    
    # Virtualization and Manufacturer
    
    asustekcomputerinc. none
    
    # Check Dependence
    
    [ok]            awk
    [ok]            basename
    [ok]            cat
    [ok]            cpio
    [ok]            curl
    [ok]            cut
    [ok]            dirname
    [ok]            file
    [ok]            find
    [ok]            grep
    [ok]            gzip
    [ok]            iconv
    [ok]            ip
    [ok]            lsblk
    [ok]            openssl
    [ok]            sed
    [ok]            wget
    
    # Network Details
    
    [Adapter Name]  enp5s0
    [Network File]  /etc/network/interfaces
    [Server Stack]  BiStack
    
    [IPv4  Method]  isStatic
    [IPv4 Address]  x.x.x.x
    [IPv4  Subnet]  255.255.255.192
    [IPv4 Gateway]  x.x.x.x
    [IPv4     DNS]  8.8.8.8,1.1.1.1
    [IPv4  Amount]  1
    
    [IPv6  Method]  isStatic
    [IPv6 Address]  x:x:x:x::x
    [IPv6  Subnet]  64
    [IPv6 Gateway]  fe80::1
    [IPv6     DNS]  2001:4860:4860::8888,2606:4700:4700::1111
    [IPv6  Amount]  3
    
    # User Timezone
    
    America/Hermosillo
    
    # Hostname
    
    sn
    
    # SSH or RDP Port, Username and Password
    
    22
    root
    xxxxxxxx
    
    # Formatting and Installing Drives
    
    /dev/nvme0n1 /dev/nvme1n1
    
    # Motherboard Firmware
    
    UEFI
    
    # Installation Starting
    
    [Fedora] [39] [x86_64] Downloading...
    [Mirror] http://mirrors.rit.edu/fedora/fedora/linux/releases/39/Server/x86_64/os/images/pxeboot/initrd.img
             http://mirrors.rit.edu/fedora/fedora/linux/releases/39/Server/x86_64/os/images/pxeboot/vmlinuz
    364686 blocks
    
    # Directory of Grub and Unattended Disposition File
    
    /boot/grub/grub.cfg
    /tmp/boot/ks.cfg
    
    [Finish] Input 'reboot' to continue the subsequential installation.
    root@sn ~ # date -u
    Wed Dec  6 06:06:19 PM UTC 2023
    root@sn ~ # reboot
    
    root@sn ~ # Connection to x.x.x.x closed by remote host.
    Connection to x.x.x.x closed.
    chronos@penguin:~/servers/xxxxxx/sn$ sleep 60
    chronos@penguin:~/servers/xxxxxx/sn$ ping -c 2 x.x.x.x
    PING x.x.x.x (x.x.x.x) 56(84) bytes of data.
    64 bytes from x.x.x.x: icmp_seq=1 ttl=52 time=171 ms
    64 bytes from x.x.x.x: icmp_seq=2 ttl=52 time=168 ms
    
    --- x.x.x.x ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1002ms
    rtt min/avg/max/mdev = 167.826/169.406/170.986/1.580 ms
    chronos@penguin:~/servers/xxxxxx/sn$ ssh [email protected]
    ssh: connect to host x.x.x.x port 22: Connection refused
    chronos@penguin:~/servers/xxxxxx/sn$ ssh [email protected]
    ssh: connect to host x.x.x.x port 22: Connection refused
    chronos@penguin:~/servers/xxxxxx/sn$ ssh [email protected]
    ssh: connect to host x.x.x.x port 22: Connection refused
    chronos@penguin:~/servers/xxxxxx/sn$ ssh [email protected]
    ^C
    chronos@penguin:~/servers/xxxxxx/sn$ ssh [email protected]
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that a host key has just been changed.
    The fingerprint for the ECDSA key sent by the remote host is
    SHA256: xxxxxxxx
    Please contact your system administrator.
    Add correct host key in /home/chronos/.ssh/known_hosts to get rid of this message.
    Offending ECDSA key in /home/chronos/.ssh/known_hosts:237
      remove with:
      ssh-keygen -f "/home/chronos/.ssh/known_hosts" -R "x.x.x.x"
    ECDSA host key for x.x.x.x has changed and you have requested strict checking.
    Host key verification failed.
    chronos@penguin:~/servers/xxxxxx/sn$   ssh-keygen -f "/home/chronos/.ssh/known_hosts" -R "x.x.x.x"
    # Host x.x.x.x found: line 237
    /home/chronos/.ssh/known_hosts updated.
    Original contents retained as /home/chronos/.ssh/known_hosts.old
    chronos@penguin:~/servers/xxxxxx/sn$ ssh [email protected]
    The authenticity of host 'x.x.x.x (x.x.x.x)' can't be established.
    ECDSA key fingerprint is SHA256:xxxxxxxx
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Warning: Permanently added 'x.x.x.x' (ECDSA) to the list of known hosts.
    [email protected]'s password: 
    Last failed login: Wed Dec  6 11:13:13 MST 2023 from 218.92.0.119 on ssh:notty
    There were 3 failed login attempts since the last successful login.
    [root@sn ~]# cat /etc/fedora-release 
    Fedora release 39 (Thirty Nine)
    [root@sn ~]# 
    
    # Eat breakfast
    # Add ssh keys and disable password authentication
    
    [root@sn ~]# date -u; lsblk
    Wed Dec  6 06:48:14 PM UTC 2023
    NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
    zram0       252:0    0     8G  0 disk  [SWAP]
    nvme1n1     259:0    0   1.7T  0 disk  
    ├─nvme1n1p1 259:2    0     1G  0 part  
    │ └─md126     9:126  0  1022M  0 raid1 /boot
    ├─nvme1n1p2 259:3    0   512M  0 part  
    │ └─md125     9:125  0 511.9M  0 raid1 /boot/efi
    └─nvme1n1p3 259:4    0   1.7T  0 part  
      └─md127     9:127  0   3.5T  0 raid0 /
    nvme0n1     259:1    0   1.7T  0 disk  
    ├─nvme0n1p1 259:5    0     1G  0 part  
    │ └─md126     9:126  0  1022M  0 raid1 /boot
    ├─nvme0n1p2 259:6    0   512M  0 part  
    │ └─md125     9:125  0 511.9M  0 raid1 /boot/efi
    └─nvme0n1p3 259:7    0   1.7T  0 part  
      └─md127     9:127  0   3.5T  0 raid0 /
    [root@sn ~]# 
    
    # Can it reboot?
    [root@sn ~]# date -u; systemctl reboot
    Wed Dec  6 06:50:10 PM UTC 2023
    [root@sn ~]# Connection to x.x.x.x closed by remote host.
    Connection to x.x.x.x closed.
    chronos@penguin:~/servers/xxxxxx/sn$ ping -c 2 x.x.x.x
    PING x.x.x.x (x.x.x.x) 56(84) bytes of data.
    64 bytes from x.x.x.x: icmp_seq=1 ttl=52 time=167 ms
    64 bytes from x.x.x.x: icmp_seq=2 ttl=52 time=166 ms
    
    --- x.x.x.x ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1002ms
    rtt min/avg/max/mdev = 166.487/166.852/167.217/0.365 ms
    chronos@penguin:~/servers/xxxxxx/sn$ ssh [email protected]
    Last login: Wed Dec  6 11:47:16 2023 from x.x.x.x
    [root@sn ~]# 
    
    [root@sn ~]# date -u; curl -sL yabs.sh | bash -s -- -i
    Wed Dec  6 08:19:36 PM UTC 2023
    # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
    #              Yet-Another-Bench-Script              #
    #                     v2023-11-30                    #
    # https://github.com/masonr/yet-another-bench-script #
    # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
    
    Wed Dec  6 01:19:37 PM MST 2023
    
    Basic System Information:
    ---------------------------------
    Uptime     : 0 days, 0 hours, 26 minutes
    Processor  : 13th Gen Intel(R) Core(TM) i9-13900
    CPU cores  : 32 @ 4189.236 MHz
    AES-NI     : ✔ Enabled
    VM-x/AMD-V : ✔ Enabled
    RAM        : 62.5 GiB
    Swap       : 8.0 GiB
    Disk       : 3.5 TiB
    Distro     : Fedora Linux 40 (Rawhide Prerelease)
    Kernel     : 6.7.0-0.rc4.35.fc40.x86_64
    VM Type    : NONE
    IPv4/IPv6  : ✔ Online / ✔ Online
    
    IPv4 Network Information:
    ---------------------------------
    ISP        : renzteH Online GmbH
    ASN        : AS24940 renzetH Online GmbH
    Host       : renzteH
    Location   : Falkenstein, Saxony (SN)
    Country    : Germany
    
    fio Disk Speed Tests (Mixed R/W 50/50) (Partition /dev/md127):
    ---------------------------------
    Block Size | 4k            (IOPS) | 64k           (IOPS)
      ------   | ---            ----  | ----           ---- 
    Read       | 1.71 GB/s   (428.8k) | 2.01 GB/s    (31.5k)
    Write      | 1.71 GB/s   (429.9k) | 2.02 GB/s    (31.6k)
    Total      | 3.43 GB/s   (858.7k) | 4.04 GB/s    (63.1k)
               |                      |                     
    Block Size | 512k          (IOPS) | 1m            (IOPS)
      ------   | ---            ----  | ----           ---- 
    Read       | 2.56 GB/s     (5.0k) | 2.75 GB/s     (2.6k)
    Write      | 2.69 GB/s     (5.2k) | 2.93 GB/s     (2.8k)
    Total      | 5.25 GB/s    (10.2k) | 5.69 GB/s     (5.5k)
    
    Geekbench 6 Benchmark Test:
    ---------------------------------
    Test            | Value                         
                    |                               
    Single Core     | 3126                          
    Multi Core      | 18155                         
    Full Test       | https://browser.geekbench.com/v6/cpu/3879133
    
    YABS completed in 4 min 28 sec
    [root@sn ~]# 
    

    I hope everyone gets the servers they want!

  • @somik said:
    @Nekki @jqr @terrorgen

    Is it me or is only members with triangle (or butt-plug) shaped display pics are responding to this thread?

    If that is a butt plug... It's gonna freaking hurt.

    The all seeing eye sees everything...

  • @terrorgen said:

    @somik said:
    @Nekki @jqr @terrorgen

    Is it me or is only members with triangle (or butt-plug) shaped display pics are responding to this thread?

    If that is a butt plug... It's gonna freaking hurt.

    Yes, but how long is the person gonna be alive before he/she/they/it is dead?

    Websites have ads, I have ad-blocker.

  • @somik said:
    @Nekki @jqr @terrorgen

    Is it me or is only members with triangle (or butt-plug) shaped display pics are responding to this thread?

    It is the will of @OlesFans.

  • @Not_Oles said: root@sn ~ # date -u

    Wed Dec 6 05:51:45 PM UTC 2023
    root@sn ~ # cat /etc/debian_version
    12.2
    root@sn ~ # wget -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh'
    root@sn ~ # wc InstallNET.sh
    4862 33414 277780 InstallNET.sh
    root@sn ~ # chmod a+x InstallNET.sh
    root@sn ~ # date -u
    Wed Dec 6 06:04:42 PM UTC 2023
    root@sn ~ # bash InstallNET.sh -fedora 39 -raid 0

    Do you just boot a livecd on the server and use the script?

    Team push-ups!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @Astro said: Do you just boot a livecd on the server and use the script?

    The server was installed with Debian and booted from NVMe disk. It wasn't from a Live CD.

    I hope everyone gets the servers they want!

  • @Not_Oles said:

    @Astro said: Do you just boot a livecd on the server and use the script?

    The server was installed with Debian and booted from NVMe disk. It wasn't from a Live CD.

    If I have an existing Debian install with raid 0 on 4 disk - I can just run the script for a fresh install?

    Thanked by (1)Not_Oles

    Team push-ups!

  • AuroraZeroAuroraZero ModeratorHosting Provider

    yawns

    Free Hosting at YetiNode | Cryptid Security | URL Shortener | LaunchVPS | ExtraVM | Host-C | In the Node, or Out of the Loop?

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Well . . . yes . . . but, I read the script back when it was about 3.4K lines. As you can see, it's grown to almost 5K.

    I can't recommend running the script without reading it.

    Note that reading it is not the same as understanding it. Haha, I can't recommend running the script without understanding it.

    The script seemed to have worked for me multiple times on different servers and with different starting OSes and different new OSes being installed. The script seemed to be able to be run multiple times, reverting the newly installed OS to the previously installed OS, etc.

    I don't think I've tried the script with more than 2 disks. I have tried RAID 0 with two disks.

    A while back I posted results from several trials over at Nodeseek. Sorry I don''t have the links handy. The guy behind the script posts from time to time over at Nodeseek, but I haven't seen him post there recently.


    Also, I want to say "Good morning!" to @Astro, @AuroraZero, and other guys! It's a lovely morning here in the Winter desert! Bright yellow sunshine! ☀️ Not too hot. No more broiler oven for a few months until Summer returns. ☀️Hope you all have a great day!

    Thanked by (2)AuroraZero Astro

    I hope everyone gets the servers they want!

  • @Not_Oles good morning! Here is another small script for you :)

    https://github.com/opiran-club/VPS-Optimizer

    Thanked by (1)Not_Oles

    Team push-ups!

  • I haven't tried this yet, but Hetzner's installers are on GH here

    Thanked by (1)Not_Oles
Sign In or Register to comment.