Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st December 2009, 10:28 PM
CD-RW's Avatar
CD-RW Offline
Registered User
 
Join Date: Nov 2006
Posts: 555
linuxfedorafirefox
Arrow Putting a kickstart file onto USB flash drive

Here is a way to prepare a USB flash drive to save your kickstart file to it, and then read the kickstart file from the USB drive during a new Fedora installation.

A USB flash drive is recognised by the Linux kernel as just another hard drive.

This is how I set up my USB flash drive to use it to store my kickstart file on.

You will need a working Linux system to set up the USB drive.

If not already installed, Install Gparted GUI partitioner with:

[root] # yum install gparted

Code:
[root]# yum info gparted
Loaded plugins: refresh-packagekit 
Installed Packages                 
Name       : gparted
Arch       : i386
Version    : 0.4.8
Release    : 1.fc10
Size       : 1.3 M
Repo       : updates
Summary    : Gnome Partition Editor
URL        : http://gparted.sourceforge.net
License    : GPLv2+
Description: GParted stands for Gnome Partition Editor and is a graphical frontend
           : to libparted. Among other features it supports creating, resizing,
           : moving and copying of partitions. Also several (optional) filesystem
           : tools provide support for filesystems not included in libparted.
           : These optional packages will be detected at runtime and don't require
           : a rebuild of GParted
Place the USB drive into a USB port and then start Gparted. If the machine has only 1 hard drive, called /dev/sda, then the USB drive should show in Gparted as /dev/sdb.

The USB partition has to be formatted as FAT or ext2. I've created a primary partition, and formatted it as ext2.

The full partition name is /dev/sdb1, as it's the first partition on the USB drive.

To name the partition I used the following command:

[root]# e2label /dev/sdb1 KickstartFiles

Using the e2label command like this, without specifying a label name returns the current partition label:

[root]# e2label /dev/sdb1
KickstartFiles

Having given the USB drive partition a name, if you press CTRL-R in GParted, it will rescan the drives, and pickup the label name you have assigned to the USB ext2 partition.

The next thing to do is to copy a kickstart file to the USB /dev/sdb1 partition.

Note: When you insert the USB drive into the USB port, it may be automounted by HAL - the hardware abstraction layer.

I have experienced problems with copying files to an automounted USB drive.

Messages like network errors when writing to /dev/sdb1 ...

Using the df -h command will tell you what drives are currently mounted.

[root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 7.5G 12G 41% /
tmpfs 1009M 0 1009M 0% /dev/shm
/dev/sda5 12G 2.8G 8.5G 25% /downloads
/dev/sda6 5.0G 757M 4.0G 16% /usr/local
/dev/sda7 3.0G 198M 2.7G 7% /var/lib/databases
/dev/sda8 3.0G 241M 2.6G 9% /srv
/dev/sda9 3.0G 1.3G 1.6G 44% /home
/dev/sda10 3.0G 748M 2.1G 27% /backup
/dev/sda11 1012M 41M 920M 5% /var/log
/dev/sda12 2.5G 68M 2.3G 3% /tmp
/dev/sdb1 487M 2.3M 459M 1% /media/KickstartFiles

So to work round this if the USB drive is automounted, unmount it with:

[root]# umount -v /media/KickstartFiles
/dev/sdb1 umounted

and then create a mountpoint at /media/usb-drive and mount it again manually with:

[root]# mount -v -t ext2 -L KickstartFiles /media/usb-drive
/dev/sdb1 on /media/usb-drive type ext2 (rw)

Now you can copy your kickstart file safely to the USB drive.

Doing a fresh Fedora installation using the kickstart file on USB drive.

Having set up the USB drive and copied the kickstart file to the drive, you can now use it to do a fresh Fedora installation.

At the linux boot splash screen - welcome to Fedora 12!

Select 'Install or upgrade an existing system'.
(Note: kickstart files only work when doing a fresh installation - not when upgrading an existing system.)

Press TAB key (not Return), and edit the boot command to add:

linux ks=hd:<device-name>/<path>

In this example the <device-name> is sdb1

and for the <path> we will use a kickstart file called F12-default.ks

So the command translates to:

linux ks=hd:sdb1/F12-default.ks

Anaconda, the installer program will now look for the kickstart file called F12-default.ks, in the root directory of the USB drive,

So that's how to do a kickstart installation using a USB flash drive!

You can now edit your kickstart file on USB drive until it's exactly the way you want it, without having to remaster the Fedora DVD with every change of the kickstart file.

Attached Thumbnails
Click image for larger version

Name:	USB-drive-parts.jpg
Views:	429
Size:	37.1 KB
ID:	18618  
Reply With Quote
  #2  
Old 1st December 2009, 10:51 PM
Gödel's Avatar
Gödel Offline
Registered User
 
Join Date: Jul 2009
Location: London,England
Posts: 1,097
linuxfedorafirefox
I think you can have it automatically recognised by anaconda if you call it ks.cfg and put it in the root directory of the usb drive, or in the isolinux directory of an iso image, but I haven't tried it myself:

http://docs.fedoraproject.org/instal...starthere.html
Reply With Quote
  #3  
Old 1st December 2009, 11:11 PM
CD-RW's Avatar
CD-RW Offline
Registered User
 
Join Date: Nov 2006
Posts: 555
linuxfedorafirefox
Quote:
Originally Posted by Gödel View Post
I think you can have it automatically recognised by anaconda if you call it ks.cfg and put it in the root directory of the usb drive, or in the isolinux directory of an iso image, but I haven't tried it myself:

http://docs.fedoraproject.org/instal...starthere.html
Correct Gödel. Anaconda does recognise ks.cfg as a default kickstart file in the root directory of certain media, such as a floppy or CD/DVD. But what if you want different ks files for different installation purposes? Using the above naming scheme allows you to save several kickstart files (also in different subdirectories) on the USB drive, or other media.

The only problem with putting kickstart file(s) into the iso is that if the kickstart file needs editing, which it probably will for an upgrade to a newer Fedora version, you have to go through the whole edit-kickstart-file/create-iso/burn-iso cycle, which I prefer not to do

Last edited by CD-RW; 4th December 2009 at 04:39 PM.
Reply With Quote
Reply

Tags
drive, file, flash, kickstart, putting, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Cannot find kickstart file on hard drive. buccaneere Installation and Live Media 0 20th March 2009 05:50 AM
Putting Fedora 9 on a flash drive Dancingbear909 Installation and Live Media 3 2nd August 2008 02:52 AM
Installing to a USB Flash Drive and using the drive and a normal hard drive beeball Installation and Live Media 3 23rd March 2008 05:45 AM
Kickstart installation how to? how to create a kickstart file? suneesh Security and Privacy 2 17th March 2008 01:23 PM


Current GMT-time: 03:37 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat