Dual Boot Issue: FSCK Error on Ubuntu (sda6) UEFI Boot System
In this article, we will discuss a common issue faced by users who have a dual boot system with both Windows 10 and Ubuntu, using UEFI boot based on two physical SSDs. Specifically, we will focus on the error that occurs when trying to shrink the Ubuntu partition (sda6) and boot Ubuntu, resulting in a kernel issue.
Dual Boot System and UEFI Boot
A dual boot system is a configuration that allows users to run two different operating systems on the same computer. This can be useful for people who need to use different operating systems for different tasks. In this case, we are looking at a system with both Windows 10 and Ubuntu installed, using the newer UEFI boot system.
UEFI (Unified Extensible Firmware Interface) is a modern replacement for the traditional BIOS (Basic Input/Output System) firmware that boots a computer. It provides a more secure and flexible boot environment. When installing an operating system on a UEFI-based system, a special partition is created to store the bootloader and other system files.
Shrinking the Ubuntu Partition (sda6)
Shrinking a partition involves reducing its size and creating free space on the hard drive. This can be useful when you want to allocate more space to another partition or install a new operating system. To shrink the Ubuntu partition (sda6), you can use the built-in resize2fs command or a third-party partition management tool.
sudo resize2fs /dev/sda6 80GIn this example, the Ubuntu partition (sda6) is being resized to 80GB, creating free space on the hard drive.
FSCK Error on Ubuntu (sda6)
After shrinking the Ubuntu partition (sda6), you might encounter an FSCK error when booting Ubuntu. FSCK (File System Check) is a tool used to check and repair file system inconsistencies or errors. An FSCK error can occur due to a variety of reasons, such as power outages, system crashes, or unclean shutdowns.
/dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)To fix the FSCK error on Ubuntu (sda6), you can manually run the fsck command or use the -a or -p options to automatically repair the file system. However, if the error persists, it might be due to the UEFI boot system.
UEFI Boot System and Kernel Issues
A UEFI boot system uses the GUID Partition Table (GPT) to manage partitions, which differs from the Master Boot Record (MBR) used by traditional BIOS-based systems. The GPT stores a backup of the partition table on the end of the disk, known as the GPT header. The GPT header contains information about the disk and partitions, including the UEFI boot partition.
If the GPT header is damaged or corrupted, it can cause kernel issues when booting Ubuntu. To fix this issue, you can use the gdisk command to repair the GPT header:
sudo gdisk /dev/sda
r (to enter the recovery & repair menu)
e (to check the GPT header)
w (to write the changes to the disk)After repairing the GPT header, you can reinstall the GRUB bootloader to ensure that Ubuntu boots correctly:
sudo apt
```