Using F8 and Kickstart, we want to predefine everything about partitions, but also let the user confirm that the disk is going to be wiped. I thought this could be done with just:
partition / --fstype ext3 --size=1600 --asprimary partition swap --recommended
But to my surprise, this does not work: The installer complains about "Could not allocate requested partitions". If we are using:
zerombr clearpart --all --initlabel partition / --fstype ext3 --size=1600 --asprimary partition swap --recommended
...things works great, but then there's no confirmation.
A workaround could be to have the confirmation dialog in some other step of the installation, it's OK if it's displayed from ISOLINUX or at the start of Anaconda or something like that. Any ideas?
Regards, --- Peter Åstrand ThinLinc Chief Developer Cendio AB http://www.cendio.se Wallenbergs gata 4 583 30 Linköping Phone: +46-13-21 46 00
On Mon, 2007-11-26 at 11:39 +0100, Peter Åstrand wrote:
Using F8 and Kickstart, we want to predefine everything about partitions, but also let the user confirm that the disk is going to be wiped. I thought this could be done with just
There's really not a great way of doing this. You can use the 'interactive' keyword to go through every screen but then you're going to go through everything. And there are still some oddities.
You could go with the route of popping up a dialog in %pre for confirmation if that's all you really want.
Jeremy
PS kickstart-list is really a better place for this sort of discussion
On Mon, 26 Nov 2007, Jeremy Katz wrote:
Using F8 and Kickstart, we want to predefine everything about partitions, but also let the user confirm that the disk is going to be wiped. I thought this could be done with just
You could go with the route of popping up a dialog in %pre for confirmation if that's all you really want.
Thanks for your help. I've tried a %pre solution now and it seems to work great. Here's what I did:
%pre --interpreter /usr/bin/python TTY = 3 import os import sys import snack import time import fcntl import termios pid = os.fork() if pid != 0: os.wait() os._exit(0) os.system("chvt %d" % TTY) fd = os.open("/dev/tty%d" % TTY, os.O_RDWR) os.dup2(fd, 0) os.dup2(fd, 1) os.dup2(fd, 2) sys.stdin = os.fdopen(0, "r") sys.stdout = os.fdopen(1, "w") sys.stderr = os.fdopen(2, "w") os.setsid() fcntl.ioctl(fd, termios.TIOCSCTTY, 1) screen = snack.SnackScreen() if "reboot" == snack.ButtonChoiceWindow(screen, "WARNING", "WARNING! All data on your hard disk will be DELETED!", buttons=["reboot", "continue"]): os.system("reboot") while 1: time.sleep(10) screen.finish() os.system("chvt %d" % 1) %end
Best regards, --- Peter Åstrand ThinLinc Chief Developer Cendio AB http://www.cendio.se Wallenbergs gata 4 583 30 Linköping Phone: +46-13-21 46 00
buildsys@lists.fedoraproject.org