Recovery from an accidental shutdown of Ubuntu (orphan cleanup on readonly fs), ubuntuorphan

Source: Internet
Author: User

Recovery from an accidental shutdown of Ubuntu (orphan cleanup on readonly fs), ubuntuorphan

The process is as follows:

I was copying a large file. Suddenly the GUI interface of ubuntu was dead and I couldn't call it back, so -- "forced shutdown

After the instance is started again, the screen is black and you cannot access the GUI.

My recovery process is as follows:

1. Press Ctrl + Alt + F1 on the black screen

2. Enter the user name and password to go To the cli interface.

3. View dmesg | less and enter/sda to search for disk information. Find the following information:

[    3.746177] EXT4-fs (sda3): INFO: recovery required on readonly filesystem[    3.746181] EXT4-fs (sda3): write access will be enabled during recovery[    3.929572] random: nonblocking pool is initialized[    5.484289] EXT4-fs (sda3): orphan cleanup on readonly fs[    5.484354] EXT4-fs (sda3): 5 orphan inodes deleted[    5.484356] EXT4-fs (sda3): recovery complete[    5.565464] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)

Sda3 is my Ubuntu partition. It seems that the copy file was suddenly terminated due to my forced shutdown, and the orphan inode problem occurred. linux automatically restored the file:

4. Check the current mount status and find that the primary partition is read-only:

peter@DELL-XPS-L502X:/var/log$ man mountpeter@DELL-XPS-L502X:/var/log$ mount/dev/sda3 on / type ext4 (ro,errors=remount-ro)proc on /proc type proc (rw,noexec,nosuid,nodev)sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)none on /sys/fs/cgroup type tmpfs (rw)none on /sys/fs/fuse/connections type fusectl (rw)none on /sys/kernel/debug type debugfs (rw)none on /sys/kernel/security type securityfs (rw)udev on /dev type devtmpfs (rw,mode=0755)

5. Now mount the primary partition to rw using mount-.

peter@DELL-XPS-L502X:/var/log$ sudo mount -a
peter@DELL-XPS-L502X:/var/log$ sync ; sudo reboot -f

After the restart, ubuntu automatically enters the GUI.

Ubuntu/Linux still has a long way to go in the face of human nature. However, it is helpful for technicians to view dmesg in this case.

 




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.