Unattended Debian iso install
-
The way FOG “loads” an ISO is it writes the entire file to memory then begins to boot, this can cause issues with machines that only have 1gb or less of ram. This is why it loads slowly, instead of just writting the files to the disk.
I want to caution you, it may be possible to edit the default file to push scripts, but it’s probably not wise. Why is it you are trying to circumvent the features of FOG and boot an ISO? Why not just burn and ISO and boot it? Seems like too much hassle for an ISO.
You stated above you can build an ISO, why not build a custom ISO and them boot that? throw some scripts in to get the tasks done that you are trying to achieve and test it out.
[B]My Recommendation[/B]: Instead try building a Debian machine and write scripts that will complete the task for you. Then register the host the the fog machine, pull the image and test it.
Loading/writing raw ANYTHING from FOG takes time.
-
Thanks for answer.
I just wanted to have PXE Boot server - for installing via LAN OS like Debian or Ubuntu (or having some diagnostic tools) on several PC’s, from any place in building.Making own ISO (for unattended installation) is somehow OK, but if newer version of Debian / Ubuntu or CentOS will be available - I must prepare new ISO, instead of swapping ISO file on FOG server (of course if it will be possible to add this script for unattended system installation to the FOG menu).
I’m totally newbie in topic of linux - I don’t even know how to write some scripts (in bash for e.g.)
Reffering to your recomendation - you mean to install Debian for e.g. on VirtualBox, configure the system, and make a disk image? If yes - I thinked about this, but if I have several PC’s i must manually assign new username/password, ip configuration etc. on each computer.
-
Assigning usernames and passwords and changing the computer name will be the least of your worries I promise you.
If you are not familiar with writing scripts for Linux, editing the default file and attatching your commands/files is going to be more of a chore than you think.
I understand, now, why you want to use scripts to add to the image, but just as you explained to me " I must prepare new ISO, instead of swapping ISO file on FOG server (of course if it will be possible to add this script for unattended system installation to the FOG menu)." means you may have to edit your scripts or remove them completely as you put in a newer ISO. So please keep in mind that with each upgrade in Linux, a lot can change.
Using a virtual set up will be your best bet as the image will be able to be used on multiple hardware, it will not contain any specific drivers for specific hardware unless you include them.
Because you are choosing Linux as your OS of choice to image with, you will want to make HEAVY notes on the scripts and commands you are using to complete your actions. As I stated before a LOT can change with each upgrade.
I know you plan to upgrade your OS, but I recommend building a SOLID good working image first and stick with it. Then as newer versions come out you can test it in a test environment so you can become familiar with the changes. You can upgrade the OS on the virtual machine, with all your scripts and fixes in place, and push your new image and test it. If it works put it in the production environment, if not scrap it and go back to your snapshot and begin again.
Snapshots are the REAL reason you should set up your images on a virtual set up like virtual box, it lets you save states and revert back to them, so you can make a snapshot, try some commands, and if they don’t work, or you booger up your install, all you have to do is revert rather than start all over again from the ground up.
If you build a good solid image to work from, you can reuse it a few times until you feel comfortable imaging. I can tell you this much, the more you image, the more comfortable you will become using the FOG software.
-
I tried in another way…
I ‘unpacked’ debian iso into /tftboot/fog/deb and added this code to my menu:
[CODE]LABEL Debian
kernel fog/deb/install.amd/vmlinuz
append initrd=/fog/deb/install.amd/initrd.gz preseed/url=http://192.168.1.10/preseed.seed
\n[/CODE]
On the 192.168.1.10 server - there is preseed.seed file available - which is almost unmodified version of [url]https://www.debian.org/releases/wheezy/example-preseed.txt[/url]
I only uncommented
[CODE]d-i debian-installer/language string en
d-i debian-installer/country string EN
d-i debian-installer/locale string en_GB.UTF-8[/CODE]
But when I boot up this from menu, installer is asking me again about keyboard, language etc… -
[quote=“SynRybaka, post: 25105, member: 23400”]I tried in another way…
I ‘unpacked’ debian iso into /tftboot/fog/deb and added this code to my menu:
[CODE]LABEL Debian
kernel fog/deb/install.amd/vmlinuz
append initrd=/fog/deb/install.amd/initrd.gz preseed/url=http://192.168.1.10/preseed.seed
\n[/CODE]
On the 192.168.1.10 server - there is preseed.seed file available - which is almost unmodified version of [url]https://www.debian.org/releases/wheezy/example-preseed.txt[/url]
I only uncommented
[CODE]d-i debian-installer/language string en
d-i debian-installer/country string EN
d-i debian-installer/locale string en_GB.UTF-8[/CODE]
But when I boot up this from menu, installer is asking me again about keyboard, language etc…[/quote]Well if there is a will I guess there is a way, keep us posted, I don’t think there is a write up on this on the forum or wiki. It will help others in the future.
-
[quote=“SynRybaka, post: 25105, member: 23400”]I tried in another way…
I ‘unpacked’ debian iso into /tftboot/fog/deb and added this code to my menu:
[CODE]LABEL Debian
kernel fog/deb/install.amd/vmlinuz
append initrd=/fog/deb/install.amd/initrd.gz preseed/url=http://192.168.1.10/preseed.seed
\n[/CODE]
On the 192.168.1.10 server - there is preseed.seed file available - which is almost unmodified version of [url]https://www.debian.org/releases/wheezy/example-preseed.txt[/url]
I only uncommented
[CODE]d-i debian-installer/language string en
d-i debian-installer/country string EN
d-i debian-installer/locale string en_GB.UTF-8[/CODE]
But when I boot up this from menu, installer is asking me again about keyboard, language etc…[/quote]I think you would need:
[code]d-i localechooser/supported-locales multiselect en_US.UTF-8, en_GB.UTF-8[/code]I haven’t tested this myself, but I’d think, based on the naming, that the reason you’re still having to “choose” language and such is because you’ve not told the system what to use. If you set this field, I believe it will not require your entry for this part of the installer.
-
Unfortunately the [CODE]d-i localechooser/supported-locales multiselect en_US.UTF-8, en_GB.UTF-8[/CODE] didn’t work.
I searched over the internet, and I found some commands, that are independent from preseed file. Now my bootmenu looks like this:
[CODE]LABEL Debian
kernel fog/deb/install.amd/vmlinuz
append initrd=/fog/deb/install.amd/initrd.gz url=http://192.168.1.10/preseed.seed locale=en_US console-setup/ask_detect=false console-setup/layoutcode=en keyboard-configuration/xkb-keymap=us
MENU LABEL Debian 7.4 64-bit[/CODE]
And success! No question about language, keyboard etc.
BUT i have another problem - when I boot up this - it tells, that “No common CD-ROM drive was detected”. I don’t want to use CD-ROM, all files for installation must be loaded from FOG server. -
This post is deleted! -
[B]Finally I found a solution.[/B]
Maybe someone will have the same problem as me (for making an unattended debian or ubuntu installation in FOG :)) so I described steps below:
-
After installing FOG on server, I’ve downloaded debian installation dvd ISO, and ‘unpacked’ it to /tftboot/fog/debian/. Also I’ve copied there configured preseed.cfg file for unattended installation.
-
I’ve also downloaded Debian netboot.tar.gz. From this archive we need 2 files: linux (kernel) and initrd.gz. Both files are located in debian-installer/amd64. I’ve copied this 2 files into /tftboot/fog/netboot/
-
Make an new entry in FOG menu (/tftboot/pxelinux.cfg/default). Mine looks like this:
[CODE]
LABEL Debian-netboot
KERNEL fog/netboot/linux
APPEND initrd=/fog/netboot/initrd.gz url=IP_OF_MY_FOG_SERVER/debian/preseed.cfg locale=pl_PL console-setup/ask-detect=false console-setup/layoutcode=pl keyboard-configuration/xkb-keyboard=pl
MENU LABEL Debian 7.5 64-bit
[/CODE]
Of course all commands after preseed.cfg are unnecessary. -
This is not everything - after this 3 steps you can boot up Debian installation properly, BUT it doesn’t find any disks/partitions. Unfortunatelly netboot version of initrd.gz doesn’t have any IDE/SATA/SAS drivers.
I found a great solution how to make an own netboot initrd.gz which include all necessary drivers: [url]http://unix.stackexchange.com/questions/68387/preseeding-debian-install-from-local-mirror-no-disks-detected[/url]
If someone will have problem with modifying initrd.gz - I have already modified version for Debian 7, so PM me, I`ll upload somewhere. -
Now when we have modified netboot version of initrd.gz, we can copy it into /tftboot/fog/netboot/ - everything should work fine.
[B]Jaymes[/B] and [B]Tom[/B] - many thanks for helping
-
-
No, THANK YOU for sticking with it and braving the unknown and DOCUMENTING so that others can learn from the experience, this is the essence of what this forum is for!
-
Is there any problem founded in two years ! ?
I have this problem now : https://forums.fogproject.org/topic/2596/unattended-debian-iso-install/9
Should i create a new topic for this specific subject ? -
@alireza Are you trying to install Debian unattended?
-
@Wayne-Workman said:
@alireza Are you trying to install Debian unattended?
yes, debian ,centos and other gnu/linux distro that do not have live mode.
-
@alireza
I suppose you’d mount the ISOs for those as read only using the DBAN example I mentioned in the other thread, and then locate the kernel and init, and just chain to it using the fog boot menu.