Looki Looki No Hands, Automatic install of Ubuntu server.
ฝัง
- เผยแพร่เมื่อ 15 ธ.ค. 2024
- Looki Looki No Hands, Automatic install of Ubuntu server.
In this video, we go through the five steps to install Ubuntu server without interacting with the installer. We look at some of the configuration options, unpack an ISO, change menu options, and pack the ISO up again.
Post some of the commands on my blog.
danielpersson....
Kubernetes at scale managed for you!
Use DigitalOcean Cluster AutoScaler to scale your clusters to seamlessly ensure performance during peak times.
digitalocean.p...
Support the channel and donate a coffee:
ko-fi.com/dani...
Or visit my blog at:
danielpersson.dev
Outro music: Sanaas Scylla
#ubuntu #autoinstall #xorriso
Very good video - thanks! What would be a nice additional topic, would be preseed or cloud-init incorporated into this. So full headless install including custom packages installed via apt or similar.
Hi Morten.
Sounds like a great suggestion. I need a new installer for my Debian Bookworm projects so I could revisit the topic when creating it for my self.
Best regards
Daniel
Thanks for the great video. Very well done.
Very interesting. Thanks Daniel!
That is just genius
I'm setting this up for work and omg I hear all the praise but moving from preseeds it's a sad departure.
This didn't work for me - the resulting ISO ends as Corrupt.
Also, you can always put those long commands in the "description" for easier access or copying
Nice just what I was looking for however I was unable to find the /boot directory with the grub.cfg file . Not sure I can do the autoinstall without updating that file, Will try it, THANKS !!
What should be "s=" in grub.cfg for usb stick based installation?
Hi Ranjan
I've not tested it, but I imagine the stick could be mounted into the same directory. It's pretty much the installation media directory, and I don't think they will change it depending on the actual media. The ISO will contain the same code independent of what you write it to.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel
I had built the image but not booting up on HyperV UEFI software why.
Hi
Then, you probably need to use a different eltorito-alt-boot image. There are a couple that are UEFI instead of bios.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel
I would like a file to be added to the /root folder how do i add that command guessing in the autoinstall: late-commands: section I would add a cp command but where do i put the file in your source-files folder and how would you reference it with the cp command?
Hi Kris
I've not looked into it myself but I believe the installer is mounted in /media/cdrom or similar so you should be able to reference your files from there. If you start up a live CD and open a prompt you could probably verify the location.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel
Hello! Are your example files/commands posted anywhere?
Hi.
Thank you for watching my videos. I think I pretty much use 2 commands through the whole video and talk about the different changes you need in order to make it work. Have not documented the process anyware but I'm pretty sure that Ubuntu have a well up to date documentation on their site the you can follow with similar result.
I hope this helps.
Best regards
Daniel
I just tried this, I was able to create the install.iso and I created a bootable usb Stick with it using Rufus. Installation with the bootable usb Stick also seemed to work, there were some errors, but whatever.
However, when I shutdown the pc, unplug the usb stick, start and boot from hard drive, my normal windows installation starts instead of ubuntu.
So I guess it's not being installed on my hard drive.
Can it maybe not overwrite the old operating system installation?
Hi Zzaniy
It's hard for me to tell without knowing more about the system. There could be a initial disk that it installs your Ubuntu on and that drive might be a totally different one from your system disk or maybe you installed in on the first drive but your boot record points to the second one or maybe you installed it on one drive but you've setup your bios to boot from a different disk.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel
hi, what about the hashed password? Can I create it with everything?? I've tried with openssl and a python script to make a sha512 and I couldn't login once the installation was completed. Same story with using the command sha512sum on ubuntu; typed my password, got the hash, put it in the config file but still I couldn't login. Am I missing something?
Hi Edwhard.
I'm not sure what is going wrong. In my case I used the password generated from an normal install copying it from the install script. I did a quick search for a solution and found this answer. Maybe it can help you?
askubuntu.com/a/1261459
Thank you for watching my videos.
Best regards
Daniel
@@DanielPersson I managed to fix it by copying the hash from the /etc/shadow. Seems like it needs that specific hash to work
I wanted to point out that this process produces a bootable ISO for VirtualBox (perhaps other similar virtualisation platform) only. A USB drive flashed with the resulting ISO will not boot. It lacks of the partition table to do it.
Hi
Might be the case, not really tested but if I remember this video I chose one of the versions so if your bios require BIOS or UEFI it might not work for both.
Thank you for watching my videos.
Best regards
Daniel
Could you please do a video using cloud-init on VMware?
Hi Gabriela
Sadly I don't have a VMware license, neither have I ever used it, or heard about cloud-init, so I think it would be more feasible to find someone else that have used it.
Thank you for watching my videos.
Best regards
Daniel
still asking me for password & user info for 24.4
Hi
That is a bit strange; the information should be there if you've copied a script from a previous install of the same system. It might be a YAML indentation issue or a password hash copy issue. Maybe they require even the root password now.
There are small changes between versions, so other changes and parameters might be required.
I hope this helps. Thank you for watching my videos.
Best regards
Daniel
Hello @avikkarmakar7997! Do you have any result? I am trying to do this autoinstall to 24.04 but have some problems
Create video for Ubuntu desktop version automate
Hi.
I could, and they would probably be very similar except for installing the Desktop version and saving the install file from there. I don't have any use-case for it as I don't deploy many Deskop systems.
What would be your use case? Restoring a learning environment?
Thank you for watching my videos.
Best regards
Daniel
could you post the full command to create the iso? I tried following best I can and my iso wont boot. Wondering if I am missing anything, here is what I am running to create the iso:
sudo xorriso -as mkisofs -r -V "ubuntu-autoinstall" -J -boot-load-size 4 -boot-info-table -input-charset utf-8 -eltorito-alt-boot -b bootpart/eltorito_img2_uefi.img -no-emul-boot -o ../installer.iso .
Might be the bootloader you are using. Or maybe sudo messed up permissions?
Scrap that mine isn't booting with either
Hi.
Well the flags I used was for the bios installation. So you need to set different flags if you want to use the uefi boot loader and it also could be more complicated as some systems don't support some versions UEFI.
I hope this helps, thank you for watching my videos.
Best regards
Daniel
I'm having the same issue. So close to making this work lol. I used the Startup Disk Creator in Ubuntu on the original image I downloaded and verified it worked on the target machine. However the iso created by this process doesn't even show as an option when trying to boot to it. I think it is because this DELL only allows UEFI boot and I cant figure out the xorriso commands to add that to it. Let me know if you find the right parameter!
xorriso -osirrox on -indev ubuntu-22.04.2-live-server-amd64.iso --extract_boot_images source-files/bootpart -extract / source-files gives an error like
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.
xorriso : FAILURE : Not a known command: '--extract_boot_images'
xorriso : FAILURE : Not a known command: 'source-files/bootpart'
Hi.
I noticed that older versions of xorriso and the Mac version had missing or different parameters. Check the manual for help on what parameters are available.
Thank you for watching my videos.
Best regards
Daniel
@@DanielPersson teach us on the right way, dont like a bicycle to try catch a lamborghini. not all people expert like you (include me). sorry im newbie i wish you teach us to step by step😅