Linux version 2.3.36

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Thu Jan 06 2000 - 16:56:43 EST


There are problems with initial ramdisk support on Linux-2.3.36.
Upon boot, I get 'RAMDISK Image found at 0'. Then a get a panic
because it's not able to mount root. It can't mount the ramdisk.

If I boot the machine into Version 2.2.6, I can use the same script
to make a ramdisk image that boots 2.3.36. In other words, 2.3.36
doesn't make a bootable ram disk, but once there is one, the new
kernel will mount one.

This is the make ramdisk script which has been working all along until
2.3.35 and 2.3.36.

#!/bin/bash
#
# This installs the kernel on a system that requires an initial
# RAM Disk and with an initial SCSI driver.
#

export VER=$1
RAMDISK_IMAGE=/tmp/RamImage-${VER}
RAMDISK=/tmp/Ramdisk
DISKSIZE=1500
SYS=/usr/src/linux-${VER}/arch/i386/boot/bzImage
MAP=/usr/src/linux-${VER}/System.map
if [ "$1" = "" ] ;
   then
       echo "Usage:"
       echo "make_ramdisk <version>"
       exit 1
fi
if [ ! -f ${SYS} ] ;
   then
    echo "File not found, ${SYS}"
    exit 1
fi
if [ ! -f ${MAP} ] ;
   then
    echo "File not found, ${MAP}"
    exit 1
fi
if ! depmod -a ${VER} ;
   then
      echo "This won't work! There are some unresolved symbols."
      exit 1
fi
umount ${RAMDISK} 2>/dev/null
mkdir ${RAMDISK} 2>/dev/null
dd if=/dev/zero of=${RAMDISK_IMAGE} bs=1k count=${DISKSIZE}
mke2fs -Fq ${RAMDISK_IMAGE} ${DISKSIZE}
mount -o loop ${RAMDISK_IMAGE} ${RAMDISK}
rmdir ${RAMDISK}/lost+found
mkdir ${RAMDISK}/dev
mkdir ${RAMDISK}/etc
mkdir ${RAMDISK}/lib
mkdir ${RAMDISK}/bin
mknod ${RAMDISK}/dev/null c 1 3
mknod ${RAMDISK}/dev/ram0 b 1 0
mknod ${RAMDISK}/dev/ram1 b 1 1
mknod ${RAMDISK}/dev/tty0 c 4 0
mknod ${RAMDISK}/dev/tty1 c 4 1
mknod ${RAMDISK}/dev/tty2 c 4 2
mknod ${RAMDISK}/dev/tty3 c 4 3
mknod ${RAMDISK}/dev/tty4 c 4 4
ln -s /dev/tty0 ${RAMDISK}/dev/systty
ln -s /dev/tty0 ${RAMDISK}/dev/console
ln -s /dev/ram1 ${RAMDISK}/dev/ram
ln -s / ${RAMDISK}/dev/root
cp /bin/ash.static ${RAMDISK}/bin/sh
cp /sbin/insmod.static ${RAMDISK}/bin/insmod
cp /lib/modules/${VER}/scsi/BusLogic.o ${RAMDISK}/lib
cp /lib/modules/${VER}/scsi/scsi_mod.o ${RAMDISK}/lib
cp /lib/modules/${VER}/scsi/sd_mod.o ${RAMDISK}/lib
echo "#!/bin/sh" >${RAMDISK}/linuxrc
echo "/bin/insmod /lib/scsi_mod.o" >>${RAMDISK}/linuxrc
echo "/bin/insmod /lib/BusLogic.o" >>${RAMDISK}/linuxrc
echo "/bin/insmod /lib/sd_mod.o" >>${RAMDISK}/linuxrc
chmod +x ${RAMDISK}/linuxrc
# df ${RAMDISK}
umount ${RAMDISK}
rmdir ${RAMDISK}
gzip < ${RAMDISK_IMAGE} >/boot/initrd-${VER}
rm ${RAMDISK_IMAGE}
cp ${SYS} /boot/vmlinuz-${VER}
cp ${MAP} /boot/System.map-${VER}
rm -rf /boot/System.map
ln -s /boot/System.map-${VER} /boot/System.map
psupdate
#
echo >/boot/message
echo " Booting Linux version ${VER}" >>/boot/message
echo " Hit tab key to see alternatives" >>/boot/message
echo " This machine will self-destruct in 15 seconds" >>/boot/message
echo >>/boot/message
#
lilo -C - <<EOF
#
# Lilo boot-configuration script.
#
boot = /dev/sda
message = /boot/message
compact
delay = 15 # optional, for systems that boot very quickly
vga = normal # force sane state

image = /boot/vmlinuz-${VER}
  root = current
  label = new
  initrd = /boot/initrd-${VER}

image = /vmlinuz
 root = current
 label = linux

image = /vmlinuz
  root = /dev/sdc3
  label = maint

image = /vmlinuz
  root = /dev/sdb1
  label = maint-su
  append="init=/bin/bash"

image = /vmlinuz.old
  root = current
  label = linux_old

other = /dev/sda1
  table = /dev/sda
  label = dos
EOF

Cheers,
Dick Johnson

Penguin : Linux version 2.3.36 on an i686 machine (400.59 BogoMips).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:07 EST