--- Pat LaVarre <p_lavarre@yahoo.com> wrote: > > shell on the initrd image > > How do I discover what shell I am using to interpret > my linuxrc? If you look in /sbin/mkinitrd you will find that /sbin/nash is copied to the initrd image. And the first line written to linuxrc is "#! /bin/nash". So, unless you changed your mkinitrd, the shell on the initrd image will be nash (on RedHat, of course. Don't know about other distros). > > From: Jan Hudec <bulb () ucw ! cz> > > ... > > cramfs images ... > > should be possible to mount them on loopback. > > Elaborate please? I see: > > $ sudo mount /boot/initrd-2.4.20-pel.img /mnt/loop0 -o > loop=/dev/loop0 > mount: you must specify the filesystem type The initrd image is compressed. So you first have to uncompress this using 'gunzip'. (Running 'file /boot/initrd-2.4.20-pel.img' would have told you that it is gzipped data). And now, let me try to summarize what this thread discussed/discovered so far: - A default RedHat installation specifies the root device using a label (e.g. root=LABEL=/) in the boot loader config file. - If a new kernel is installed on such a machine, it may panic with a message saying that root device could not be opened. - Specifying a device name (e.g. root=/dev/hda1) for root, instead of a label, always works. - There is no code in the kernel that understands the device label. Kernel code always expects a device major/minor to identify the root device. - Converting the label to a device major/minor is done by a built-in command in 'nash', the shell RedHat puts on the initrd image to execute linuxrc. - This explains why installing a new kernel does not always cause a panic. If the new kernel needs initrd, and it is built using /sbin/mkinitrd, then nash is available on the initrd image. It does the label-to-device conversion. - Instead, if the new kernel does not need initrd (i.e. it has all the needed drivers built in), converting a label to device major/minor does not happen. Have I got it all (and got it right)? -Ravi. __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/