Projekat

Općenito

Profil

Akcije

Podrška #19238

Zatvoren

d-i debian installer preseed itd - automatizovanje install-a, debconf-utils

Dodano od Ernad Husremović prije više od 15 godina. Izmjenjeno prije oko 15 godina.

Status:
Zatvoreno
Prioritet:
Normalan
Odgovorna osoba:
Kategorija:
-
Početak:
28.12.2009
Završetak:
% završeno:

0%

Procjena vremena:

Fajlovi

my_selections.txt (79,3 KB) my_selections.txt Ernad Husremović, 28.12.2009 13:01
my_selections.txt (79,3 KB) my_selections.txt Ernad Husremović, 28.12.2009 14:04

Povezani tiketi 1 (0 otvoreno1 zatvoren)

korelira sa ubuntu - Nove funkcije #19248: pxe boot vostro-1015 preseed - karmic amd64ZatvorenoErnad Husremović28.12.2009

Akcije
Akcije #1

Izmjenjeno od Ernad Husremović prije više od 15 godina

http://people.debian.org/~bubulle/d-i/vmware-fai.html

label di26fr-t
  kernel daily-linux-26-i386
    append vga=normal initrd=daily-initrd-24-i386.gz ramdisk_size=16384 root=/dev/rd/0 init=/linuxrc devfs=mount,dall rw languagechooser/language-name=French countrychooser/shortlist=FR DEBCONF_PRIORITY=critical preseed/url=http://192.168.7.1/~bubulle/preseed/testing.cfg    

languagechooser/language-name=Bosnian countrychooser/shortlist=BS ?

preseed/url=http://192.168.7.1/~bubulle/preseed/testing.cfg

Akcije #2

Izmjenjeno od Ernad Husremović prije više od 15 godina

DEBCONF_PRIORITY=critical : this is a trick. The netcfg part of D-I needs three more variables to be preseeded for an install to be automated:
  • netcfg/get_hostname=x
  • netcfg/get_domain=x
  • console-keymaps-at/keymap=fr-latin9 However, preseeding these in the command line makes it too long. So, I cheated by using a critical priority for debconf.

http://kitenet.net/~joey/d-i/preseed/

Akcije #3

Izmjenjeno od Ernad Husremović prije više od 15 godina

preseed cfg-ovi

# For machines that will be servers.
d-i partman-auto/choose_recipe select Separate /home, /usr, /var, and /tmp partitions
Akcije #4

Izmjenjeno od Ernad Husremović prije više od 15 godina

netboot.cfg

# configs for installing via netboot

# Generally we'll do a basic server install.
d-i preseed/include string common.cfg passwd.cfg server.cfg dodo.cfg override.cfg

# Networking must already be set up, so it's easy to load a config
# based on the machine's hostname assigned by dhcp.
d-i preseed/include_command string case $(cat /etc/hostname) in elephant) echo machine/elephant.cfg ;; donkey) echo machine/donkey.cfg ;; zebra) echo machine/zebra.cfg ;; hercules) echo machine/hercules.cfg ;; bison) echo machine/bison.cfg ;; esac
#; echo unstable.cfg
# Uncomment the above line and add it to the string above for force
# installation of unstable for netboot installs. Most useful during kernel
# transitions.

Akcije #5

Izmjenjeno od Ernad Husremović prije više od 15 godina

passwd

#passwd        passwd/root-password        password foo
#passwd        passwd/root-password-again    password foo

#passwd        passwd/make-user        boolean false
passwd        passwd/user-fullname        string Joey Hess
passwd        passwd/username            string joey
passwd        passwd/user-password        password debian
passwd        passwd/user-password-again    password debian

Akcije #6

Izmjenjeno od Ernad Husremović prije više od 15 godina

main.cfg

# Main preseed file. Determine machine type (netboot, usb, etc) and include
# relevant configs.
d-i preseed/include_command string if [ -d /hd-media ]; then echo usb.cfg ; else echo netboot.cfg; fi; echo override.cfg

Akcije #7

Izmjenjeno od Ernad Husremović prije više od 15 godina

override.cfg

# This preseed file should be included last of all. It allows overriding of
# include files on the command line. For example, if you want to install a
# web server instead of the default desktop install on some machine, use
#   preseed/override task/web-server.cfg
# Note, you must take care to not use the override to pull in any configs
# that themselves mention override.cfg; that would be a loop.
d-i preseed/include_command string o=$(debconf-get preseed/override); if [ -n "$o" ]; then echo $o; fi

Akcije #8

Izmjenjeno od Ernad Husremović prije više od 15 godina

http://kitenet.net/~joey/d-i/preseed/task/database-server.cfg

tasksel        tasksel/first    multiselect SQL database, standard system

Akcije #9

Izmjenjeno od Ernad Husremović prije više od 15 godina

http://kitenet.net/~joey/d-i/preseed/task/file-server.cfg

tasksel        tasksel/first    multiselect File server, standard system

samba-common    samba-common/dhcp    false

Akcije #10

Izmjenjeno od Ernad Husremović prije više od 15 godina

tasksel        tasksel/first    multiselect Web server, standard system
Akcije #11

Izmjenjeno od Ernad Husremović prije više od 15 godina

  • Naslov promijenjeno iz d-i debian installer pressed itd - automatizovanje install-a u d-i debian installer preseed itd - automatizovanje install-a

READNE

To use these preseed files, point preseed/url at main.cfg, or copy the lot to a preseed subdirectory on a usb keychain and set
preseed/file=/preseed/main.cfg

Note that you will not get fully automated installs if the preseed configs don't recognise your machine. Instead you'll get a mostly automated install, which is slighlty more likely to work on some random machine. You can tweak this by editing the host detection code in netboot.cfg and usb.cfg.

This preseed config is split up into multiple files to make it easy to define new custom recipes for different machines or classes of machines.

It's possible to use a special preseed/override variable recognised by these config files to override what is done, and force the installation of a different task or other stuff than would nornally be installed by the preseeding. See override.cfg for details.

This preseed suite also includes support for running scripts after the install to set up the machine further. See setup/README.

A note on filenames: I have tried to keep within 8.3 filename space for preseed files that ca be usefully copied to a usb keychain. For some others, I have not bothered.

-- Joey Hess <>

Akcije #12

Izmjenjeno od Ernad Husremović prije više od 15 godina

SETUP/READM

This directory holds scripts that get run after the system is installed to set it up for special uses. The scripts are converted into preseed files by the Makefile. It does this by filtering comments out, then collapsing all the lines into one. So here documents and comments after commands cannot be used, most other shell idioms should work ok.

To include one or more setups, just set preseed/setups to list the ones you want, and include setup/select.cfg. For example:

# Install destkop, check out root and user home directories from svn, and 
# install video software, for an instant media center.
d-i preseed/setups string svnhome video
d-i preseed/include string task/desktop.cfg setup/select.cfg
Akcije #13

Izmjenjeno od Ernad Husremović prije više od 15 godina

http://kitenet.net/~joey/d-i/preseed/setup/ssh-server

#!/bin/sh
# Install a ssh server, not available in tasksel yet..
set -e
apt-get -y install openssh-server || apt-get -y install ssh

Akcije #16

Izmjenjeno od Ernad Husremović prije više od 15 godina

### Mirror settings
d-i mirror/protocol string http
d-i mirror/country string manual
d-i mirror/http/hostname string archive.bring.out.ba
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string
Akcije #17

Izmjenjeno od Ernad Husremović prije više od 15 godina

http://ubuntuforums.org/showthread.php?t=505327

After a lot of testing this is my setup that is working, without any input from the user:

It might be useful for someone, so I cut'n paste the code here.

# If one of the disks that are going to be automatically partitioned
# contains an old LVM configuration, the user will normally receive a
# warning. This can be preseeded away...
d-i partman-auto/purge_lvm_from_device boolean true
# And the same goes for the confirmation to write the lvm partitions.
d-i partman-lvm/confirm boolean true
# Create a small /boot partition, suitable swap, and uses the rest of the space
# The next row HAS TO BE IN ONE ROW!!!!! It will create a small "/boot", a swap, and a "/" for the system
d-i partman-auto/expert_recipe string boot-root :: 100 50 100 reiserfs $primary{ } $bootable{ } method{ regular } format{ } use_filesystem{ } filesystem{ reiserfs } mountpoint{ /boot } . 500 10000 1000000000 reiserfs method{ regular } format{ } use_filesystem{ } filesystem{ reiserfs } mountpoint{ / } . 64 512 2048 linux-swap method{ swap } format{ } .
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
Akcije #18

Izmjenjeno od Ernad Husremović prije više od 15 godina

koristi li moj mirror ?

root@stor-34:~# tcpdump -i venet0:0 port 80

(0) ack 7235262 win 11155 <nop,nop,timestamp 36691 5983473>
12:22:02.474276 IP stor-34.sigma-com.net.www > 192.168.45.168.53544: F 7235262:7235262(0) ack 2762 win 204 <nop,nop,timestamp 5983474 36691>
12:22:02.484416 IP 192.168.45.168.53544 > stor-34.sigma-com.net.www: . ack 7235263 win 11155 <nop,nop,timestamp 36692 5983474>

18843 packets captured
20475 packets received by filter
1630 packets dropped by kernel

koristi

Akcije #19

Izmjenjeno od Ernad Husremović prije više od 15 godina

debconf-utils

ovo je genijalno:

sve je zabilježeno tako da odgovore koji mi trebaju jednostavno mogu iščitati

na novoinstaliranoj mašini listu odabira dobijam ovako

debconfg-get-selections --installer > my_selections.txt

Akcije #21

Izmjenjeno od Ernad Husremović prije više od 15 godina

u pxelinux.cfg/default sam isključio critical DEBCONF_PRIORITY da bi finije mogao podesiti instalaciju i to snimiti

LABEL vostro-1015
        kernel karmic/ubuntu-installer/amd64/linux
        append vga=normal initrd=karmic/ubuntu-installer/amd64/initrd.gz ramdisk_size=16396  root=/dev/ram preseed/url=http://192.168.45.16/d-i/preseed/auto.cfg rw
#DEBCONF_PRIORITY=critical preseed/url=http://192.168.45.16/d-i/preseed/auto.cfg rw

evo novi selections log

Akcije #22

Izmjenjeno od Ernad Husremović prije oko 15 godina

  • Status promijenjeno iz Dodijeljeno u Zatvoreno
Akcije #23

Izmjenjeno od Ernad Husremović prije oko 15 godina

  • Naslov promijenjeno iz d-i debian installer preseed itd - automatizovanje install-a u d-i debian installer preseed itd - automatizovanje install-a, debconf-utils
Akcije

Također dostupno kao Atom PDF