Click to See Complete Forum and Search --> : new kernel for Debian: boot from diskette


David J Bush
07-04-2003, 09:24 PM
I had to recompile my kernel to add the agpgart.o module so that my Intel 810e graphics chipset would work under Debian. So, I downloaded the latest stable kernel, 2.4.21, and recompiled that. I was able to get as far as the "make modules_install" step, which seemed to go just fine. I copied my bzImage to /boot as well as to a diskette. I also copied the System.map file to /boot. But now I need to alter some configuration file to point to this new kernel, and I need to specify the root filesystem as well. I don't use LILO or grub. I boot from a diskette. I can still boot from the old diskette, but when I boot the new diskette I get "cannot find root filesystem" and "kernel panic."

Please, what file should I edit so my boot diskette will work?

Thanks for your time.

David

sharth
07-04-2003, 10:03 PM
hmm... its probably looking for /vmlinuz, which is probably a symlink to your old kernel (which you probably deleted), try symlink vmlinuz to your new kernel /boot/bzImage

David J Bush
07-05-2003, 12:01 AM
I didn't delete the old kernel, and a good thing too, or I wouldn't have been able to boot at all, and I would have had to re-install. There was a symbolic link from /vmlinuz to the old /boot/vmlinuz-2.2.20, and I changed it to point to the new /boot/vmlinuz-2.4.21 but when I rebooted I got the same error:

Kernel Panic: VFS: Unable to mount root fs at 03:02

Fortunately the old boot diskette still worked even after I changed the symlink.

It occurred to me that if I study the differences between the working old diskette and the new one, I might see how to fix the problem. The old diskette, which was created during the Debian installation process, has four files: ldlinux.sys, linux.bin (the huge file), message.txt, and syslinux.cfg. That last file consists of five lines:

DISPLAY message.txt
TIMEOUT 40
PROMPT 1
DEFAULT linux.bin
APPEND root=/dev/hda2 ro

It looks like that last line is providing what's missing from my new boot process: a pointer to the root file system.

When I tried to mount the new boot diskette, which was created by the command "make bzdisk," I got error messages:

fat_read_super: Bad fsinfo_offset
VFS: Can't find a valid MSDOS filesystem on dev 02:00
mount: you must specify the filesystem type

I was able to mount the old boot diskette just fine.

What am I doing wrong? How can I get my new boot diskette to work? I notice there are commands such as mkboot which will make a boot diskette. In the manual page for mkboot, it says you can "specify a new kernel" if you want, but I'm not sure what file I should use. Is /boot/vmlinuz-2.4.21 a kernel I can use for the mkboot command?

Thanks for your attention!

David

mdwatts
07-05-2003, 08:24 AM
Copy the new bzImage and System.map to /boot as

vmlinuz-2.4.21
System.map-2.4.21

and add the correct kernel name to your bootloader config.

If your root partition's filesystem support was built as a module instead of built into the kernel, you will also need to create a new initrd (initial ramdisk) or you will not be able to boot.

Post your bootloader config if you need advise.

David J Bush
07-05-2003, 10:49 AM
"add the correct kernel name to your bootloader config."

Bootloader config, what file is that? Are you referring to the syslinux.cfg file on the boot floppy? You want me to mess with my boot floppy? I'd rather leave it alone; it's my only way to boot just now. I'd like to make a new boot diskette instead.

The entire text of syslinux.cfg is in my previous post.

In the /boot directory is the file config-2.2.20-idepci which goes with the old kernel and system map. This config file is over a hundred lines, and they all end with =y or =m. For example:

CONFIG_FB=y
CONFIG_PRINTER=m

There is no mention of a kernel name in this file.

Is there some similar config file that I created during compilation, and which I should now copy to /boot/config-2.4.21?

I believe I could make a new syslinux boot diskette with the command mkrboot, but the man pages for that command say you need to specify a root file system or use the default of root.bin in the current directory. I'm not sure what that means. My old (working) boot diskette does not contain any root.bin file. The linux.bin file on that diskette is identical to /boot/vmlinuz-2.2.20 according to the cmp command. They are both the same size. So what are the mkrboot man pages talking about with regards to "root.bin"??

"If your root partition's filesystem support was built as a module instead of built into the kernel,..."

My root partition is /dev/hda2, mounted at /
It is an ext2 file system.

I went back into the source directory for the 2.4.21 kernel, and I ran "make menuconfig" again just to see what modules I had selected during compilation. Here is a list of all the modules I selected within the category "File systems"

I don't understand all these modules, but that's a different story.

* at the beginning of each line means "built into kernel" while M means "built as module."

* Kernel automounter version 4 support
* DOS FAT fs support
M MSDOS fs support
* VFAT fs support
* virtual memory fs support
M ISO 9660 CDROM fs support
* /proc fs support
Partition types->
* Advanced partition selection
* PC BIOS support
Native Language support->
M codepage 437 (US & Canada)

I saw no mention of ext2 anywhere in the menucofig menus.

I don't know if this tells you whether I built the root fs as a module or not.

David

mdwatts
07-05-2003, 12:51 PM
I forgot that you are using a bootdisk and not Lilo or Grub.

I guess you will need to create a new bootdisk for the new kernel. make bzdisk or something like that. Checkout the JL Help Files on kernel compiling as they should tell you how to create a new bootdisk for the kernel.

Look in the

#
# File systems
#

sections of the kernel's .config.

'Y' is built into the kernel
'M' is built as a module