概述
I tried to install 2.6.18 kernel in my Debian 5.10, but it could not boot normally. It ended up in initramfs. There was something wrong with my SATA controller driver. /root device cannot be detected or mounted.
in initramfs, we can use dmesg to check the boot message. However, the screen size is too limited. It only displayed the message in the tail. Plus, the less command is not found.
Solution:
Move the dmesg output to a usb device.
1. dmesg > /tmp/do
2. format a usb device in another computer first. You don't need a partition in the device. Just fill the usb with all zeros. The process will take a while.
3. After the formating is done, plug in the empty usb device into the problematic machine (debian 5.10, in my case).
4. it will display the usb drive as /dev/sda.
5. write the dmesg output to the usb using cmd:
dd if=/tmp/do of=/dev/sda
6. it will be done very shortly. Then remove the usb and plug it in another computer.
7. Don't mount it. Use
cat /dev/sdb > dmesg_output
to put all the output to the file. Remember to just press ctrl+c to end this command quickly. Otherwise it will fill the dmesg_output file with all zero and the file size will be huge.
Finally you have the dmesg_output with you! You can figure out what it is going on there.
最后
以上就是幸福红牛为你收集整理的How to get the dmesg output in initramfs (debian)的全部内容,希望文章能够帮你解决How to get the dmesg output in initramfs (debian)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复