Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old May 23rd, 2005, 10:57 PM   #1
kdepfyffer
Newbie
 
Join Date: May 2005
Posts: 2
Rep Power: 0 kdepfyffer is on a distinguished road
fedora USB create boot image script

I'm sure I'm going to get an rtfm but what the heck. First of all I'm a total noob.
I don't have a dedicated machine to test fedora betas so I run it on my USB drive.
after getting tired of typing everything in to create a kernel image i decided to create a script.
my script works but I want it to be even easier than it is now. Here's what I'm using.
#!/bin/sh
# writen by Kevin dePfyffer - kdepfyffer@depfyffer.com
# because I was tired of typing it all in :-)
ls /lib/modules
echo "enter the kernel version you would like to use"
read kernel
/sbin/mkinitrd --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod --preload=sd_mod /boot/initrd.''$kernel''.usb.img ''$kernel''
echo "please update your /boot/grub/grub.conf before you reboot"
yes I know its simple and lame but hey I'm new to the whole shell stuff.
Is there any way for me to create a menu (1. 2. 3. etc) from the ls command then use read
and an if statement to get $kernel.
bonus question,
how can I pipe something like this to the end of grub.conf (without overwriting of course)
title Fedora Core ("$kenel"-usb)
root (hd0,0)
kernel /vmlinuz-"$kernel" ro root=LABEL=/ rhgb quiet
initrd /initrd.''$kernel''.usb.img
kdepfyffer is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:26 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC