Bug 13480 - mkbootdisk fails if kernel image a symbolic link
mkbootdisk fails if kernel image a symbolic link
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mkbootdisk (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-07-04 17:36 EDT by Nick Urbanik
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-07-04 17:44:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
very simple patch to fix bug (350 bytes, patch)
2000-07-04 17:44 EDT, Nick Urbanik
no flags Details | Diff

  None (edit)
Description Nick Urbanik 2000-07-04 17:36:34 EDT
cp -a /boot/vmlinuz-2.2.16-3 /tmp/mkbootdisk
in mkbootdisk causes the symbolic link itself to be copied to the
boot disk rather than the kernel.
This causes the script to fail with:
open /vmlinuz-2.2.16-3: No such file or directory
when the script runs 
/sbin/lilo -r /tmp/mkbootdisk

Solution:
simply remove the -a from the cp command.

Long decription of the bug:

ls -l /boot/vmlinuz-2.2.16*
1060 # ls -l /boot/vmlinuz-2.2.16*
lrwxrwxrwx    1 root     root           18 Jun 25 21:19
/boot/vmlinuz-2.2.16-3 -> vmlinuz-2.2.16-3-4
-rw-rw-r--    1 root     root       704045 Jun 25 21:10
/boot/vmlinuz-2.2.16-3-4
-rw-r--r--    1 root     root       620247 Jun 20 07:19
/boot/vmlinuz-2.2.16-3-redhat-original


1049 # sh -x mkbootdisk -v -v --device /dev/fd0 2.2.16-3
+ pause=yes
+ unset kernel
+ device=/dev/fd0
+ unset verbose
+ unset witheth
+ unset mkinitrdargs
+ MOUNTDIR=/tmp/mkbootdisk
+
PATH=/sbin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/kerberos/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/Office51/bin:/usr/local/jdk1.2.2/bin:/home/nicku/bin:/sbin:/usr/sbin:/home/nicku/Office51/bin
+ export PATH
+ VERSION=1.2
+ [ 5 -gt 0 ]
+ verbose=true
+ shift
+ [ 4 -gt 0 ]
+ verbose=true
+ shift
+ [ 3 -gt 0 ]
+ shift
+ device=/dev/fd0
+ shift
+ [ 1 -gt 0 ]
+ [ -z  ]
+ kernel=2.2.16-3
+ shift
+ [ 0 -gt 0 ]
+ [ -z 2.2.16-3 ]
+ [ -d /lib/modules/2.2.16-3 ]
+ [ -f /boot/vmlinuz-2.2.16-3 ]
+ [ -f /etc/conf.modules -a -f /lib/modules/2.2.16-3/modules.dep ]
++ sort -u /etc/conf.modules
++ awk /^alias eth0/ { print $3 }
+ ethmodule=rtl8139
+ [ rtl8139 ]
+ echo rtl8139
+ grep \.o$
++ grep /net/rtl8139.o /lib/modules/2.2.16-3/modules.dep
++ head -1
+ deps=/lib/modules/2.2.16-3/net/rtl8139.o:
++ echo /lib/modules/2.2.16-3/net/rtl8139.o:
++ cut -d: -f2
+ deps=
+ witheth= --with rtl8139
+ [ -f /lib/modules/2.2.16-3/fs/isofs.o ]
+ [ -f /lib/modules/2.2.16-3/fs/nfs.o ]
+ withfs= --with nfs
+ [ -f /lib/modules/2.2.16-3/fs/fat.o ]
+ withfs= --with nfs --with fat
+ [ -f /lib/modules/2.2.16-3/fs/msdos.o ]
+ withfs= --with nfs --with fat --with msdos
++ awk $1 ~ /^[^#]/ && $2 ~ /^\/$/ { print $1 ; exit } /etc/fstab
+ rootdev=/dev/md1
+ [ -z /dev/md1 ]
+ [ -n yes ]
+ echo Insert a disk in /dev/fd0. Any information on the disk will be lost.
Insert a disk in /dev/fd0. Any information on the disk will be lost.
+ echo -n Press <Enter> to continue or ^C to abort: 
Press <Enter> to continue or ^C to abort: + read aline

+ [ -n true ]
+ echo -n Formatting /dev/fd0... 
Formatting /dev/fd0... + mke2fs /dev/fd0
+ [ -n true ]
+ echo done.
done.
+ rm -rf /tmp/mkbootdisk
+ mkdir /tmp/mkbootdisk
+ [ -d /tmp/mkbootdisk ]
+ mount -t ext2 /dev/fd0 /tmp/mkbootdisk
+ [ -n true ]
+ echo -n Copying /boot/vmlinuz-2.2.16-3... 
Copying /boot/vmlinuz-2.2.16-3... + cp -a /boot/vmlinuz-2.2.16-3
/tmp/mkbootdisk
+ [ -n true ]
+ echo done.
done.
+ [ -n true ]
+ echo -n Creating initrd image... 
Creating initrd image...+ /sbin/mkinitrd --with rtl8139 --ifneeded
/tmp/mkbootdisk/initrd.img 2.2.16-3
+ [ -n true ]
+ echo done.
done.
+ [ -n true ]
+ echo -n Setting up lilo... 
Setting up lilo... + mkdir /tmp/mkbootdisk/etc
+ mkdir /tmp/mkbootdisk/dev
+ mkdir /tmp/mkbootdisk/boot
+ cp -Pa /dev/fd0 /tmp/mkbootdisk
+ cp -Pa /dev/md1 /tmp/mkbootdisk
+ cp -a /boot/boot.b /tmp/mkbootdisk/boot/boot.b
+ cat
+ [ -f /tmp/mkbootdisk/initrd.img ]
+ echo  initrd=/initrd.img
+ chmod 644 /tmp/mkbootdisk/etc/lilo.conf
+ cat
+ [ -n true ]
+ echo done.
done.
+ [ -n true ]
+ /sbin/lilo -r /tmp/mkbootdisk
open /vmlinuz-2.2.16-3: No such file or directory
+ umount /tmp/mkbootdisk
+ rmdir /tmp/mkbootdisk
Comment 1 Nick Urbanik 2000-07-04 17:44:07 EDT
Created attachment 898 [details]
very simple patch to fix bug
Comment 2 Erik Troan 2002-06-03 14:43:37 EDT
fixed in 1.4.4

Note You need to log in before you can comment on or make changes to this bug.