root fs on a LVM cause kernel panic
I did further testing. Still not working. However, to make things clear I will detail my environment.
Hardware:
IBM Netfinity 5000 with RAID
3 hot-swap disks 9 GB each
1 Iomega SCSI external 2GB JAZ drive
1 SCSI tape drive
OS:
Started from RedHat 7.0
Kernel at 2.4.13
Many upgrades to rpms
gcc at 3.0.2
glibc 2.2.4
LVM support built-in
JFS support built-in
SCSI support built-in
LVM:
1.0.1-rc4
JFS:
1.0.8
I am building a Linux From Scratch (LFS) system. For this purpose, I have created a VG (datavg). And a 1GB LV (lv_lfs). The LFS system has been built sucessfully. The old system is RedHat 7.0, with root fs on a non LVM ext2 filesystem. I was able to create the LVM, the JFS filesystem and compile everything in this file system accordingly to instructions for LFS 3.0. No major modifications where required from LFS 3.0, except the latest versions of packages were used.
So, I have a fully functionnal RedHat system on plain ext2 filesystems with LVM and JFS. The root fs is non-LVM ext2.
I also have a LV which contains a new root fs which is a JFS filesystem. I also tried with ext2 filesystem and it doesn't fix the problem.
Now, the problem is:
I want to boot with my LV JFS filesystem as root fs. I followed man page instructions for lvmcreate_initrd and created the initrd file. I checked the initrd and everything seems to be there.
After a chat discussion with roadrunner on the openprojects lvm channel. We checked everything in the initrd, as well as the linuxrc file in it and it seems ok.
While booting I am ending with a kernel panic message. The few last lines of the boot message are as follow:
VFS: Cannot open root device "3a01" or 3a:01
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 3a:01
I was suggested to try the following in the linuxrc file:
I added the following line just before the /sbin/umount /proc line:
/bin/echo "3A:01" > /proc/sys/kernel/real-root-dev
The /bin/echo executable was added to the initrd. It didn't fix the problem.
My lilo.conf file is as follow:
image=/boot/lfskernel-2.4.13
initrd = /boot/initrd-lvm-2.4.13.gz
root = /dev/datavg/lv_lfs
label = lvmjfs
append = "ramdisk_size=8192"
read-only
I also tested with ramdisk_size=X, where X is the size returned by the lvmcreate_initrd script for the ramdisk.
Any help would be greatly appreciated.
Signature · 4 lines
================================ Daniel Savard Internet: [email protected] ================================
Quoted 6 lines · Daniel Savard
While booting I am ending with a kernel panic message. The few last lines of the boot message are as follow:
VFS: Cannot open root device "3a01" or 3a:01
Please append a correct "root=" boot optionKernel panic: VFS: Unable to mount root fs on 3a:01
Hmm, you only get that message when the initial boot is done, so two possibilities (I'm not an initrd guru, mind you):
1) you need to change the root= line in your lilo.conf to say "root=/dev/ram0" so that it will boot into the initrd. Then do the real-root-dev trick (or try pivot_root if running a 2.4 kernel) after configuring the LVM stuff via vgscan; vgchange -a y.
2) You didn't re-run lilo after changing lilo.conf (yes, you probably did, but you can never tell from here, and always safe to ask).
Quoted 2 lines
I also tested with ramdisk_size=X, where X is the size returned by the
lvmcreate_initrdscript for the ramdisk.
As long as this is larger than the size of the uncompressed ramdisk, you should be OK.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
Number 2 can be dropped. I re-ran lilo after changing the configuration.
I just tested number 1, this time I am getting an error while trying to access /dev/ram0 which doesn't exist at this time in the execution sequence.
The error message was as follow:
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0
ds: no socket drivers loaded! request_module [block-major-1]: Root fs not mounted
VFS: Cannot open root device "100" or 01:00 Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 01:00
From this, I decided to check my kernel setup and discovered (silly me) I made a newbie error. The initrd support at boot time was not enabled in my kernel.
So, thanks for help to everyone and particularily to roadrunner on the IRC channel who give much time on-line to help me and Andreas Dilger.
My system is not fully functionnal yet, however, the LVM problem is solved.
My target configuration is a Linux From Scratch system, mostly based on V 3.0 instructions. But, instead of gcc 2.95.3 it is based on gcc 3.0.2 and glibc 2.2.4 with kernel 2.4.13. My remaining errors are with the initialization scripts for the LFS, this is off topic on this dist list.
So, if I can help in the future with testing. Let me know.
--
================================
Daniel Savard
Internet: [email protected]
================================
Le ven, 16 nov 2001, Andreas Dilger a �crit :
Quoted 30 lines · Daniel Savard
Quoted 6 lines
While booting I am ending with a kernel panic message. The few last lines of the boot message are as follow:
VFS: Cannot open root device "3a01" or 3a:01
Please append a correct "root=" boot optionKernel panic: VFS: Unable to mount root fs on 3a:01Hmm, you only get that message when the initial boot is done, so two possibilities (I'm not an initrd guru, mind you):
1) you need to change the root= line in your lilo.conf to say "root=/dev/ram0" so that it will boot into the initrd. Then do the real-root-dev trick (or try
pivot_rootif running a 2.4 kernel) after configuring the LVM stuff via vgscan; vgchange -a y.2) You didn't re-run lilo after changing lilo.conf (yes, you probably did, but you can never tell from here, and always safe to ask).
Quoted 2 lines
I also tested with ramdisk_size=X, where X is the size returned by the
lvmcreate_initrdscript for the ramdisk.As long as this is larger than the size of the uncompressed ramdisk, you should be OK.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
Does Lilo support JFS? I use XFS instead of EXT2 but for that I needed to patch lilo with XFS support.
Joost van der Locht
Technisch Directeur
E*Cube BV
Toernooiveld 214 - 6525 EC Nijmegen
T: 024-3500437 - F: 024-3500613
http://www.e-cube.nl
e-mail: [email protected] ICQ UIN: 494145
Quoted 94 lines
-----Oorspronkelijk bericht-----
Van: [email protected] [mailto:[email protected]]Namens Daniel Savard
Verzonden: zaterdag 17 november 2001 5:10
Aan: Andreas Dilger
CC: [email protected]
Onderwerp: Re: [linux-lvm] root fs on a LVM cause kernel panicNumber 2 can be dropped. I re-ran lilo after changing the configuration.
I just tested number 1, this time I am getting an error while trying to access
/dev/ram0which doesn't exist at this time in the execution sequence.The error message was as follow:
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0
ds: no socket drivers loaded!request_module[block-major-1]: Root fs not mounted
VFS: Cannot open root device "100" or 01:00 Please append a correct "root=" boot optionKernel panic: VFS: Unable to mount root fs on 01:00Quoted 1 line
From this, I decided to check my kernel setup and discovered
(silly me) I made
a newbie error. The initrd support at boot time was not enabled in my kernel.So, thanks for help to everyone and particularily to roadrunner on the IRC channel who give much time on-line to help me and Andreas Dilger.
My system is not fully functionnal yet, however, the LVM problem is solved.
My target configuration is a Linux From Scratch system, mostly based on V 3.0
instructions. But, instead of gcc 2.95.3 it is based on gcc 3.0.2 and glibc
2.2.4 with kernel 2.4.13. My remaining errors are with the initialization scripts for the LFS, this is off topic on this dist list.So, if I can help in the future with testing. Let me know.
--
================================
Daniel Savard
Internet: [email protected]
================================Quoted 2 lines · Andreas Dilger
Quoted 1 line · Daniel Savard
While booting I am ending with a kernel panic message. The
few last lines of
Quoted 10 lines
Quoted 5 lines
the boot message are as follow:
VFS: Cannot open root device "3a01" or 3a:01
Please append a correct "root=" boot optionKernel panic: VFS: Unable to mount root fs on 3a:01Hmm, you only get that message when the initial boot is done, so two possibilities (I'm not an initrd guru, mind you):
1) you need to change the root= line in your lilo.conf to say
"root=/dev/ram0"
Quoted 1 line
so that it will boot into the initrd. Then do the
real-root-dev trick
Quoted 4 lines
(or try
pivot_rootif running a 2.4 kernel) after configuring the LVM stuff via vgscan; vgchange -a y.2) You didn't re-run lilo after changing lilo.conf (yes, you
probably did,
Quoted 5 lines
but you can never tell from here, and always safe to ask).
Quoted 2 lines
I also tested with ramdisk_size=X, where X is the size returned by the
lvmcreate_initrdscript for the ramdisk.Quoted 8 lines
As long as this is larger than the size of the uncompressed ramdisk, you should be OK.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
I used the size before the initrd line, before, had the same issue. Regarding lfs, what's the difference of 3.0, and the 1027 CVS version, plus the 11-6 new one, can't get the book for 1027 CVS which I've completed downloading from ftp last night. Is there any easy way to boot this thing up if I have no separate partition?
Quoted 1 line · you
I did further testing. Still not working. However, to make things clear I
will
Quoted 24 lines
detail my environment.
Hardware:
IBM Netfinity 5000 with RAID
3 hot-swap disks 9 GB each
1 Iomega SCSI external 2GB JAZ drive
1 SCSI tape driveOS:
Started from RedHat 7.0
Kernel at 2.4.13
Many upgrades to rpms
gcc at 3.0.2
glibc 2.2.4
LVM support built-in
JFS support built-in
SCSI support built-inLVM:
1.0.1-rc4JFS:
1.0.8
Quoted 6 lines
I am building a Linux From Scratch (LFS) system. For this purpose, I have created a VG (datavg). And a 1GB LV (
lv_lfs). The LFS system has been built sucessfully. The old system is RedHat 7.0, with root fs on a non LVM ext2 filesystem. I was able to create the LVM, the JFS filesystem and compile everything in this file system accordingly to instructions for LFS 3.0. No major modifications where required from LFS 3.0, except the latest
versions of
Quoted 3 lines
packages were used.
So, I have a fully functionnal RedHat system on plain ext2 filesystems
with LVM
Quoted 3 lines
and JFS. The root fs is non-LVM ext2.
I also have a LV which contains a new root fs which is a JFS filesystem. I
also
Quoted 55 lines
tried with ext2 filesystem and it doesn't fix the problem.
Now, the problem is:
I want to boot with my LV JFS filesystem as root fs. I followed man page instructions for
lvmcreate_initrdand created the initrd file. I checked the initrd and everything seems to be there.After a chat discussion with roadrunner on the openprojects lvm channel. We checked everything in the initrd, as well as the linuxrc file in it and it seems ok.
While booting I am ending with a kernel panic message. The few last lines of the boot message are as follow:
VFS: Cannot open root device "3a01" or 3a:01
Please append a correct "root=" boot optionKernel panic: VFS: Unable to mount root fs on 3a:01I was suggested to try the following in the linuxrc file:
I added the following line just before the
/sbin/umount/proc line:
/bin/echo"3A:01" >/proc/sys/kernel/real-root-devThe
/bin/echoexecutable was added to the initrd. It didn't fix the problem.My lilo.conf file is as follow:
image=/boot/lfskernel-2.4.13
initrd =/boot/initrd-lvm-2.4.13.gz
root =/dev/datavg/lv_lfs
label = lvmjfs
append = "ramdisk_size=8192"
read-onlyI also tested with ramdisk_size=X, where X is the size returned by the
lvmcreate_initrdscript for the ramdisk.Any help would be greatly appreciated.
Signature · 11 lines
================================ Daniel Savard Internet: [email protected] ================================ _______________________________________________ linux-lvm mailing list [email protected] http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html