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
* 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®