Ubuntu 19.10 -> ubuntu 18.04.4 LTS
kernel version: 5.3.0-29-generic -> 4.9.102
$ ls mount/
$ cat mount/vanakkam
以上兩個指令需要 sudo 權限。
$ echo "Hello World" > mount/hello
以上指令失敗,權限不足。
$ cat mount/hello
推測無法創建 hello 這個 file,自然透過 cat 也無法印出任何東西。
得到以下錯誤:
simple-test.sh: line 18: /sys/module/jbd2/parameters/jbd2_debug: No such file or directory
根據 https://cateee.net/lkddb/web-lkddb/JBD2_DEBUG.html 看起來應該是沒打開
CONFIG_JBD2_DEBUG
,有待驗證。
透過 $ cat /boot/config-5.3.0-29-generic | grep CONFIG_JBD2_DEBUG
確認,確實沒打開。
如果要打開這個 config,只能夠重新編 linux kernel 了。
$ apt-get source linux-image-$(uname -r)
$ cd linux-signed-5.3.0/
$ chmod a+x debian/rules
haogroot@haogroot-TP:~/linux-signed-5.3.0$ fakeroot debian/rules editconfigs
dh editconfigs
dh: Unknown sequence editconfigs (choose from: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep)
make: *** [debian/rules:37: editconfigs] Error 255
google 到看來有許多人照著這個 wiki 都碰到類似問題…
JBD2 (ext4) debugging support
更新完後開機,卡在紫色畫面… google 有看到一些討論,有可能是硬體 bios 的問題或是 intel microcode 的問題,再看到 ubuntu 目前官方最新支援到 5.3.0.29,先暫時放棄升級到 5.4.17,之後應該會選擇低於 5.3.0.29 的版本
參考此篇,以原本的 kernel version 來重新編譯
root@haogroot-TP:/usr/src/linux# fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
編譯失敗,因為硬碟空間不足…
Intall linux headers 失敗,但我透過 $ sudo apt-get install linux-headers-generic
安裝,顯示安裝了 linux-headers-4.15.0-76-generic
執行 $ echo "Hello World" > mount/hello
權限不足
給予 /mount 權限後 (chmod 777 mount
),再度執行$ echo "Hello World" > mount/hello
,顯示以下錯誤。
bash: echo: write error: Read-only file system
可以成功建立檔案,但無法寫入。
$ ls -lR
set -x // 執行指令後會顯示所有指令
[ -d "$test_mount_point" ] // test_mount_point 是不是 directory
dd bs=4096 count=100 if=/dev/zero of="$1"
./mkfs-simplefs "$1"
/dev/zero
: when you read this special file, it will provies you null characterloop device is a pseudo-device
that makes a file accessible as a block device.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing