Linux version 2.5.49 ([email protected]) (gcc version 3.2
20020903 (Red Hat Linux 8.0 3.2-7)) #17 SMP Sat Nov 23 15:39:24 EST 2002
What i get at boot is;
kernel /vmlinuz ro root=/dev/hda1
...
VFS: Cannot open root device "hda1" or 00:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00
in init/do_mounts.c:/try_name() i get -ENOENT for sys_stat(/sys/block/hda)
i finally hacked in the ROOT_DEV to make it boot and /sys shows;
root@mondecino /sys {0} find -name hda\*
./hda
./hda/hda2
./hda/hda1
root@mondecino /sys {0} ls -l block
total 0
All the block devices are in the toplevel directory of /sys. I have
another SCSI based (/dev/sda1 root device) test box (I use the same
kernel on all boxes) which shows the following and has all its block
devices in /sys/block;
root@linux /sys {1} find -name hda\*
./block/hda
./block/hda/hda1
root@linux /sys {0} find -name sda\*
./block/sda
./block/sda/sda2
./block/sda/sda1
The odd part is that the failing test box's drive used to be in another
box, which used to boot in .48
If you need any more info please give me a holla.
Zwane
--
function.linuxpower.ca
> X-X-Sender: [email protected]
>
> Linux version 2.5.49 ([email protected]) (gcc version 3.2
> 20020903 (Red Hat Linux 8.0 3.2-7)) #17 SMP Sat Nov 23 15:39:24 EST 2002
>
> What i get at boot is;
>
> kernel /vmlinuz ro root=/dev/hda1
> ...
> VFS: Cannot open root device "hda1" or 00:00
> Please append a correct "root=" boot option
> Kernel panic: VFS: Unable to mount root fs on 00:00
>
I found that on 2.5.47. It turned out that I had to give the devfs
name for the root device. root=/dev/ide/la/la/la.
I had devfs compiled in but not active on boot.
CONFIG_PROC_FS=y
CONFIG_DEVFS_FS=y
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
Peter
On Mon, 25 Nov 2002, Peter T. Breuer wrote:
> I found that on 2.5.47. It turned out that I had to give the devfs
> name for the root device. root=/dev/ide/la/la/la.
>
> I had devfs compiled in but not active on boot.
>
> CONFIG_PROC_FS=y
> CONFIG_DEVFS_FS=y
> # CONFIG_DEVFS_MOUNT is not set
> # CONFIG_DEVFS_DEBUG is not set
> CONFIG_DEVPTS_FS=y
Thanks for the suggestion but;
zwane@montezuma linux-2.5.49 {0} grep DEVFS .config
# CONFIG_DEVFS_FS is not set
Zwane
--
function.linuxpower.ca
The problem was that having the floppy driver configured in, but not
having any floppy drives in the system caused us to leak references to the
block_subsys structure. When it hit 0, its directory was removed, and the
block devices were prevented from gaining a reference to it.
(Zwane sent me his sysfs tree and dmesg output off-list, and Cliff
verified the OSDL machine had the same characteristics).
The configuration is not wrong, but unusual, which is why it didn't pop up
before. For the record, I should have caught this earlier, as I don't have
a floppy drive myself, but I had the floppy driver configured as a module
for some reason..
The appended patch should fix the problem. If you can, please try it and
verify it solves the problem.
Thanks,
-pat
P.S. I noticed in alloc_disk() that rand_initialize_disk() happened
outside the check if (disk != NULL). It blindly references disk, so it's
moved inside the if block.
===== drivers/block/genhd.c 1.59 vs edited =====
--- 1.59/drivers/block/genhd.c Sat Nov 9 14:42:00 2002
+++ edited/drivers/block/genhd.c Mon Nov 25 13:20:27 2002
@@ -408,11 +408,11 @@
disk->minors = minors;
while (minors >>= 1)
disk->minor_shift++;
- kobject_init(&disk->kobj);
disk->kobj.subsys = &block_subsys;
+ kobject_init(&disk->kobj);
INIT_LIST_HEAD(&disk->full_list);
+ rand_initialize_disk(disk);
}
- rand_initialize_disk(disk);
return disk;
}
===== fs/partitions/check.c 1.88 vs edited =====
--- 1.88/fs/partitions/check.c Wed Nov 20 21:08:39 2002
+++ edited/fs/partitions/check.c Mon Nov 25 12:44:58 2002
@@ -377,7 +377,6 @@
p->start_sect = start;
p->nr_sects = len;
devfs_register_partition(disk, part);
- kobject_init(&p->kobj);
snprintf(p->kobj.name,KOBJ_NAME_LEN,"%s%d",disk->kobj.name,part);
p->kobj.parent = &disk->kobj;
p->kobj.subsys = &part_subsys;
@@ -406,7 +405,7 @@
s = strchr(disk->kobj.name, '/');
if (s)
*s = '!';
- kobject_register(&disk->kobj);
+ kobject_add(&disk->kobj);
disk_sysfs_symlinks(disk);
if (disk->flags & GENHD_FL_CD)
@@ -529,8 +528,7 @@
sysfs_remove_link(&disk->driverfs_dev->kobj, "block");
put_device(disk->driverfs_dev);
}
- kobject_get(&disk->kobj); /* kobject model is fucked in head */
- kobject_unregister(&disk->kobj);
+ kobject_del(&disk->kobj);
}
struct dev_name {
On Mon, 25 Nov 2002, Patrick Mochel wrote:
> The appended patch should fix the problem. If you can, please try it and
> verify it solves the problem.
Just an onlist ack that this works on my box.
Cheers,
Zwane
--
function.linuxpower.ca