LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deployment on a bare metal hardware (https://www.linuxquestions.org/questions/linux-newbie-8/deployment-on-a-bare-metal-hardware-4175693544/)

jayjayjay 04-12-2021 03:46 AM

Deployment on a bare metal hardware
 
Hello All,

Sorry this might be a newbie question, would anyone be able to point me out to resources on how I can deploy an image on a bare metal hardware? The image would contain a linux distro, some additional installed applications. I am looking at being able to deploy without using kvm, esxi, or any other virtualization. would that be possible? or do i have to install manually using some scripts?

hazel 04-12-2021 04:40 AM

Most people here run their Linux on bare hardware! They tend to use virtualisation mainly for a Windows guest to play games on. To install Linux, all you need to do is download an image, burn it onto an optical disc (most modern images need a DVD rather than a CD) or copy it onto a memory stick, and then boot from it. You'll be guided through the process of installation. How much guidance you get depends on the distro. A newbie-oriented distro like Ubuntu or Mint will practically do it all for you.

If you mean running Linux without installing it, again most installation images will run "live" in this way.

jayjayjay 04-12-2021 04:56 AM

Thank you for your response. What I'm particularly looking for is be able to reuse an updated installation image (e.g. ubuntu, plus new os configurations, plus new installed applications) and use the image on multiple bare metal hardware instead of installing the os and adding the os configs and new app installations manually or thru a script. I'm thinking of clonezilla but not sure if this is the appropriate use-case for it. TIA

hazel 04-12-2021 05:08 AM

What about installing it onto a memory stick then? You'd need a fairly large one for a complete installation with lots of applications, but the thing would be updateable just like a hard drive installation. You could carry it about in your pocket and use it on any machine, even a Windows one.

rkelsen 04-12-2021 05:58 AM

Deployment on a bare metal hardware
 
man dd

syg00 04-12-2021 06:38 AM

Quote:

Originally Posted by jayjayjay (Post 6240158)
Thank you for your response. What I'm particularly looking for is be able to reuse an updated installation image (e.g. ubuntu, plus new os configurations, plus new installed applications) and use the image on multiple bare metal hardware instead of installing the os and adding the os configs and new app installations manually or thru a script. I'm thinking of clonezilla but not sure if this is the appropriate use-case for it. TIA

clonezilla is absolutely a good possibility - depending on situation. dd is almost always the wrong tool except in forensics, which isn't you.

Where things get wrinkly is that you need to consider what scenario you will be deploying this image.
- disaster recovery; tick.
- concurrent deployment to several different machines ?. Nope.

Do you really want several machines with all the same IP addresses and hostnames ?. Same passwords and encryption keys ?. You getting the picture ?. This is why deployment tools were invented. I don't have a need for them but things like cobbler might be worth looking into. Depending on scope (i.e. how many machines), you might be better of just re-installing and have a script to install/config needed apps.

computersavvy 04-12-2021 01:37 PM

Quote:

Originally Posted by jayjayjay (Post 6240158)
Thank you for your response. What I'm particularly looking for is be able to reuse an updated installation image (e.g. ubuntu, plus new os configurations, plus new installed applications) and use the image on multiple bare metal hardware instead of installing the os and adding the os configs and new app installations manually or thru a script. I'm thinking of clonezilla but not sure if this is the appropriate use-case for it. TIA

You don't give any info about the source or destination hardware, drive sizes, etc.
This may be a good use for clonezilla dependent upon what the final goal is and hardware compatibility. Using dd may also be an option if you plan to be able to adjust partition location and sizes after the copy is complete.

uteck 04-12-2021 01:55 PM

There used to be a nice tool for Ubuntu to take your installed OS and turn it into an .iso image that you could then easily install.
But now to customize the fuse filesystem takes doing it the hard way last I looked.

Depending on how many systems you are looking to install it on, you could look into setting up a PXE server to install from. Ubuntu will use RedHat kickstart options, but not all of them to install with last time I tried it. There is also the option to kickstart off USB without a server, then you just boot off the USB and let it read the kickstart file for all the install options and to run the post-install scrips.

But all of these may be overkill for you as making a backup image and restoring it can also work if the hardware is all similar.

jayjayjay 04-12-2021 07:01 PM

Thanks for all your responses. My goal is to be able to have a template image that I can use to distribute to customers. They will have the same hardware specifications. Ideally, it is in a usb file that will be bootable and it will deploy the image(linux distro, some os configs, additional apps). Would I be better off installing the linux os and applying scripts afterwards?

computersavvy 04-12-2021 08:10 PM

Now that you have stated the intent to distribute the image to customers it definitely is not a task for dd or clonezilla. Each install will need tailored to the individual host and customer so one of the items mentioned in post #6 would be better for that. Installing it before distribution of the machine is one thing, providing the customer an image with install instructions is a different ballpark and one of the deployment tools would be a better choice. In fact a quick search for tools of that nature would be of benefit.

You definitely do not want to distribute a machine or image with user or site information already configured.

OTOH, doing a clean new install from a live iso followed by some configuration tweaking and package installs by script seems readily do-able.

jayjayjay 04-12-2021 08:20 PM

Thank you for your very helpful response. You are right, after searching for resources, it seems a live iso and post install script would be the quickest and most ideal way to do it. I quickly looked into the deployment tools(foreman, cobbler, FIA), please correct me if i am wrong, it seems to need a deployment server or is targeting to deploy over the network. Our customer machine ideally should not be connected to outside network and we are planning to do deployment only thru dvd or flash drive. are there deployment tools for this kind of use cases?

hazel 04-13-2021 03:57 AM

I know that AntiX has software for making master iso images for installation from your current system. See for example https://antix-skidoo.github.io/archi...iso-t7072.html. Maybe other distros have something similar.

yancek 04-13-2021 06:46 AM

You apparently want to remaster an instaslled system. The software mentioned in one of the posts above for Ubuntu (derivatives) was called 'remasterwys'. This was a one man project, he asked for help, didn't get it so was smart enough to quit. There is similar software such as Systemback which is also limited also to the Ubuntu derivatives.

You can always use the squashfs tools though it is a bit more complicated.


All times are GMT -5. The time now is 10:10 AM.