FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 07-24-2008, 05:15 AM
"Martin Langhoff"
 
Default Kickstart partitioning stanzas - make optional?

When anaconda sees partitioning configuration stanzas in the kickstart
file, it takes them on unconditionally. Is there a way to give the
user a chance to override them during installation?

A search over the kickstart doco does not show any useful hints, and
the GUI kickstart configurator doesn't offer any options that seem
suitable. Perhaps there is a smart way to do this that I'm not aware
of? How do liveCDs say "ah, if you let me, I'll autopartition it like
this *whack!*, but if you want to do it yourself, here, have at parted
my friend"?

cheers,



martin
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-24-2008, 07:02 AM
Steven Moix
 
Default Kickstart partitioning stanzas - make optional?

If you remove the configuration options from your kickstart file,
anaconda will stop and ask the user for input, isn't this what you want?

Otherwise create 2 kickstart files on the DVD and chose which one you
use depending on the situation, an easy way of doing that is to edit the
isolinux/isolinux.cfg file on the DVD, with ISO Master for example.

Steven

On Thu, 2008-07-24 at 17:15 +1200, Martin Langhoff wrote:
> When anaconda sees partitioning configuration stanzas in the kickstart
> file, it takes them on unconditionally. Is there a way to give the
> user a chance to override them during installation?

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-24-2008, 08:38 AM
yersinia
 
Default Kickstart partitioning stanzas - make optional?

In kickstart it is simple ask the user in %pre, generate the file stanza based on user request, and %include in kickstart the generate file stanza

On Thu, Jul 24, 2008 at 9:02 AM, Steven Moix <steven.moix@axianet.ch> wrote:

If you remove the configuration options from your kickstart file,

anaconda will stop and ask the user for input, isn't this what you want?



Otherwise create 2 kickstart files on the DVD and chose which one you

use depending on the situation, an easy way of doing that is to edit the

isolinux/isolinux.cfg file on the DVD, with ISO Master for example.



Steven



On Thu, 2008-07-24 at 17:15 +1200, Martin Langhoff wrote:

> When anaconda sees partitioning configuration stanzas in the kickstart

> file, it takes them on unconditionally. Is there a way to give the

> user a chance to override them during installation?



--

fedora-devel-list mailing list

fedora-devel-list@redhat.com

https://www.redhat.com/mailman/listinfo/fedora-devel-list



--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-24-2008, 09:10 AM
Mogens Kjaer
 
Default Kickstart partitioning stanzas - make optional?

yersinia wrote:

In kickstart it is simple ask the user in %pre, generate the file stanza
based on user request, and %include in kickstart the generate file stanza


How does one ask the user in %pre?

Mogens

--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk@crc.dk Homepage: http://www.crc.dk

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-24-2008, 09:17 AM
Mogens Kjaer
 
Default Kickstart partitioning stanzas - make optional?

Mogens Kjaer wrote:
...

How does one ask the user in %pre?


Sorry for asking, google had the answer:

http://osdir.com/ml/linux.redhat.kickstart.general/2003-09/msg00053.html

Mogens

--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk@crc.dk Homepage: http://www.crc.dk

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-24-2008, 10:22 AM
yersinia
 
Default Kickstart partitioning stanzas - make optional?

Just a pratical example - i have used it with RHEL5 - , there are many* document on this
************************************************** *******
****** Begin kickstart
************************************************** *******

# Use CDROM installation media
install
cdrom
reboot
monitor --noprobe
#platform=x86, AMD64, o Intel EM64T
# System authorization information
auth* --useshadow* --enablemd5
# System bootloader configuration

bootloader --location=mbr --driveorder=sda* --md5pass=$1$LTpksksk$tgrE3JE2fXT/gqvVMUJwz1
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
......................

......................
timezone --isUtc Europe/London
# Network**** #
%include /tmp/network.cfg***** <----------------------------------------
# Disk Layout #
%include /tmp/disk.cfg********** <----------------------------------------


%packages --nobase
@core
dbus
dbus-python
dbus-glib
hal
httpd
openldap-servers
openldap-clients
........................
........................

%pre* --interp /usr/bin/ash
PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH


echo_user () {
******* echo >/dev/tty "$@"
}

ask () {
******* echo_user
******* echo_user -n "$1 [$2] ? "
******* read res </dev/tty
******* [ -z "$res" ] && res="$2"


******* if [ ."$res" = .'!' ]
******* then
*************** echo_user
*************** echo_user "Starting interactive shell, type 'exit' when done"
*************** sh </dev/tty >/dev/tty 2>&1

*************** # re-do the prompt
*************** ask "$@"
******* else
*************** echo "$res"
******* fi
}

confirm () {
******* res=$(ask "$1 (y/n)" "$2")

******* case "$res" in
******* [yYjJ]*) true ;;
******* *) false ;;
******* esac
}

cmdline_val () {
******* Res=$(cat /proc/cmdline | sed -n 's/.*'"$1"'=([^ ]*).*/1/p')

******* if [ -z "$Res" ]
******* then
*************** echo "$2"
******* else
*************** echo "$Res"
******* fi
}

die () {
******* echo_user "FATAL: $*"

******* exit 1
}

gen_network() {
******* echo -n "network --device $IFACE --bootproto static"
******* [ ! -z "$IP"** ] && echo -n " --ip $IP"
******* [ ! -z "$MASK" ] && echo -n " --netmask $MASK"


STTY_SAVE=$(stty -g </dev/tty)
stty sane </dev/tty
reset </dev/tty >/dev/tty || clear >/dev/tty

echo_user "*****************************************"
echo_user "*** EXAMPLE configuration kickstart ***"

echo_user "*****************************************"
echo_user " - Hope for the better ...........****** "
echo_user "** and enjoy**************************** "
echo_user "*****************************************"

echo_user

Interactive="y"

if [ "$Interactive" ]
then
******* while true
******* do
*********** while [ -z "${NAME}"* ]
*********** do
************ echo_user

*************** cat <<EOF >/dev/tty
************************************************** *****
** This is the list of valid hostname : please pick one
** The dns domain is example.com

************************************************** *****
example1
example2
EOF
*************** NAME=$(ask "Hostname (not fqdn qualified)" "$NAME")
*************** case "$NAME" in

*************** example1)
*************** cat <<EOF >/tmp/network.cfg
network --device eth0 --noipv6 --bootproto static --ip x.y.z.h --netmask 255.255.255.128 --nameserver 127.0.0.1 --hostname

EOF

cat <<EOF >/tmp/disk.cfg
clearpart --all --initlabel
part /boot --fstype ext3 --size 128
part swap --size=1024
part pv.3 --size 0* --grow -->volgroup rootvg pv.3
logvol / --fstype ext3 --name=lv_root --vgname=rootvg --size=4096

logvol /home --fstype ext3 --name=lv_home --vgname=rootvg --size=1024
logvol /opt --fstype ext3 --name=lv_opt --vgname=rootvg --size=512
logvol /tmp --fstype ext3 --name=lv_tmp --vgname=rootvg --size=1024
logvol /var --fstype ext3 --name=lv_var --vgname=rootvg --size=1024

logvol /var/log --fstype ext3 --name=lv_var_log --vgname=rootvg --size=1024
logvol /var/tmp --fstype ext3 --name=lv_var_tmp --vgname=rootvg --size=1024
logvol /var/www --fstype ext3 --name=lv_var_www --vgname=rootvg --size=1024

logvol /var/log/audit --fstype ext3 --name=lv_audit --vgname=rootvg --size=1024
EOF
*************** ;;
.........
.........* (for example2)

*************** *)
*************** clear >/dev/tty
*************** NAME=""

*************** ;;
*************** esac
************** done
*************** echo_user
*************** echo_user "--------------------- WARNING -------------------------------"
*************** echo_user "This is your last chance to stop the installation. Continuing"

*************** echo_user "will erase the destination disk and install noninteractively."
*************** echo_user "Answer 'n' if you need to reedit your settings."

else
******* # noninteractive

******* gen_network > /tmp/network.cfg
fi
# restore file descriptors and TTY
clear >/dev/tty
stty $STTY_SAVE </dev/tty
%post
(
.....
.....
)

***********************************************

It is an incomplete example, the dynamic part was for the network config, but i think it could* be useful anyway

Regards

2008/7/24 Mogens Kjaer <mk@crc.dk>:

yersinia wrote:


In kickstart it is simple ask the user in %pre, generate the file stanza

based on user request, and %include in kickstart the generate file stanza




How does one ask the user in %pre?



Mogens



--

Mogens Kjaer, Carlsberg A/S, Computer Department

Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark

Phone: +45 33 27 53 25, Fax: +45 33 27 47 08

Email: mk@crc.dk Homepage: http://www.crc.dk



--

fedora-devel-list mailing list

fedora-devel-list@redhat.com

https://www.redhat.com/mailman/listinfo/fedora-devel-list



--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 07-27-2008, 02:42 AM
"Martin Langhoff"
 
Default Kickstart partitioning stanzas - make optional?

2008/7/24 yersinia <yersinia.spiros@gmail.com>:
> Just a pratical example - i have used it with RHEL5 - , there are many

Interesting! I will have a play with this - thanks!

cheers.



martin
--
martin.langhoff@gmail.com
martin@laptop.org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 08:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org