Bug 8056
Summary: | mkbootdisk fails on LS-120 (Superdisk) IDE drives | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Terry Griffin <griffint> |
Component: | mkbootdisk | Assignee: | Matt Wilson <msw> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-01-11 17:22:47 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Terry Griffin
1999-12-30 00:38:42 UTC
*** Bug 8275 has been marked as a duplicate of this bug. *** I experienced the same problem on my NEC Versa SX laptop with a builtin LS-120 drive. After a bit of probing, it turns out there are two problems with mkbootdisk and LS-120 drives: 1. When mkbootdisk invokes lilo to write a MBR to the floppy, lilo attempts to create a device, dev.0, in the tmp directory of the bootdisk. However, mkbootdisk didn't create a tmp directory on the bootdisk, only dev, etc, and boot. As a result, lilo reports "Fatal: mknod /tmp/dev.0: No such file or directory." (Since lilo has chrooted to /tmp/mkbootdisk, it's really complaining about /tmp/mkbootdisk/tmp/dev.0.) The fix is to have mkbootdisk create tmp when it creates the other dirs. (Incidentally, a web search on "/tmp/dev.0" turns up *lots* of people who have seen this error, not just with LS-120 drives but with md and raid.) 2. LS-120 drives need a line in lilo.conf specifying bios=0. Since LS-120 drives are connected to an IDE controller, Lilo assumes they are identified by a BIOS code of 0x80, like a harddisk. In fact, they use 0, like a floppy, so lilo must be told this in lilo.conf. I created two patches to mkbootdisk to accomplish these two things. The first requires the user to specify that the device is an LS-120 drive by using a --ls120 flag. The second is a little smarter -- it automatically checks whether the device is an LS-120 drive by probing its identifier in the /proc/ide filesystem. The downside to the automatic approach, however, is that it might be a little more brittle, since it relies on the structure of the /proc heirarchy, which could change between kernel versions. First, here's the patch that requires a --ls120 flag: *** mkbootdisk.orig Thu Jan 11 11:41:55 2001 --- mkbootdisk Thu Jan 11 12:14:47 2001 *************** *** 11,16 **** --- 11,17 ---- unset witheth unset mkinitrdargs unset compact + unset ls120 MOUNTDIR=/tmp/mkbootdisk PATH=/sbin:$PATH *************** *** 56,61 **** --- 57,65 ---- --compact) compact="compact" ;; + --ls120) + ls120=true + ;; *) if [ -z "$kernel" ]; then kernel=$1 *************** *** 134,139 **** --- 138,145 ---- exit 1 } + [ -n "$ls120" ] && ls120="disk=$device bios=0" + [ -n "$pause" ] && { echo "Insert a disk in $device. Any information on the disk will be lost." echo -n "Press <Enter> to continue or ^C to abort: " *************** *** 171,182 **** --- 177,190 ---- mkdir $MOUNTDIR/etc mkdir $MOUNTDIR/dev mkdir $MOUNTDIR/boot + mkdir $MOUNTDIR/tmp cp -Pa $device $MOUNTDIR cp -Pa $rootdev $MOUNTDIR cp -a /boot/boot.b $MOUNTDIR/boot/boot.b cat > $MOUNTDIR/etc/lilo.conf <<EOF $compact + $ls120 boot=$device timeout=100 message=/boot/message Here's the smarter, "magic" version: *** mkbootdisk.orig Thu Jan 11 11:41:55 2001 --- mkbootdisk Thu Jan 11 12:21:53 2001 *************** *** 11,16 **** --- 11,17 ---- unset witheth unset mkinitrdargs unset compact + unset ls120 MOUNTDIR=/tmp/mkbootdisk PATH=/sbin:$PATH *************** *** 134,139 **** --- 135,145 ---- exit 1 } + # look in /proc/ide/.../model to see if $device is an LS-120 drive + if grep -qsiE 'LS-?120' /proc/ide/`basename $device`/model; then + ls120="disk=$device bios=0" + fi + [ -n "$pause" ] && { echo "Insert a disk in $device. Any information on the disk will be lost." echo -n "Press <Enter> to continue or ^C to abort: " *************** *** 171,182 **** --- 177,190 ---- mkdir $MOUNTDIR/etc mkdir $MOUNTDIR/dev mkdir $MOUNTDIR/boot + mkdir $MOUNTDIR/tmp cp -Pa $device $MOUNTDIR cp -Pa $rootdev $MOUNTDIR cp -a /boot/boot.b $MOUNTDIR/boot/boot.b cat > $MOUNTDIR/etc/lilo.conf <<EOF $compact + $ls120 boot=$device timeout=100 message=/boot/message even with these changes some bioses make it hard to use lilo for the boot disk. as such, our future versions will use syslinux. this is working well. new mkbootdisk package is in rawhide. |