PDA

View Full Version : Preseed Kickstart Auto install problem cannot figure this out!!!!



sparticle2000
September 7th, 2014, 04:52 PM
Calling all experts....please help. I normally don' t post on here unless I am really stuck, I do try to figure stuff out first.

I have been trying to solve this for a number of days, I just cannot seem to get to the bottom of this issue.

In words this is what I want to achieve ideally:

Re-purpose a number of headless servers (I will pull all drives except the first drive to install, they have no video capability only remote access, I can plug a keyboard in but it would be blind operation) and ideally after installation would have the following existing first disk partition layout:
BEFORE INSTALL
Disk one: sda
sda1 20GB NTFS Partition
sda2 1.5 - 1.8TB NTFS partition
No SWAP
AFTER INSTALL
Disk one: sda
sda1 20GB ext4 / partition formatted and bootable
sda2 1.5 - 1.8TB NTFS existing partition
No SWAP

If this cannot be achieved then I will delete all existing partitions on drive 1 on another machine and the ideal layout would be as follows.
AFTER INSTALL
Disk one: sda
sda1 20GB ext4 / partition formatted and bootable
sda2 1.5 - 1.8TB ext4 partition mounted as /media/NASDATA1
No SWAP

Sounds simple right? .....Wrong!

I have tried so many permutations and configurations of the kickstart file and read so much internet stuff that I cannot see the wood for the trees anymore. This autoinstall system for Ubuntu sucks big time! I cannot get the first option to work in any way at all. The closest I can get is to the second option with a blank drive to start with. But it stops and asks me to confirm that I do not want any swap configured. I have to press [Right Arrow] then [Enter], the installation then continues and installs perfectly. All my testing is using a virtualbox machine.

The kickstart file below 'works' to create close to option 2 above. As you can see there are a significant number of commented out preseed options from my various attempts. I cannot get this to work in purely preeseed mode as it seems to want to eutopartition everthing as a single larger partition I cannot get the expert recipe to work in any way! That would be the ideal solution for option 2. If I uncomment the section in green the installer just hangs :

I really need an expert to point out the probably obvious stuff I am doing wrong. But this system is ridiculously complex for something that should be relatively simple and seems like rocket science. Just delete an existing partition and create a new one in its place and install to that..simple. I really have tried hundreds of iterations!

Many thanks
Spart

#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T
preseed DEBCONF_DEBUG=5
#System language
lang en_GB
#Language modules to install
langsupport en_GB
#System keyboard
keyboard gb
#System mouse
mouse
#System timezone
timezone Europe/London
#Root password
rootpw --disabled
#Initial user
user ####### --fullname "###########" --iscrypted --password $##########################
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use CDROM installation media
cdrom
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#clearpart sda1
#Disk partitioning information
#preseed --owner d-i partman-auto/init_automatically_partition select biggest_free
#preseed --owner d-i partman-auto/disk string /dev/sda
#preseed --owner d-i partman-auto/method string regular
#preseed --owner d-i partman-auto/choose_recipe select atomic
####Using Kickstart
#preseed --owner d-i preseed/early_command string umount /dev/sda1
#preseed --owner d-i preseed/early_command string umount /dev/sda2
#preseed --owner d-i partman/filter_mounted boolean false
part / --fstype ext4 --size 20000 --asprimary
part /media/NASDATA1 --fstype ext4 --size 1000000 --grow --asprimary
#part /media/NASDATA1 --fstype ext4 --size 12000 --grow --asprimary --onpart=sda2
####Using Preseeding
#preseed --owner d-i partman-auto/expert_recipe string \
# boot-root :: \
# 300 7000 8000 ext4 \
# $primary{ } $bootable{ } \
# method{ format } format{ } \
# use_filesystem{ } filesystem{ ext4 } \
# mountpoint{ / } \
# . \
# 10000 12000 1200000 ext4 \
# $primary{ } \
# method{ format } format{ } \
# use_filesystem{ } filesystem{ ext4 } \
# mountpoint{ /media/NASDATA1 } \
# .
#preseed --owner d-i partman-auto/choose_recipe select boot-root
#preseed --owner partman-basicfilesystems partman-basicfilesystems/no_swap boolean true
#preseed --owner d-i partman-partitioning/confirm_write_new_label boolean true
#preseed --owner d-i partman/choose_partition select finish partitioning and write changes to disk
#preseed --owner d-i partman/confirm boolean true
#preseed --owner d-i partman/confirm_nooverwrite boolean true
# authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=static --ip=192.168.0.6 --netmask=255.255.255.0 --gateway=192.168.0.254 --nameserver=192.168.0.100 --device=eth0
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx