mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
@ 2006-06-13 21:10 Markus Biermaier
  2006-06-13 21:22 ` Randy.Dunlap
  2006-06-14  7:25 ` Markus Biermaier
  0 siblings, 2 replies; 14+ messages in thread
From: Markus Biermaier @ 2006-06-13 21:10 UTC (permalink / raw)
  To: linux-kernel


Am 12.06.2006 um 21:09 schrieb Jan Engelhardt:


> Hm. Maybe http://lkml.org/lkml/2005/2/26/92 (updated version for
> 2.6.16/.17 below) can help you.
>
> diff --fast -Ndpru linux-2.6.17-rc6~/block/genhd.c linux-2.6.17-rc6 
> +/block/genhd.c
> --- linux-2.6.17-rc6~/block/genhd.c	2006-06-06 02:57:02.000000000  
> +0200
> +++ linux-2.6.17-rc6+/block/genhd.c	2006-06-08 22:29:16.607058000  
> +0200
> @@ -214,6 +214,52 @@ struct gendisk *get_gendisk(dev_t dev, i
>  	return  kobj ? to_disk(kobj) : NULL;
>  }
>
> +/*
> + * printk a full list of all partitions - intended for
> + * places where the root filesystem can't be mounted and thus
> + * to give the victim some idea of what went wrong
> + */
> +void printk_all_partitions(void)
>


Am 13.06.2006 um 09:47 schrieb Markus Biermaier:


> to get the function "printk_all_partitions" compiled I simply  
> commented out "mutex_lock" and "mutex_unlock"...
>
> So the result before the boot-panic is:
>
> ...
> here are the partitions available:
> 2100     500472 hde driver: ide-disk
>   2101     500440 hde1
> ...
> What does this mean?
>

This holds the solution:
                         /* Note, unlike /proc/partitions I'm showing  
the numbers in hex
                            in the same format as the root= option */
                         printk("%02x%02x %10llu %s",
                                sgp->major, sgp->first_minor,
                                (unsigned long long)get_capacity(sgp)  
 >> 1,
                                disk_name(sgp, 0, buf));

So my "/tftpboot/pxelinux.cfg/Cxxxxxx" is:
------------------------- [ BEGIN Cxxxxxx ] -------------------------
DEFAULT standard
LABEL standard
KERNEL vmlinuz
# APPEND initrd=initrd ramdisk_size=32768 root=/dev/hde1 udev  
acpi=off rootdelay=5
APPEND initrd=initrd ramdisk_size=32768 root=2101 udev acpi=off  
rootdelay=5
------------------------- [ END   Cxxxxxx ] -------------------------

so the right root-string is: "root=2101".

But can anyone tell me how "root=/dev/hde1" translates to "root=2101"???

Thank you very much, Jan.

You brought me the solution.

Thanks
Markus


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-13 21:10 Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device Markus Biermaier
@ 2006-06-13 21:22 ` Randy.Dunlap
  2006-06-13 21:33   ` Markus Biermaier
  2006-06-14  7:25 ` Markus Biermaier
  1 sibling, 1 reply; 14+ messages in thread
From: Randy.Dunlap @ 2006-06-13 21:22 UTC (permalink / raw)
  To: Markus Biermaier; +Cc: linux-kernel

On Tue, 13 Jun 2006 23:10:04 +0200 Markus Biermaier wrote:

> 
> Am 12.06.2006 um 21:09 schrieb Jan Engelhardt:
> 
> 
> > Hm. Maybe http://lkml.org/lkml/2005/2/26/92 (updated version for
> > 2.6.16/.17 below) can help you.
> >
> > diff --fast -Ndpru linux-2.6.17-rc6~/block/genhd.c linux-2.6.17-rc6 
> > +/block/genhd.c
> > --- linux-2.6.17-rc6~/block/genhd.c	2006-06-06 02:57:02.000000000  
> > +0200
> > +++ linux-2.6.17-rc6+/block/genhd.c	2006-06-08 22:29:16.607058000  
> > +0200
> > @@ -214,6 +214,52 @@ struct gendisk *get_gendisk(dev_t dev, i
> >  	return  kobj ? to_disk(kobj) : NULL;
> >  }
> >
> > +/*
> > + * printk a full list of all partitions - intended for
> > + * places where the root filesystem can't be mounted and thus
> > + * to give the victim some idea of what went wrong
> > + */
> > +void printk_all_partitions(void)
> >
> 
> 
> Am 13.06.2006 um 09:47 schrieb Markus Biermaier:
> 
> 
> > to get the function "printk_all_partitions" compiled I simply  
> > commented out "mutex_lock" and "mutex_unlock"...
> >
> > So the result before the boot-panic is:
> >
> > ...
> > here are the partitions available:
> > 2100     500472 hde driver: ide-disk
> >   2101     500440 hde1
> > ...
> > What does this mean?
> >
> 
> This holds the solution:
>                          /* Note, unlike /proc/partitions I'm showing  
> the numbers in hex
>                             in the same format as the root= option */
>                          printk("%02x%02x %10llu %s",
>                                 sgp->major, sgp->first_minor,
>                                 (unsigned long long)get_capacity(sgp)  
>  >> 1,
>                                 disk_name(sgp, 0, buf));
> 
> So my "/tftpboot/pxelinux.cfg/Cxxxxxx" is:
> ------------------------- [ BEGIN Cxxxxxx ] -------------------------
> DEFAULT standard
> LABEL standard
> KERNEL vmlinuz
> # APPEND initrd=initrd ramdisk_size=32768 root=/dev/hde1 udev  
> acpi=off rootdelay=5
> APPEND initrd=initrd ramdisk_size=32768 root=2101 udev acpi=off  
> rootdelay=5
> ------------------------- [ END   Cxxxxxx ] -------------------------
> 
> so the right root-string is: "root=2101".
> 
> But can anyone tell me how "root=/dev/hde1" translates to "root=2101"???

That's (hex) 0x2101.  In Documentation /devices.txt, we see:

 33 block	Third IDE hard disk/CD-ROM interface
		  0 = /dev/hde		Master: whole disk (or CD-ROM)
		 64 = /dev/hdf		Slave: whole disk (or CD-ROM)

		Partitions are handled the same way as for the first
		interface (see major number 3)

So device 33 (hex 21) is /dev/hde and 0x01 is partition 1 == hde1.


> Thank you very much, Jan.
> 
> You brought me the solution.


---
~Randy

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-13 21:22 ` Randy.Dunlap
@ 2006-06-13 21:33   ` Markus Biermaier
  2006-06-13 22:51     ` Jan Engelhardt
  0 siblings, 1 reply; 14+ messages in thread
From: Markus Biermaier @ 2006-06-13 21:33 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-kernel


Am 13.06.2006 um 23:22 schrieb Randy.Dunlap:

> On Tue, 13 Jun 2006 23:10:04 +0200 Markus Biermaier wrote:
>>> So the result before the boot-panic is:
>>>
>>> ...
>>> here are the partitions available:
>>> 2100     500472 hde driver: ide-disk
>>>   2101     500440 hde1
>>> ...

[snip]

>> But can anyone tell me how "root=/dev/hde1" translates to  
>> "root=2101"???
>
> That's (hex) 0x2101.  In Documentation /devices.txt, we see:
>
>  33 block	Third IDE hard disk/CD-ROM interface
> 		  0 = /dev/hde		Master: whole disk (or CD-ROM)
> 		 64 = /dev/hdf		Slave: whole disk (or CD-ROM)
>
> 		Partitions are handled the same way as for the first
> 		interface (see major number 3)
>
> So device 33 (hex 21) is /dev/hde and 0x01 is partition 1 == hde1.

Aaargh:
Its HEX and I tried always in my "linuxrc":
------------------------- [ BEGIN linuxrc ] -------------------------
...
# brw-rw----    1 root     disk      33,   1 Jan 19  2001 /dev/hde1
echo 0x3301 > /proc/sys/kernel/real-root-dev
...
------------------------- [ END   linuxrc ] -------------------------
So it would have probably worked if I would have written "echo  
0x2101 ..."

Thank you, Randy.

Markus


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-13 21:33   ` Markus Biermaier
@ 2006-06-13 22:51     ` Jan Engelhardt
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Engelhardt @ 2006-06-13 22:51 UTC (permalink / raw)
  To: Markus Biermaier; +Cc: Randy.Dunlap, linux-kernel


> echo 0x3301 > /proc/sys/kernel/real-root-dev

What a hack. initramfsses of current distros seem to do it a better way 
using run-init (pivot_root?).


Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-13 21:10 Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device Markus Biermaier
  2006-06-13 21:22 ` Randy.Dunlap
@ 2006-06-14  7:25 ` Markus Biermaier
  2006-06-14  9:27   ` Jan Engelhardt
  1 sibling, 1 reply; 14+ messages in thread
From: Markus Biermaier @ 2006-06-14  7:25 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel


Am 13.06.2006 um 23:10 schrieb Markus Biermaier:

> So my "/tftpboot/pxelinux.cfg/Cxxxxxx" is:
> ------------------------- [ BEGIN Cxxxxxx ] -------------------------
> DEFAULT standard
> LABEL standard
> KERNEL vmlinuz
> # APPEND initrd=initrd ramdisk_size=32768 root=/dev/hde1 udev  
> acpi=off rootdelay=5
> APPEND initrd=initrd ramdisk_size=32768 root=2101 udev acpi=off  
> rootdelay=5
> ------------------------- [ END   Cxxxxxx ] -------------------------
>
> so the right root-string is: "root=2101".

Ok, the solution for *this problem* seems to be to write "root=2101".
But why can't I write "root=/dev/hde1" as in kernel 2.4.25?
Is this a kernel bug?
Or have I done an error somewhere?

Markus


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-14  7:25 ` Markus Biermaier
@ 2006-06-14  9:27   ` Jan Engelhardt
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Engelhardt @ 2006-06-14  9:27 UTC (permalink / raw)
  To: Markus Biermaier; +Cc: linux-kernel

>> ------------------------- [ BEGIN Cxxxxxx ] -------------------------
>> DEFAULT standard
>> LABEL standard
>> KERNEL vmlinuz
>> # APPEND initrd=initrd ramdisk_size=32768 root=/dev/hde1 udev acpi=off
>> rootdelay=5
>> APPEND initrd=initrd ramdisk_size=32768 root=2101 udev acpi=off
>> rootdelay=5
>> ------------------------- [ END   Cxxxxxx ] -------------------------
>> 
>> so the right root-string is: "root=2101".
>
> Ok, the solution for *this problem* seems to be to write "root=2101".
> But why can't I write "root=/dev/hde1" as in kernel 2.4.25?
> Is this a kernel bug?
> Or have I done an error somewhere?
>

Let me take a wild guess: By using /proc/.../real_root_dev, you make the 
kernel try to locate "/dev/hde1" (to find out major/minor number) on the 
device you wrote in real_root_dev, rather than (the default) make it look 
for /dev/hde1 in the initrd image.


Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-13 14:49         ` Jan Engelhardt
@ 2006-06-13 21:16           ` Markus Biermaier
  0 siblings, 0 replies; 14+ messages in thread
From: Markus Biermaier @ 2006-06-13 21:16 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel


Am 13.06.2006 um 16:49 schrieb Jan Engelhardt:

>> So the result before the boot-panic is:
>>
>> ...
>> here are the partitions available:
>> 2100     500472 hde driver: ide-disk
>>  2101     500440 hde1
>> ...
>> What does this mean?
>>
> It means the partitions are there.
> Which leads us to the next question:
>  Can you mount hde1 using -t auto within your initrd shell?

What do you mean with this?
I checked it (after I found the solution in providing "root=2101" as  
kernel-cmd-string) and it failed again.
I typed: "mount -t auto /dev/hde1 /mnt".
BTW I have an "/etc/fstab" with the entry
"/dev/hde1       /mnt    ext2    defaults 1 1"

Thanks again for your tip with "printk_all_partitions" ...

Markus


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-13  7:47       ` Markus Biermaier
@ 2006-06-13 14:49         ` Jan Engelhardt
  2006-06-13 21:16           ` Markus Biermaier
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Engelhardt @ 2006-06-13 14:49 UTC (permalink / raw)
  To: Markus Biermaier; +Cc: linux-kernel


>> block/genhd.c:240: Warnung: implicit declaration of function `mutex_lock'
mutex_lock not available in 2.6.15

> So the result before the boot-panic is:
>
> ...
> here are the partitions available:
> 2100     500472 hde driver: ide-disk
>  2101     500440 hde1
> ...
> What does this mean?
>
It means the partitions are there.
Which leads us to the next question:
 Can you mount hde1 using -t auto within your initrd shell?


Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-12 19:09     ` Jan Engelhardt
  2006-06-13  6:44       ` Markus Biermaier
@ 2006-06-13  7:47       ` Markus Biermaier
  2006-06-13 14:49         ` Jan Engelhardt
  1 sibling, 1 reply; 14+ messages in thread
From: Markus Biermaier @ 2006-06-13  7:47 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel


Am 12.06.2006 um 21:09 schrieb Jan Engelhardt:

> Hm. Maybe http://lkml.org/lkml/2005/2/26/92 (updated version for
> 2.6.16/.17 below) can help you.
>
> diff --fast -Ndpru linux-2.6.17-rc6~/block/genhd.c linux-2.6.17-rc6 
> +/block/genhd.c
> --- linux-2.6.17-rc6~/block/genhd.c	2006-06-06 02:57:02.000000000  
> +0200
> +++ linux-2.6.17-rc6+/block/genhd.c	2006-06-08 22:29:16.607058000  
> +0200
> @@ -214,6 +214,52 @@ struct gendisk *get_gendisk(dev_t dev, i
>  	return  kobj ? to_disk(kobj) : NULL;
>  }
>
> +/*
> + * printk a full list of all partitions - intended for
> + * places where the root filesystem can't be mounted and thus
> + * to give the victim some idea of what went wrong
> + */
> +void printk_all_partitions(void)
> +{
[snip]

Am 13.06.2006 um 08:44 schrieb Markus Biermaier:
> make targz-pkg
> block/genhd.c: In function `printk_all_partitions':
> block/genhd.c:240: Warnung: implicit declaration of function  
> `mutex_lock'
> block/genhd.c:240: error: `block_subsys_lock' undeclared (first use  
> in this function)
> block/genhd.c:240: error: (Each undeclared identifier is reported  
> only once
> block/genhd.c:240: error: for each function it appears in.)
> block/genhd.c:273: Warnung: implicit declaration of function  
> `mutex_unlock'
> make[3]: *** [block/genhd.o] Error 1
> make[2]: *** [block] Error 2
> make[1]: *** [targz-pkg] Error 2
> make: *** [targz-pkg] Error 2

Hello Jan,

to get the function "printk_all_partitions" compiled I simply  
commented out "mutex_lock" and "mutex_unlock"...

So the result before the boot-panic is:

...
here are the partitions available:
2100     500472 hde driver: ide-disk
   2101     500440 hde1
...
What does this mean?

Markus


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-12 19:09     ` Jan Engelhardt
@ 2006-06-13  6:44       ` Markus Biermaier
  2006-06-13  7:47       ` Markus Biermaier
  1 sibling, 0 replies; 14+ messages in thread
From: Markus Biermaier @ 2006-06-13  6:44 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel


Am 12.06.2006 um 21:09 schrieb Jan Engelhardt:

> Hm. Maybe http://lkml.org/lkml/2005/2/26/92 (updated version for
> 2.6.16/.17 below) can help you.
>
> diff --fast -Ndpru linux-2.6.17-rc6~/block/genhd.c linux-2.6.17-rc6 
> +/block/genhd.c
> --- linux-2.6.17-rc6~/block/genhd.c	2006-06-06 02:57:02.000000000  
> +0200
> +++ linux-2.6.17-rc6+/block/genhd.c	2006-06-08 22:29:16.607058000  
> +0200
> @@ -214,6 +214,52 @@ struct gendisk *get_gendisk(dev_t dev, i
>  	return  kobj ? to_disk(kobj) : NULL;
>  }
>
> +/*
> + * printk a full list of all partitions - intended for
> + * places where the root filesystem can't be mounted and thus
> + * to give the victim some idea of what went wrong
> + */
> +void printk_all_partitions(void)
> +{
> +	int n;
> +        struct gendisk* sgp;
> +	mutex_lock(&block_subsys_lock);
> +
> +        /* For each block device... */
[snip]

Thank you for the patch.
Compiling yields:

make targz-pkg
block/genhd.c: In function `printk_all_partitions':
block/genhd.c:240: Warnung: implicit declaration of function  
`mutex_lock'
block/genhd.c:240: error: `block_subsys_lock' undeclared (first use  
in this function)
block/genhd.c:240: error: (Each undeclared identifier is reported  
only once
block/genhd.c:240: error: for each function it appears in.)
block/genhd.c:273: Warnung: implicit declaration of function  
`mutex_unlock'
make[3]: *** [block/genhd.o] Error 1
make[2]: *** [block] Error 2
make[1]: *** [targz-pkg] Error 2
make: *** [targz-pkg] Error 2

Can you please help me pointing to "mutex_lock" and  
"block_subsys_lock". Sorry.

Kind regards

Markus


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-12 18:38   ` Markus Biermaier
@ 2006-06-12 19:09     ` Jan Engelhardt
  2006-06-13  6:44       ` Markus Biermaier
  2006-06-13  7:47       ` Markus Biermaier
  0 siblings, 2 replies; 14+ messages in thread
From: Jan Engelhardt @ 2006-06-12 19:09 UTC (permalink / raw)
  To: Markus Biermaier; +Cc: linux-kernel

>> > 
>> > I use an EPIA MII6000E motherboard with CF-Card as hard-drive.
>> > Since this device can't boot from CF-Card I boot from network via
>> > PXELINUX.
>> > Works fine for kernel 2.4.25.
>> > 
>> > Now I want to change to kernel 2.6.15.4.
>> > 
>> > I boot an initrd, execute "linuxrc" and at this point I can mount the
>> > CF-Card
>> > as "hde1", inspect the file-system, ...
>> > 
>> Is the proper IDE driver loaded, are you sure the drive is still at hde1
>> with 2.6?
>
> Hmm proper IDE driver...
> 1) I can mount the CF-Card "by hand" and inspect the filesystem. And it looks
> good. I can use the file-system in "near single-user-mode".
> 2) In my "linuxrc" I do the following to load the modules:
> ------------------------- [ BEGIN linuxrc ] -------------------------
> ...
> PCIC="ide_cs yenta_socket pcmcia_core pcmcia rsrc_nonstatic"
> for Module in $PCIC
> do
>        modprobe $Module
> done
> lsmod
> ...
> if [ "$DEBUG" != "" ] ; then
>    /bin/sh < /dev/console
> fi
> ...
> ------------------------- [ END   linuxrc ] -------------------------
> Is this indication enough, that I use the  proper IDE driver?

Hm. Maybe http://lkml.org/lkml/2005/2/26/92 (updated version for 
2.6.16/.17 below) can help you.

diff --fast -Ndpru linux-2.6.17-rc6~/block/genhd.c linux-2.6.17-rc6+/block/genhd.c
--- linux-2.6.17-rc6~/block/genhd.c	2006-06-06 02:57:02.000000000 +0200
+++ linux-2.6.17-rc6+/block/genhd.c	2006-06-08 22:29:16.607058000 +0200
@@ -214,6 +214,52 @@ struct gendisk *get_gendisk(dev_t dev, i
 	return  kobj ? to_disk(kobj) : NULL;
 }
 
+/*
+ * printk a full list of all partitions - intended for
+ * places where the root filesystem can't be mounted and thus
+ * to give the victim some idea of what went wrong
+ */
+void printk_all_partitions(void)
+{
+	int n;
+        struct gendisk* sgp;
+	mutex_lock(&block_subsys_lock);
+
+        /* For each block device... */
+	list_for_each_entry(sgp,&block_subsys.kset.list, kobj.entry) {
+		char buf[BDEVNAME_SIZE];
+	  	/* Don't show empty devices or things that have been surpressed */
+		if (get_capacity(sgp) && !(sgp->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)) {
+			/* Note, unlike /proc/partitions I'm showing the numbers in hex
+			   in the same format as the root= option */
+			printk("%02x%02x %10llu %s",
+			       sgp->major, sgp->first_minor,
+			       (unsigned long long)get_capacity(sgp) >> 1,
+			       disk_name(sgp, 0, buf));
+			if ((sgp->driverfs_dev) && (sgp->driverfs_dev->driver)) {
+			  printk(" driver: %s\n", sgp->driverfs_dev->driver->name);
+			} else {
+			  printk(" (driver?)\n");
+			}
+
+			/* now show the partitions */
+			for (n = 0; n < sgp->minors - 1; n++) {
+				if (!sgp->part[n])
+					continue;
+				if (sgp->part[n]->nr_sects == 0)
+					continue;
+				printk("  %02x%02x %10llu %s\n",
+					sgp->major, n + 1 + sgp->first_minor,
+					(unsigned long long)sgp->part[n]->nr_sects >> 1 ,
+					disk_name(sgp, n + 1, buf));
+			} /* partition subloop */
+		} /* Non 0 size, not surpressed */
+	} /* Block device loop */
+
+	mutex_unlock(&block_subsys_lock);
+  
+}
+
 #ifdef CONFIG_PROC_FS
 /* iterator */
 static void *part_start(struct seq_file *part, loff_t *pos)
diff --fast -Ndpru linux-2.6.17-rc6~/include/linux/genhd.h linux-2.6.17-rc6+/include/linux/genhd.h
--- linux-2.6.17-rc6~/include/linux/genhd.h	2006-06-06 02:57:02.000000000 +0200
+++ linux-2.6.17-rc6+/include/linux/genhd.h	2006-06-08 22:29:16.607058000 +0200
@@ -401,6 +401,7 @@ char *disk_name (struct gendisk *hd, int
 extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
 extern void add_partition(struct gendisk *, int, sector_t, sector_t);
 extern void delete_partition(struct gendisk *, int);
+extern void printk_all_partitions(void);
 
 extern struct gendisk *alloc_disk_node(int minors, int node_id);
 extern struct gendisk *alloc_disk(int minors);
diff --fast -Ndpru linux-2.6.17-rc6~/init/do_mounts.c linux-2.6.17-rc6+/init/do_mounts.c
--- linux-2.6.17-rc6~/init/do_mounts.c	2006-06-06 02:57:02.000000000 +0200
+++ linux-2.6.17-rc6+/init/do_mounts.c	2006-06-08 22:29:16.607058000 +0200
@@ -7,6 +7,7 @@
 #include <linux/root_dev.h>
 #include <linux/security.h>
 #include <linux/delay.h>
+#include <linux/genhd.h>
 #include <linux/mount.h>
 
 #include <linux/nfs_fs.h>
@@ -302,15 +303,20 @@ retry:
 	        /*
 		 * Allow the user to distinguish between failed sys_open
 		 * and bad superblock on root device.
+		 * and give them a list of the available devices
 		 */
 		__bdevname(ROOT_DEV, b);
 		printk("VFS: Cannot open root device \"%s\" or %s\n",
 				root_device_name, b);
-		printk("Please append a correct \"root=\" boot option\n");
+		printk("Please append a correct \"root=\" boot option; here are the partitions available:\n");
 
+		printk_all_partitions();
 		panic("VFS: Unable to mount root fs on %s", b);
 	}
 
+	printk("List of all partitions:\n");
+	printk_all_partitions();
+
 	printk("No filesystem could mount root, tried: ");
 	for (p = fs_names; *p; p += strlen(p)+1)
 		printk(" %s", p);
#<<eof>>


Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-12 18:04 ` Jan Engelhardt
@ 2006-06-12 18:38   ` Markus Biermaier
  2006-06-12 19:09     ` Jan Engelhardt
  0 siblings, 1 reply; 14+ messages in thread
From: Markus Biermaier @ 2006-06-12 18:38 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel


Am 12.06.2006 um 20:04 schrieb Jan Engelhardt:

>> Hi,
>>
>> I use an EPIA MII6000E motherboard with CF-Card as hard-drive.
>> Since this device can't boot from CF-Card I boot from network via  
>> PXELINUX.
>> Works fine for kernel 2.4.25.
>>
>> Now I want to change to kernel 2.6.15.4.
>>
>> I boot an initrd, execute "linuxrc" and at this point I can mount  
>> the CF-Card
>> as "hde1", inspect the file-system, ...
>>
> Is the proper IDE driver loaded, are you sure the drive is still at  
> hde1
> with 2.6?

Hmm proper IDE driver...
1) I can mount the CF-Card "by hand" and inspect the filesystem. And  
it looks good. I can use the file-system in "near single-user-mode".
2) In my "linuxrc" I do the following to load the modules:
------------------------- [ BEGIN linuxrc ] -------------------------
...
PCIC="ide_cs yenta_socket pcmcia_core pcmcia rsrc_nonstatic"
for Module in $PCIC
do
         modprobe $Module
done
lsmod
...
if [ "$DEBUG" != "" ] ; then
     /bin/sh < /dev/console
fi
...
------------------------- [ END   linuxrc ] -------------------------
Is this indication enough, that I use the  proper IDE driver?

Has the driver (I think "ide_cs"?) which seems to work from the  
initial RAM-disk to be loaded again before the kernel mounts the root- 
fs?
Thanx for any explaination.

>> VFS: Cannot open root device "hde1" or unknown-block(0,0)
>>                                                       ^^^
> Lack of driver. If there was a driver, you would see a non-0,0  
> number at
> least.

Markus


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
  2006-06-12 14:05 Markus Biermaier
@ 2006-06-12 18:04 ` Jan Engelhardt
  2006-06-12 18:38   ` Markus Biermaier
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Engelhardt @ 2006-06-12 18:04 UTC (permalink / raw)
  To: Markus Biermaier; +Cc: linux-kernel

> Hi,
>
> I use an EPIA MII6000E motherboard with CF-Card as hard-drive.
> Since this device can't boot from CF-Card I boot from network via PXELINUX.
> Works fine for kernel 2.4.25.
>
> Now I want to change to kernel 2.6.15.4.
>
> I boot an initrd, execute "linuxrc" and at this point I can mount the CF-Card
> as "hde1", inspect the file-system, ...
>
Is the proper IDE driver loaded, are you sure the drive is still at hde1 
with 2.6?

> VFS: Cannot open root device "hde1" or unknown-block(0,0)
>                                                       ^^^
Lack of driver. If there was a driver, you would see a non-0,0 number at 
least.


Jan Engelhardt
-- 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device
@ 2006-06-12 14:05 Markus Biermaier
  2006-06-12 18:04 ` Jan Engelhardt
  0 siblings, 1 reply; 14+ messages in thread
From: Markus Biermaier @ 2006-06-12 14:05 UTC (permalink / raw)
  To: linux-kernel


Hi,

I use an EPIA MII6000E motherboard with CF-Card as hard-drive.
Since this device can't boot from CF-Card I boot from network via  
PXELINUX.
Works fine for kernel 2.4.25.

Now I want to change to kernel 2.6.15.4.

I boot an initrd, execute "linuxrc" and at this point I can mount the  
CF-Card as "hde1", inspect the file-system, ...

As soon as I finish "linuxrc" the root-fs should be mounted but the  
kernel panics with:

   VFS: Cannot open root device "hde1" or unknown-block(0,0)
   Please append a correct "root=" boot option
   Kernel panic - not syncinc: VFS: Unable to mount root fs on  
unknown-block(0,0)

"/tftpboot/pxelinux.cfg/Cxxxxxx":
------------------------- [ BEGIN Cxxxxxx ] -------------------------
DEFAULT standard
LABEL standard
KERNEL vmlinuz
APPEND initrd=initrd ramdisk_size=32768 root=/dev/hde1 acpi=off udev
------------------------- [ END   Cxxxxxx ] -------------------------

I tried:
------------------------- [ BEGIN linuxrc ] -------------------------
   ...
   mount /dev/hde1
   umount /proc
   umount /sys
   cd /mnt
   /mnt/sbin/pivot_root . initrd
   mount /sys /sys -t sysfs
   /sbin/udevstart
   /sbin/pcmcia-socket-startup
   mount /proc
   echo -n "42" > /sys/bus/pcmcia/devices/1.0/allow_func_id_match
   echo 0x3301 > /proc/sys/kernel/real-root-dev
   sleep 5
   exec <dev/console >dev/console 2>&1
   exec chroot . /bin/sh <<EOF
        umount initrd
        /sbin/blockdev --flushbufs /dev/ram0
        sleep 3
        exec /sbin/init 5
   EOF
------------------------- [ END   linuxrc ] -------------------------

I found that the root-fs is mounted twice. First as initial-RAM-Disk.  
Works ok.
Second as "real" root. With "printk" I found that in file "init/ 
do_mounts.c"
...
int err = do_mount_root(name, p, flags, root_mount_data);
...
The value of "name" is "/dev/root" before this statement.
After this "err" is -6 ("No such device or address").

BTW: When I have the line
   echo 0x3301 > /proc/sys/kernel/real-root-dev
in "linuxrc" the panic message
   "VFS: Unable to mount root fs on unknown-block(0,0)"
becomes
   "VFS: Unable to mount root fs on unknown-block(51,1)"

Any ideas?

Markus
  

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-06-14  9:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-13 21:10 Can't Mount CF-Card on boot of 2.6.15 Kernel on EPIA - VFS: Cannot open root device Markus Biermaier
2006-06-13 21:22 ` Randy.Dunlap
2006-06-13 21:33   ` Markus Biermaier
2006-06-13 22:51     ` Jan Engelhardt
2006-06-14  7:25 ` Markus Biermaier
2006-06-14  9:27   ` Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2006-06-12 14:05 Markus Biermaier
2006-06-12 18:04 ` Jan Engelhardt
2006-06-12 18:38   ` Markus Biermaier
2006-06-12 19:09     ` Jan Engelhardt
2006-06-13  6:44       ` Markus Biermaier
2006-06-13  7:47       ` Markus Biermaier
2006-06-13 14:49         ` Jan Engelhardt
2006-06-13 21:16           ` Markus Biermaier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®