← Back to DatabaseHow to Fix Error: No such device
Topic: Linux Ubuntu Boot Errors | Status: Updated
What is this error?
The "Error: No such device" message in Ubuntu occurs during the boot process when the system cannot find the specified disk or partition containing the bootloader or operating system files. This typically suggests an issue with the drive's configuration, file system corruption, or hardware failure.
How to Fix It
- Check BIOS/UEFI Settings: Restart your computer and enter the BIOS/UEFI setup (usually by pressing F2, F10, or Delete). Ensure that the correct boot device is selected and the drive is recognized by the system.
- Boot from Live USB/CD: Create a bootable USB or CD with Ubuntu, then boot from it. Choose "Try Ubuntu" to access the live environment.
- Open Terminal: In the live environment, open a terminal by pressing Ctrl + Alt + T.
- Identify Disk Partitions: Run the command
sudo fdisk -l to list all disk partitions. Identify the correct partition for your operating system (e.g., /dev/sda1).
- Run fsck: Execute
sudo fsck /dev/sda1 (replace /dev/sda1 with your identified partition) to check for and fix file system issues.
- Reinstall GRUB: If the file system check completes without issues, install GRUB bootloader by running
sudo mount /dev/sda1 /mnt and sudo grub-install --boot-directory=/mnt/boot /dev/sda.
- Update GRUB Configuration: Run
sudo update-grub to update the GRUB configuration file.
- Restart the System: Exit the live environment and restart your computer. Remove the USB/CD and check if the system boots correctly.
Disclaimer: This is an educational guide. We are not responsible for data loss. Always backup your system.