Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


Debian installer or how to preseed


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Debian installer or how to preseed

Good afternoon!


Could you please clarify me how to use correct Debian's preseed file?


I have a kernel version 4.15.0-20-generic (Ubuntu 18.04) and default initrd (both downloaded from official repo)
Also I have a little kickstart file and main preseed cfg file
Installation start by iPXE
I no have problems this installation, all works good and installation during fine but...


I noticed one an interesting and working rule:
Code:
d-i partman/early_command \
        string debconf-set partman-auto/disk "$(list-devices disk | tr -s '\n' ' ')"


it works fine, but following this logic I tried to make similar next:
Code:
d-i preseed/early_command \
        string wget -q -O /tmp/include.template myurl \
        touch /tmp/expert_recipe; \
        cat /tmp/include.template | sed -n '2,17p' > /tmp/expert_recipe



after these steps /tmp/include.template will have next path:
Code:
      justraid ::                                         \
              1000 5000 4000 raid                          \
                      $primary{ } method{ raid }           \
              .                                            \
              1000 4000 4000 raid                          \
                      method{ raid }                       \
              .                                            \
              1000 5000 4000 raid                          \
                      method{ raid }                       \
              .                                            \
              1000 5000 4000 raid                          \
                      method{ raid }                       \
              .                                            \
              1000 5000 10000000000 raid                   \
                      method{ raid }                       \
              .


following this logic I tried next step:
Code:
d-i partman-auto/expert_recipe_file string /tmp/include.template


OR btw next try doesn't work too:
Code:
d-i partman/early_command \
        string debconf-set partman-auto/expert_recipe "$(cat /tmp/include.template | sed -n '2,17p')"

I would to make flexible installation via preseed file, for example single installation, single installation with custom partitioning, raid installation mirror, stripe, 5, 6, 10...
Now I'm needed to make many preseed files and wget those, but I want to have just one main preseed file with many templates
# 2  
Also I have more one question
Next raid's partitioning in preseed file like as:
Code:
d-i partman-auto-raid/recipe string \
    1 2 0 ext4 /                                        \
          /dev/sda1#/dev/sdb1                           \
    .                                                   \
    1 2 0 ext4 /home                                    \
          /dev/sda5#/dev/sdb5                           \
    .                                                   \
    1 2 0 ext4 /var                                     \
          /dev/sda6#/dev/sdb6                           \
    .                                                   \
    1 2 0 ext4 /usr                                     \
          /dev/sda7#/dev/sdb7                           \
    .                                                   \
    1 2 0 ext4 /local                                   \
          /dev/sda8#/dev/sdb8                           \
    .

Could somebody clarify me, why I can't specify sda1#sdb1, sda2#sdb2... etc? If I'll do it then installation will be crashed with error. But if I make as above, then installation will be OK

--- Post updated at 02:40 PM ---

because sda1 is 1 primary partition
primary partitions can be only 4 (if it isn't GPT)


sda, sdb - it's disks
sda1,sdb1 - it's first primary partitions


extended partitions start with number 5
and we have next pic:
Code:
sda
|- sda1
|-- md0
|
|- sda5
|-- md1
|- sda6
|- md2



and with sdb same...
# 3  
Quote:
Could somebody clarify me, why I can't specify sda1#sdb1, sda2#sdb2... etc? If I'll do it then installation will be crashed with error.
What error do you get?
# 4  
I solved it. This was my mistake, I made kickstart file which contains preseed's rules with \ symbol and new rows were starting with no "preseed" keyword.
For example:
Code:
preseed partman/auto-raid... \
  multiraid :: \
  1 2 0 ...
but correct are:
preseed partman \ auto-raid \
preseed multiraid :: \

etc

Another way write it in one row

And now I still have understanding why installation was done as no RAID 1 but guided with 1th option, single partition on / with full free space
# 5  
Code:
preseed partman-auto/expert_recipe string multiraid :: 1000 5000 4000 raid $primary{ } method{ raid } . 1000 4000 4000 raid method{ raid } . 1000 5000 4000 raid method{ raid } . 1000 5000 4000 raid method{ raid } . 1000 5000 10000000000 raid method{ raid } .
preseed partman-auto-raid/recipe string 1 2 0 ext4 / /dev/sda1#/dev/sdb1 . 1 2 0 ext4 /home /dev/sda5#/dev/sdb5 . 1 2 0 ext4 /var /dev/sda6#/dev/sdb6 . 1 2 0 ext4 /usr /dev/sda7#/dev/sdb7 . 1 2 0 ext4 /local /dev/sda8#/dev/sdb8 .


These rows ignored and installation is continue by default /dev/sda1 / ext4 100%
Also in %pre section are unavailable drives information, for example
Code:
list-devices disk

or
Code:
ls /dev/* | egrep -io '[hs]d[a-z]' | sort | uniq

I'm needed it that I would make flexible templates (for ssd raid or hdd (with GPT) or ssd + hdd, etc)
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

4 More Discussions You Might Find Interesting

1. Ubuntu

Problem creating Desktop shortcuts through Debian dpkg installer scripts

Hi, I am creating a debian package (*.deb) for my application using the command I am using debian pre/post installer scripts to do certain tasks before/after installation/uninstallation. One such task is to create a shortcut on the user's desktop to launch my application. I am trying to do this... (0 Replies)
Discussion started by: royalibrahim
0 Replies

2. UNIX for Advanced & Expert Users

rpm,pkg and debian installer

Hi, Can someone explain what's the difference between rpm, pkg and debian installer and what is the advantage of one above the other? Thanks (2 Replies)
Discussion started by: naan
2 Replies

3. UNIX for Advanced & Expert Users

Running Script after Preseed Install

Hello there, If you don't want to here the long version, but still want to answer my question, please skip down to THE BOTTOM! You can probably tell what I want to do already from the title, so I'll sum up what I have already done real quick: First off, for those that don't know, a preseed... (1 Reply)
Discussion started by: Curtor
1 Replies

4. Shell Programming and Scripting

Ubuntu Preseed not found

Hello there! I am not certain that this is the proper place to post this, but I will try anyway. I am trying to install Ubuntu using a preseed on a USB thumb drive, and I am having problems. Hopefully someone here is able to help me. I have a file named 'preseed.cfg' in the root directory... (4 Replies)
Discussion started by: Curtor
4 Replies

Featured Tech Videos