Re: creaing new 3.0.4 kernel in squeeze --kernel panic
On Mon, 31 Oct 2011 14:54:37 -0400 (EDT), email@example.com wrote:
> I followed the instructions given in Kernel.htm and built a kernel
> from the source tree I had
> downloaded from www.kernel.org after issuing make-kpkg debian. I also
> patched kernel-package
> using the patch file (linuxv3.diff) mentioned on the web page.
> I also used make localmodconfig to greatly reduce the number of
> modules actually compiled.
> Compiling the kernel took 34 mins on my 1.6GHz laptop.
> I installed the kernel using dpkg as root, checked that an initramfs
> image had been created, closed down
> and rebooted.
> The kernel loaded, entered runlevel 2, but commands that tried to
> write to the fs failed because it was
> still readonly. The kernel finally hung with nfsd. ctrl-alt-del
> successfully rebooted. I shall recompile
> the kernel without NFS support because I don't need it.
In a typical Debian boot, there are three stages for the root
file system. In stage 1, the initial RAM file system is mounted
as the root (/) file system. The boot loader loads the (mostly)
compressed kernel image and the compressed initial RAM file system
image into memory, then passes control to the kernel. The boot
loader tells the kernel where the compressed initial RAM file system
image is by passing it's address to the kernel.
The kernel decompresses itself, decompresses the initial RAM file
system image, frees the memory associated with the compressed version
of the initial RAM file system, then mounts the uncompressed version
of the initial RAM file system as the root (/) file system.
For LILO, the "image" and "initrd" boot loader configuration records
specify the kernel image and initial RAM file system image to be
In stage 2, once all modules needed to do I/O to the disk have
been loaded, as well as all modules needed to interpret the file system,
the permanent root file system is mounted. Typically, it is mounted
read-only. The location of the permanent root file system is passed
to the kernel via the kernel command line from parameters specified
in the boot loader configuration file. For LILO, the "read-only"
and "root" boot loader configuration records specify this information.
The corresponding options passed on the kernel command line are
"ro" and "root". Once the permanent root file system has been mounted
read-only, the uncompressed initial RAM file system image is freed from
memory. Additional kernel modules are loaded at this stage, including
those specified in /etc/modules. They are loaded from the permanent
root file system, still mounted read-only.
In stage 3, the permanent root file system is mounted read-write.
At this stage, the file system to use is specified by /etc/fstab.
Obviously, you must make sure that your boot loader configuration
file and /etc/fstab specify the same root file system. It is important
that you *not* use traditional device nomenclature, such as
etc. Generally, the newer the kernel, the less likely this is to work.
You should specify the root file system, both in the boot loader configuration
file and in /etc/fstab by using "UUID=xxx..." or "LABEL=xxx" specifications.
Since you seem to be having trouble at stage 3, the first thing I would
look at is /etc/fstab. If you don't find any errors there, please
post your boot loader configuration file, /etc/fstab, and the kernel
.''`. Stephen Powell
: :' :