Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Qemu refuses to mount tmpfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
frostsnow
n00b
n00b


Joined: 07 Feb 2014
Posts: 20

PostPosted: Fri Jun 02, 2017 1:03 am    Post subject: [SOLVED] Qemu refuses to mount tmpfs Reply with quote

I'm running a Gentoo VM inside of my Gentoo box, and can't for the life of me get 'tmpfs' to work:
Code:
test ~ # mount -t tmpfs -v none /mnt/
mount: wrong fs type, bad option, bad superblock on none,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
There's no message in 'dmesg', even if I I run 'test ~ # echo 8 > /proc/sys/kernel/printk'. I tried compiling in CONFIG_DEBUG_FS, but that doesn't even show up in '/proc/filesystems':
Code:
test ~ # cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   ramfs
nodev   bdev
nodev   proc
nodev   tmpfs
nodev   devtmpfs
nodev   binfmt_misc
nodev   sockfs
nodev   pipefs
nodev   hugetlbfs
nodev   devpts
        ext3
        ext4
        ext2
        vfat
        msdos
        iso9660
        ntfs
nodev   autofs
        udf
nodev   mqueue

I also tried fiddling with the 'rc.conf' 'sys' parameter, setting it to an empty string causes errors as it fails to mount various 'tmpfs' entries, while setting it to 'vserver' appears to work until I try to use Portage:
Code:
test ~ # emerge -av foo
Failed to validate a sane '/dev'.
bash process substitution doesn't work; this may be an indication of a broken '/
dev/fd'.

I'm launching the VM with the command:
Code:
qemu-system-x86_64 -enable-kvm -drive file=testvm.img,if=virtio -m 1G -curses

Note that mounting 'tmpfs' works fine from the ISO image:
Code:
qemu-system-x86_64 -enable-kvm -drive file=testvm.img,if=virtio -m 1G -curses -boot d -cdrom install-amd64-minimal-20170302.iso


This VM is seriously wonky. Any ideas what I might be doing wrong?


Last edited by frostsnow on Fri Jun 09, 2017 3:30 am; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3131

PostPosted: Fri Jun 02, 2017 6:51 pm    Post subject: Reply with quote

Code:
 # mkdir tmpfs
 # mount -t tmpfs tmpfs tmpfs/
# mount | grep tmpfs
~~/ snip / ~~
tmpfs on some-random-path/tmpfs type tmpfs (rw,relatime)
Back to top
View user's profile Send private message
frostsnow
n00b
n00b


Joined: 07 Feb 2014
Posts: 20

PostPosted: Sat Jun 03, 2017 4:22 am    Post subject: Reply with quote

szatox wrote:
Code:
 # mkdir tmpfs
 # mount -t tmpfs tmpfs tmpfs/
# mount | grep tmpfs
~~/ snip / ~~
tmpfs on some-random-path/tmpfs type tmpfs (rw,relatime)

If that worked I wouldn't be here, but I ran it just to show you:
Code:
(none) / # mkdir tmpfs                                                         
(none) / # mount -t tmpfs tmpfs tmpfs/                                         
mount: wrong fs type, bad option, bad superblock on tmpfs,                     
       missing codepage or helper program, or other error 
                                                                   
       In some cases useful info is found in syslog - try                       
       dmesg | tail or so.                                                       
(none) / # mount | grep tmpfs                                       
devtmpfs on /dev type devtmpfs (rw,nosuid,relatime,mode=0755)
(none) / #                                                                 

Again, note that 'tmpfs' is listed in '/proc/filesystems', as I compiled 'tmpfs' into the kernel, so it's not that I'm missing kernel support for it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Sat Jun 03, 2017 8:06 am    Post subject: Reply with quote

frostsnow'

dmesg | tail would have been more useful than your dmesg | grep.

What does
Code:
grep -i tmpfs /usr/src/linux/.config
show, or even better if you have /proc/config.gz
Code:
zgrep -i tmpfs  /proc/config.gz

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
frostsnow
n00b
n00b


Joined: 07 Feb 2014
Posts: 20

PostPosted: Mon Jun 05, 2017 1:35 am    Post subject: Reply with quote

NeddySeagoon wrote:
frostsnow'

dmesg | tail would have been more useful than your dmesg | grep.

As I said, there's nothing in 'dmesg':
Code:
(none) ~ # echo 8 > /proc/sys/kernel/printk
(none) ~ # dmesg | tail -n 3               
[    7.010071] e1000 0000:00:03.0 enp0s3: renamed from eth0
[   11.861265] udevd[858]: could not touch /run/udev/queue: No such file or dire
ctory
[  144.588963] random: crng init done
(none) ~ # mount -t tmpfs tmpfs /mnt/
mount: wrong fs type, bad option, bad superblock on tmpfs,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
(none) ~ # dmesg | tail -n 3         
[    7.010071] e1000 0000:00:03.0 enp0s3: renamed from eth0
[   11.861265] udevd[858]: could not touch /run/udev/queue: No such file or dire
ctory
[  144.588963] random: crng init done
(none) ~ #

I also tried the system log:
Code:

(none) linux # tail -n 3 /var/log/messages                             
Jun  1 21:46:32 test init[1]: Switching to runlevel: 6
Jun  1 21:46:34 test sshd[1031]: Received signal 15; terminating.
Jun  1 21:46:34 test syslog-ng[1003]: syslog-ng shutting down; version='3.7.3'
(none) linux # mount -t tmpfs tmpfs /mnt/
mount: wrong fs type, bad option, bad superblock on tmpfs,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
(none) linux # tail -n 3 /var/log/messages           
Jun  1 21:46:32 test init[1]: Switching to runlevel: 6
Jun  1 21:46:34 test sshd[1031]: Received signal 15; terminating.
Jun  1 21:46:34 test syslog-ng[1003]: syslog-ng shutting down; version='3.7.3'
(none) linux #

--------
NeddySeagoon wrote:

What does
Code:
grep -i tmpfs /usr/src/linux/.config
show...
...or even better if you have /proc/config.gz
Code:
zgrep -i tmpfs  /proc/config.gz

Nothing wrong that I've been able to glean from kernel configuration options:
Code:
(none) linux # grep -i tmpfs /boot/config-4.9.20
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
(none) linux # uname -a
Linux (none) 4.9.20 #5 SMP Sat Apr 1 00:52:40 PDT 2017 x86_64 QEMU Virtual CPU v
ersion 2.5+ GenuineIntel GNU/Linux
(none) linux #

Code:
(none) linux # grep -i tmpfs /usr/src/linux/.config
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
(none) linux #


EDIT: Fix quotes and follow instructions more precisely.
Back to top
View user's profile Send private message
frostsnow
n00b
n00b


Joined: 07 Feb 2014
Posts: 20

PostPosted: Fri Jun 09, 2017 3:30 am    Post subject: Reply with quote

So it looks like I wasn't mounting '/boot' automatically and none of my kernel updates were actually being applied. I fixed this and it works now.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Fri Jun 09, 2017 8:36 am    Post subject: Reply with quote

frostsnow,

That's easily done.
Code:
uname -a
will tell you the build date/time of the running kernel
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
frostsnow
n00b
n00b


Joined: 07 Feb 2014
Posts: 20

PostPosted: Fri Jun 09, 2017 6:45 pm    Post subject: Reply with quote

NeddySeagoon wrote:
frostsnow,

That's easily done.
Code:
uname -a
will tell you the build date/time of the running kernel

Thanks, I hadn't noticed that -- I'd only used it to look at the version number and computer architecture so far.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum