Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I wants to place Ubuntu 13.04 Server edition ISO Image to USB pendrive and then automatic installation by help of this usbdrive.

I perform following steps:

(1) Format the pendrive, Assuming my pendrive recognize as /dev/sdb in my system, I wrote this command

sudo mkfs.ext3 /dev/sdb

(2) Then i install grub2 on pendrive ( I am using grub2 due to fact that it can read ISO image file directly without extract its content to usbdrive)

sudo mount /dev/sdb /mnt/USB

sudo grub-install --force --no-floppy --boot-directory=/mnt/USB/boot /dev/sdb

(3) Now i wants to perform automatic installation , i created a pre configuration file and named it preseed.cfg, I have two options first either to place this file into initrd.lz and setup will load this file automatically, I tried this but dont get any success so i tried second way and place preseed.cfg file to root of usbdrive.

sudo cp preseed.cfg /mnt/USB

(4) Now i copy ubuntu iso image to usbdrive.

cp ubuntu.iso /mnt/USB

(5) I changed grub2 so that this can read ubuntu iso image , i did following changes

cd /mnt/USB/grub

sudo nano grub.cfg

(6) Format of grub.cfg

set timeout=10
set default=0

menuentry "Run Ubuntu Live ISO" {
  loopback loop /ubuntu.iso
  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso splash --
  initrd (loop)/casper/initrd.lz

(7) I already changed txt.cfg under isolinux folder and remaster ISO image, Format of txt.cfg

default autoinstall
label autoinstall
  menu label ^Install Ubuntu
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/preseed.cfg boot=casper initrd=/casper/initrd.lz quiet splash --

(8) Format of preseed.cfg

#Generated by Kickstart Configurator
#platform=AMD64 or Intel EM64T

#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
#System timezone
timezone America/Los_Angeles
#Root password
rootpw --iscrypted somethingsomething
#Initial user
user ubuntu --fullname "ubuntu" --iscrypted --password somethingsomething.
#Reboot after installation
#Use text mode install
#Install OS instead of upgrade
#Use CDROM installation media
#System bootloader configuration
bootloader --location=mbr 
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel 
#Disk partitioning information
part /boot --size   128  --fstype=ext3 --asprimary
part /     --size   512  --fstype=ext3 --asprimary 
part swap  --size   512  
part /tmp  --size   512  --fstype=ext3
part /var  --size   512  --fstype=ext3
part /usr  --size  4096  --fstype=ext3
part /home --size  2048  --fstype=ext3
#System authorization infomation
auth  --useshadow  --enablemd5 
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled --http --ftp --ssh 
#X Window System configuration information
xconfig --depth=32 --resolution=1024x768 --defaultdesktop=GNOME

apt-get update
apt-get upgrade
apt-get install apache2
mkdir /home/user

But when i insert pendrive in new pc and select install ubuntu at the time of grub loading, Installation load without reading preseed.cfg, Is there any way to rectify this?

share|improve this question
What errors are you getting when it breaks. And you sometimes have it work without a problem (as indicated with your "sometimes"), is that true? –  vgoff Nov 25 '13 at 5:54
Removed word sometime –  Pradeep Gupta Nov 25 '13 at 6:11
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.