
Ubuntu日本語フォーラム

ログインしていません。
こんにちは、初めての投稿です。お手柔らかにお願いします。m(_ _)m
Ubuntu Desktop 18.04 LTS は、64bitしかありませんが、メモリーの少ない環境なので、Lubuntu 18.04 32bitを使用しています。
1GBメモリーでインストール後、アップデートをかけると /swapfileは2GBあるのに、スワップが60KBしか使用できないという問題に遭遇しました。
どうやらカーネルのバグのようで、カーネルのに違うリリースに更新したら回避できたので、ご報告します。
CohoHa VPS CPU x2 Memory 1GB SSD 50GBを使用。
Lubuntu 18.04.1 32bit を日本語で最小インストール
lubuntu-18.04.1-desktop-i386.iso を使用
インストールされたリリース 4.15.0-29-generic Ubuntu 18.04.1 LTS
free -h で表示されるスワップサイズと/swapfileはともに2GBで一致している。 Swap total 2.0G /swapfile 2.0G
次のアップデート後、Swapサイズがおかしくなる
apt update
apt upgrade
apt autoremove
reboot
アップデート後のリリース表示 4.15.0-34-generic Ubuntu 18.04.1 LTS
スワップサイズが60KBになってしまう。Swap total 60K /swapfile 2.0G
つぎのアーティクルを発見した。Linux Kernelのバグの疑いあり
Ubuntu 14.04 32 bit swapfile max 60k issue
https://unix.stackexchange.com/questions/465718/ubuntu-14-04-32-bit-swapfile-max-60k-issue
My guess is based on this Linux Kernel Mailing List entry from last week: https://lkml.org/lkml/2018/8/20/172
From Vlastimil Babka <> Subject [PATCH] x86/speculation/l1tf: fix overflow on l1tf_pfn_limit() on 32bit Date Mon, 20 Aug 2018 11:58:35 +0200 On 32bit PAE kernels on 64bit hardware with enough physical bits, l1tf_pfn_limit() will overflow unsigned long. This in turn affects max_swapfile_size() and can lead to swapon returning -EINVAL. This has been observed in a 32bit guest with 42 bits physical address size, where max_swapfile_size() overflows exactly to 1 << 32, thus zero, and produces the following warning to dmesg: [ 6.396845] Truncating oversized swap area, only using 0k out of 2047996k Fix this by using unsigned long long instead. Reported-by: Dominique Leuenberger <[email protected]> Reported-by: Adrian Schroeter <[email protected]> Fixes: 17dbca119312 ("x86/speculation/l1tf: Add sysfs reporting for l1tf") Fixes: 377eeaa8e11f ("x86/speculation/l1tf: Limit swap file size to MAX_PA/2") [...]
I'm afraid there's probably not much you can do except waiting until this kernel bug is fixed and the patched version gets released to Ubuntu.
Edit: alternatively, you can of course roll back to one of the previous kernel versions without any L1TF mitigation matches to be able to use swap again. Keep in mind that of course this makes you vulnerable to a critical security issue again though, so be careful and update again as soon as a fix is out.
Kernelをアップデートしたら解決した
次のファイルをダウンロードして、V4.15.18にアップデート
Build for i386 succeeded (see BUILD.LOG.i386):
linux-headers-4.15.18-041518_4.15.18-041518.201804190330_all.deb
linux-headers-4.15.18-041518-generic_4.15.18-041518.201804190330_i386.deb
linux-headers-4.15.18-041518-lowlatency_4.15.18-041518.201804190330_i386.deb
linux-image-4.15.18-041518-generic_4.15.18-041518.201804190330_i386.deb
linux-image-4.15.18-041518-lowlatency_4.15.18-041518.201804190330_i386.deb
アプデート後のリリース表示 4.15.18-041518-lowlatency Ubuntu 18.04.1 LTS
スワップサイズが/swapfileの大きさと一致するようになった。 Swap total 2.0G /swapfile 2.0G
次のアーティクルを参考にカーネルを更新した。
How to update kernel to the latest mainline version without any Distro-upgrade?
https://askubuntu.com/questions/119080/how-to-update-kernel-to-the-latest-mainline-version-without-any-distro-upgrade
The simplest set of instructions I always used for kernel upgrade / downgrade are by ubuntuforums.org user by the name of lykwydchykyn (url modified by me for this post):
Go here: http://kernel.ubuntu.com/~kernel-ppa/mainline/
Download 3 (maybe 4) debs to a folder somewhere:
linux-headers-VERSION-NUMBER_all.deb linux-headers-VERSION-NUMBER_amd64.deb linux-image-VERSION-NUMBER_amd64.deb linux-image-extra-VERSION-NUMBER_amd64.deb # if available
Install the debs with whatever package manager front-end you use (is gdebi still around?), or use these commands:
cd /path/to/folder/where/you/put/the/debs sudo dpkg -i *.deb
Sources:
https://wiki.ubuntu.com/Kernel/MainlineBuilds
http://ubuntuforums.org/showthread.php?p=11391743#post11391743
以上
オフライン