1

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 --
preseed/file=/hd-media/preseed.cfg

(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
mouse
#System timezone
timezone America/Los_Angeles
#Root password
rootpw --iscrypted somethingsomething
#Initial user
user ubuntu --fullname "ubuntu" --iscrypted --password somethingsomething.
#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 
#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

%post
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?

Pradeep Gupta
  • 387
  • 2
  • 5
  • 18

0 Answers0