Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-20-2012, 07:18 PM   #1
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
ubunutu grub-pc kickstart install

Hello there

I'm trying to get Ubuntu 12.04 to install via a kickstart setup, and so far we are seeing two issues:
1) in a virtual machine (VirtualBox and VMware Fusion) if there is a network device present it fails to install grub.
2) in a physical (IBM x3755 from memory) if the installation is not of a physical medium (eg Virtual disk via IMM) it fails.

In both cases the problem is that the installer complains that grub failed to install to /target/ .

I've gotten to the stage that then doing
- an Alt+F2 to go to a console,
- chroot /target/ bash,
- update /etc/apt/sources.list
- apt-get update -y
- apt-get install grub-pc -y

This last step gets me to a dialog that then asks where I want to install grub to. I've since put these steps into the post install section of my kickstart configuration file. All this is fine up to the point where it would require interaction, which never appears to take place, which I assume either it fails silently or doesn't happen.

I've taken a general look at grub-pc's postinst script, but I don't see anything in the script that gives a means of configuring it via a command line argument or file on disk. However it does appear that once grub is setup, that the postinst script will deploy it to the same location again. So at this point, I'm going back to the interactive Alt-F2 , chroot and running `/var/lib/dpkg/info/grub-pc.postinst configure` and then selecting /dev/sda ...

Thus my question:
Is there a way to configure grub-pc from the command line to install to the MBR, and thus complete the setup completely non-interactively, via a kickstart configuration file?
Old 06-21-2012, 06:50 AM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 651Reputation: 651Reputation: 651Reputation: 651Reputation: 651Reputation: 651
Interesting .. I wasn't aware that Ubuntu had added kickstart support. Had you thought about trying expect ? .. another option (to allow user interaction) would be to switch terminals like so:

exec < /dev/tty6 > /dev/tty6
chvt 6
chvt 1
Old 06-21-2012, 04:05 PM   #3
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Original Poster
Rep: Reputation: 32
Hey kbp

Ubuntu and kickstart, since at least 10.04:

I'll have a play with your suggestions. Thanks!
Old 09-04-2012, 01:32 PM   #4
LQ Newbie
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
vmware esxi grub failed to install

When receiving the following error on VMware ESXi
"the grub-pc package failed to install into /target/"
for Ubuntu 12.04 we were able to resolve the issue
by disconnecting the network interface (Edit -> Settings)
before installing from the DVD .iso

The most recent grub package (downloaded from the network)
apparently causes the problem.

After booting from the installed OS add the following to /etc/network/interfaces
to enable dhcp:

auto eth0
iface eth0 inet dhcp


grub-pc, kickstart, ubuntu 12.04

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kickstart install dipanjan Linux - Newbie 1 03-25-2012 11:08 AM
pxe kickstart redhat install + vnc/smilar during install fishjohn Linux - Server 1 04-24-2010 09:22 AM
How to install Fuppes on Ubunutu 8.10 linuxlainen Linux - Newbie 13 06-02-2009 12:02 AM
Kickstart & grub issue Roxja Red Hat 1 02-29-2008 12:58 PM
No grub.conf be created when group Core installed in kickstart Linux - General 0 01-16-2006 03:08 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:36 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration