mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* uml: using hostfs as rootfs is not working
@ 2008-11-19 18:32 Jan Engelhardt
  2008-11-21 17:44 ` Américo Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2008-11-19 18:32 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: jdike

Hi,


as per Documentation/uml/*txt, I issued the following to get a direct 
hostfs:

	./linux ubd0=/tftpboot/linux

(/tftpboot/linux/sbin/init exists), but the UM kernel only gives:

Failed to open '/home/tftpboot/linux', errno = 21
ubda: Can't open "/home/tftpboot/linux": errno = 21
List of all partitions:
6200               4 ubda driver: uml-blkdev

So either UML lost some functionality sometime, or the documentation is 
incorrect.

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

* Re: uml: using hostfs as rootfs is not working
  2008-11-19 18:32 uml: using hostfs as rootfs is not working Jan Engelhardt
@ 2008-11-21 17:44 ` Américo Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Américo Wang @ 2008-11-21 17:44 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Linux Kernel Mailing List, jdike

On Wed, Nov 19, 2008 at 07:32:16PM +0100, Jan Engelhardt wrote:
>Hi,
>

Hi, Jan!


>
>as per Documentation/uml/*txt, I issued the following to get a direct 
>hostfs:
>
>	./linux ubd0=/tftpboot/linux
>
>(/tftpboot/linux/sbin/init exists), but the UM kernel only gives:
>
>Failed to open '/home/tftpboot/linux', errno = 21


I think this error comes from arch/um/drivers/ubd_kern.c::ubd_open_dev()


>ubda: Can't open "/home/tftpboot/linux": errno = 21

This is from the caller: ubd_open().

ubd_open_dev() calls open_ubd_file() to open the ubd device, which, in
turn, calls os_open_file() which is a wrapper of open64().

And errno 21 should be EISDIR, for open(), which means we invoked it
with a writing operation, probably O_RDWR...

So I think there must be something wrong in the code, writing to a
directory is suspicious...

I will try to check it.

Thank you!

-- 
"Sometimes the only way to stay sane is to go a little crazy."


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

end of thread, other threads:[~2008-11-21 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-19 18:32 uml: using hostfs as rootfs is not working Jan Engelhardt
2008-11-21 17:44 ` Américo Wang

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®