Re: Kernel Panic, root fs..

Mike A. Harris (mharris@meteng.on.ca)
Tue, 24 Aug 1999 03:16:20 -0400 (EDT)


On Thu, 19 Aug 1999, Matthew Vanecek wrote:

>> I don't know that it matters. I compile kernels for various
>> different machines, and I do all the compiling on ONE machine.
>> ALL of the machines have the Linux root filesystem on a different
>> partition. I do:
>>
>> make dep ; make bzImage ; make modules ; make modules_install
>>
>> When it is done, I move the config, bzImage (or zImage),
>> System.map, and module directory all to a separate dir, and make
>> a tarball. I then distribute this tarball to the machine in
>> question. When I unzip the tarball, I move the files into /boot,
>> and /lib/modules. I then edit lilo.conf and tell it about the
>> new kernel. I don't run rdev, or any other such thing. The
>> kernels ALWAYS boot properly, and if I move them to a totally
>> different machine, they still work correctly.
>>
>
>How do you get away with that? The last time I tried that, the other
>machine had the kernel panic, couldn't open initial console, etc...so I
>ran rdev on it to set the root device, and have been doing it that way
>since. Maybe I'll try it again w/2.2.11, since I stuck a new hd in that
>machine to be root... Does it matter that I'm compiling on /dev/sda1
>but installing on /dev/hda1? I've noticed that the compressed image
>always returns /dev/sda1 as its default root device, when queried with
>rdev.

Since Slackware 3.0 with kernel 1.2.13, I have NEVER ever used
"rdev" or any other hack. I put my kernels in /boot, and they
have just worked. I wasn't even aware what the purpose of rdev
was, or of any such concerns. I've moved root partitions around
several times no problem on many machines and have never ever had
any trouble. My kernels all get compiled on the machine that I'm
on, which root is /dev/hda6 now, but was previously /dev/hdb6.
The kernels are used on another box which it is /dev/hda1, and
the SAME kernel is used on yet another box on /dev/hdb1. These
machines are all very different.

My lilo.conf is stock redhat on all machines, except for specific
changes:

1 root@asdf:/var/log# cat /etc/lilo.conf
boot=/dev/hda6
map=/boot/map
install=/boot/boot.b
prompt
timeout=50

image=/boot/bzImage-2.2.11
label=linux
root=/dev/hda6
read-only
vga=extended

image=/boot/vmlinuz-2.2.5-22
label=linux-update
root=/dev/hda6
read-only
vga=extended

If I have the machine configured with LILO on the MBR, then the
"root=" sections are changed to match the new root device.

If I have LILO on the root partition, and boot with a different
bootloader (System Commander), I change both "boot=", and "root="
to point to the new root fs.

Afterwards I run "lilo". I've never ran rdev. The only thing
that I can possibly think of is that lilo duplicates the
functionality of rdev internally and modifies the kernel image.

It would be easy to test this by copying the kernel image to
another filename, then changing lilo.conf, running lilo, and then
comparing the two kernel images for differences. I'll leave that
to someone else though...

YMMV.

--
Mike A. Harris                                     Linux advocate     
Computer Consultant                                  GNU advocate  
Capslock Consulting                          Open Source advocate

Senior Programmer/Sysadmin - Rooms Plus Travel Guide Need accomodations for your next trip? http://www.roomsplus.com

- 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/