View previous topic :: View next topic |
Author |
Message |
frostsnow n00b
Joined: 07 Feb 2014 Posts: 20
|
Posted: Fri Jun 02, 2017 1:03 am Post subject: [SOLVED] Qemu refuses to mount tmpfs |
|
|
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 |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3131
|
Posted: Fri Jun 02, 2017 6:51 pm Post subject: |
|
|
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 |
|
|
frostsnow n00b
Joined: 07 Feb 2014 Posts: 20
|
Posted: Sat Jun 03, 2017 4:22 am Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Sat Jun 03, 2017 8:06 am Post subject: |
|
|
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 |
|
|
frostsnow n00b
Joined: 07 Feb 2014 Posts: 20
|
Posted: Mon Jun 05, 2017 1:35 am Post subject: |
|
|
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 |
|
|
frostsnow n00b
Joined: 07 Feb 2014 Posts: 20
|
Posted: Fri Jun 09, 2017 3:30 am Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Fri Jun 09, 2017 8:36 am Post subject: |
|
|
frostsnow,
That's easily done. 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 |
|
|
frostsnow n00b
Joined: 07 Feb 2014 Posts: 20
|
Posted: Fri Jun 09, 2017 6:45 pm Post subject: |
|
|
NeddySeagoon wrote: | frostsnow,
That's easily done. 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 |
|
|
|