User Controls
Questions;distro configs, backups & bootstrapping.[Tropical Thread]
-
2020-04-28 at 11:17 AM UTCMaybe this is a bit of a silly question, i haven't looked into this much but i was wondering if there is a way to fully install and configure a distro the good old fashioned way. Then make an image of that distro complete with all configs, data and utils installed that could serve as installation media, for when i want to install that distro on another box? Or maybe use it as a backup, so that if i go for a re-install all the most important stuff will be automatically installed with the distro from the image or 'snapshot' if you will, i made from the original?
If there isn't i am sure i could save the data on an external HDD, and use a bootstrapping script to set everything up in the way i had before, but if i can do this in one step that would be better.
Now veering into some more difficult territory for me personally. Would it on the other hand be possible for me to take say an ISO image of an Ubuntu derivative, mount it, and add some sort of script or program that would run something akin to a bootstrapping script but as part of the regular installation process?
Building an LFS distro is on my bucket list but i haven't gotten around to it. I imagine if i was familiar with doing so i'd know the answers to these questions myself, but for the time being advice on the subject as a whole or in particular would be greatly appreciated.
One way of getting around too much BS that i did think of was just setting up my 'Mission Critical' data, utilities and configuration in a Docker image. Not only would that allow me to have multiple options, such as having a Docker for tools related to forensics, having one primarily for OffSec, having one for development and so on. I think it's possible to set a Docker image up in the way that it can directly interact with the host machine, so running tools through Docker and saving output to the host, or perhaps running something like DNSCrypt-Proxy from a Docker image that sets up the config for the entire box, instead of being confined to the Docker image itself.
I might do that anyway, just because it seems like a good idea. I've recently gotten more and more into Docker images, and it seems ideal for basically grafting an in-depth configuration unto a skeleton distro. Without any dependency issues and such.
Anyway i'd love to hear you guys' thoughts and ideas on this so thank you very much in advance. -
2020-04-28 at 11:19 AM UTCI always wondered about copying an OS installation and installing it on another machine.
I think when you install an or it's configured specifically to the machine and would be incompatible with another computer. -
2020-04-28 at 11:32 AM UTC
Originally posted by Hikikomori-Fujoshi I always wondered about copying an OS installation and installing it on another machine.
I think when you install an or it's configured specifically to the machine and would be incompatible with another computer.
It certainly is the case with Windows as far as i know. But it might be possible to create new installation media from all the data on a configured distro. If it's not straightforward, i am determined to find out how i might achieve this in the best possible way, if it's feasible. If it's not feasible i would use it for backups for re-installing on the same box.
Then for portability, add a bootstrapping script, or Docker images, or a combination of sorts that will let me achieve this in some form or another. -
2020-04-28 at 11:36 AM UTCAs a side-note. Having different Docker images ready for deployment is a good way to compartmentalize functionality, and if the Docker image is not fully integrated with the host machine it might be a good way of securing the host, from any shenanigans that transpire within the Docker image.
I think it has great potential, it would be like slotting in a different module ontop of your regular distro, you get the functionality you want, and slot in another one for different functionality.
I may even set up a VPS as a docker cluster and repository. Allowing me to SSH in, perform actions on the VPS that will be facilitated through the cluster, or downloading an image i want, but that's a topic for another thread. -
2020-04-28 at 12:33 PM UTCEasiest way is just to dd the entire drive onto a USB stick
-
2020-04-28 at 12:34 PM UTCthough you'd have to boot from another OS, I don't think you can clone an OS you're currently running
-
2020-04-28 at 12:59 PM UTC
Originally posted by aldra Easiest way is just to dd the entire drive onto a USB stick
That would just copy all the data including boot record , filesystems and such to the USB stick right? So if i were to do that and then format the drive on the target box and dd everything to the HDD there, it should run as if the Distro was just installed to that hdd right? -
2020-05-01 at 10:40 PM UTCWell if you were looking for something a little more robust/intensive you could check out Nix/NixOS. It has a declarative approach to package management, so you more or less write a definition file for your OS and can rebuild it as necessary. I admit, I haven't tried it but love the idea, it gets a lot of discussion on a tech forum I'm on and I've been meaning to try it out.
The way I've been doing it in the past is just a little git repo with my config files and a script that installs my usual junk and links the config to the right places. It works but package breakage happens so often that I always end up having to edit _something_ on a new machine, but at least it serves as a reminder of what I need to do. -
2020-05-04 at 8:20 AM UTC
Originally posted by Lanny Well if you were looking for something a little more robust/intensive you could check out Nix/NixOS. It has a declarative approach to package management, so you more or less write a definition file for your OS and can rebuild it as necessary. I admit, I haven't tried it but love the idea, it gets a lot of discussion on a tech forum I'm on and I've been meaning to try it out.
The way I've been doing it in the past is just a little git repo with my config files and a script that installs my usual junk and links the config to the right places. It works but package breakage happens so often that I always end up having to edit _something_ on a new machine, but at least it serves as a reminder of what I need to do.
You know what, i might just get NixOS. I managed to murder a distro the other day becaus i'm the type of nigga that hacks his own box to see what will happen and then go suprised_pickachu_face.png when something critical breaks. It's a bad habit i know. And i am going to stop it because i expanded my network and got a new box just to fuck with and break, would be great to have some sort way to quickly reset that. I could use VM's of course and on occasion i do, but this box i got was dirt cheap and thus it doesn't have the resources required to host dedicated VMs. I am looking to buy a server though to have in my physical possession where i will host multiple VMs and/or a Docker Swarm/Cluster.
As a side note, i am always looking for a better distro to use on my main box. Pntesting distro is a bad idea for multiple reasons but one of the main reasons for me at least is that it's usually just some extended stable release bullshit where a ton of stuff is outdated and you just have a bunch of tools installed on top of that. I want something up to date, stable and secure from the get go, then as you said use a solution such as NixOS has to automate all the boring stuff with a config file.
That would be great, i will download NixOS and give it a go, i can report back on my experience if you're interested.