Install Boot Tip for people without CDs and USB keys

David Jansen jansen at strw.leidenuniv.nl
Thu Apr 29 10:45:54 UTC 2004


On Thu, Apr 29, 2004 at 07:37:04PM +1000, Phil Anderson wrote:
[...]
> This is the easiest (only????) way to install fedora 2 tests:
> Copy diskboot.img onto your existing hard disk
> Boot into single user mode
> run sync
> run dd if=diskboot.img of=/dev/hda
> Reset your computer (i.e. press the button on the case)
> Start installation!
[...]

Actually, it can be made even simpler. Here is the script I use to copy
the isolinux directory plus a customized kickstart file to the /boot
partition or directory of a Linux system and add an entry to grub for
booting into anaconda. Most of the script is for creating the kickstart
file so if you don't need that, you can remove all of those lines (and
don't forget to remove the ks= setting that is put in grub.conf), and of
course the path names and ip addresses in the script are specific to our
network at the university.

BTW, a small modification I used on most RH7/8/9 -> FC1 installs: add
'display=mymachine:0.0' to the kernel line to get the graphical part of
the installation remotely displayed on my screen. vey convenient when
upgrading 150+ linux desktops.

David Jansen


#!/bin/csh -f
# install Fedora installer on local harddisk + kickstart file + modify grub
set FCVER="Fedora Core 2 test 3"
set bootdir=/boot/installer
if (-d $bootdir) exit
mkdir $bootdir
# get info
set myip=`grep '^IPADDR=' /etc/sysconfig/network-scripts/ifcfg-eth0 | awk -F= '{print $2}'`
set gateway=`grep '^GATEWAY=' /etc/sysconfig/network | awk -F= '{print $2}'`
set rootdev=`grep ' root (hd' /etc/grub.conf | awk '{print $3}'`
set hd=`df $bootdir | grep /dev | awk '{print $1}'`
set hd=$hd:t
set rootpw=`grep root /etc/shadow| awk -F: '{print $2}'`
#
cp /strw4/system/kickstart/isolinux/vmlinuz $bootdir
cp /strw4/system/kickstart/isolinux/initrd.img $bootdir
cat /strw4/system/kickstart/isolinux/ks.cfg | \
	sed "s|^network.*|network --device eth0 --bootproto static --ip $myip --netmask 255.255.255.0 --gateway $gateway --nameserver 132.229.214.102|" | \
	sed "s|rootpw.*|rootpw --iscrypted $rootpw|" \
	> $bootdir/ks.cfg
cat << EOF >> /etc/grub.conf
title - Install $FCVER -
	root $rootdev
	kernel $bootdir/vmlinuz ks=hd:${hd}:$bootdir/ks.cfg
	initrd $bootdir/initrd.img
EOF
#
echo "Setup for installation of $FCVER done."
echo -n "reboot now (y/n, default=n) "
set yn=$<
if ("$yn" =~ [yY]*) then
  shutdown -r now "Rebooting to install $FCVER"
endif





More information about the fedora-test-list mailing list