Re: catch-22 upgrading to 2.6 kernel?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marvin Lyndon wrote:
> The trouble is that the system boots the new kernel and then complains:
> 
> Mounting /dev/sda as /lib failed
> 
> Some googling reminded me that the naming convention for devices changes
> with 2.6: so I tried editing my /boot/initrd.conf so that  it read
> 
> CRYPTROOT=/dev/discs/disc0/part1 (formerly /dev/hda1)
> BOOTDEV=/dev/discs/disc1  (formerly /dev/sda?)

These look like devfs names. devfs names work only if USEDEVFS=1 is set in
build-initrd.sh configuration, and CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y
are set in kernel configuration.

If you don't have devfs enabled, like you said, you should not be using
devfs names in build-initrd.sh configuration.

> I am pretty much guessing concerning the second device name; how can I find
> the new correct name for /dev/sda if I cannot boot the 2.6 kernel?

Observe boot kernel boot messages. If some device is not detected, it may be
caused by needed driver not being linked directly to the kernel.

> But even if I get past this hurdle, I find myself in a catch-22 situation:
> trying to run buildinitrd.sh (needed because I changed /boot/initrd.conf)
> fails with an error message stating that it cannot find the device nodes:
> 
> This
> ***  script was supposed to create block device nodes for     ***
> ***  BOOTDEV=, CRYPTROOT= and possibly EXTERNALGPGDEV= but    ***
> ***  lacked knowledge of how to create at least one of them.  ***
> ***  Script aborted.

This is fixed by not using devfs names in build-initrd.sh configuration.
 
> How can I get buildinitrd.sh to succeed in configuring the initrd for use
> with a 2.6 kernel while still running a 2.4 kernel?

Normally one initrd.gz should work with all kernels, However, if the device
names are different under different kernels, then you need to build two
different initrds using different configurations.

Add this to 2.4 kernel version build-initrd.sh configuration:

    INITRDGZNAME=initrd1.gz

and this to 2.6 version:

    INITRDGZNAME=initrd2.gz

syslinux.cfg example:

    default linux24
    timeout 100
    prompt 1
    label linux24
      kernel vmlinuz1
      append initrd=initrd1.gz root=100 init=/linuxrc rootfstype=minix
    label linux26
      kernel vmlinuz2
      append initrd=initrd2.gz root=100 init=/linuxrc rootfstype=minix

-- 
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux