I accidentally copied files into my boot sector. It is 512 mb and is full. Will not let me boot Elementary. How can I fix the boot sector? How do I delete and replace if that is the best way?
I accidentally copied files into my boot sector. It is 512 mb and is full. Will not let me boot Elementary. How can I fix the boot sector? How do I delete and replace if that is the best way?
Do you have the Elementary install DVD or USB or any other Linuxx?
Do you know how to create a mount point for the partition and mount it using a 'live' system?
If you simply copied files to the wrong partition, why not just remove them? Or did you overwrite some boot files?
The files are in the partition which holds the EFI boot loader. I cannot get permission to change anything. I tried to iu increase the size of the partition and could not do that. I do have Elementary on USB and DVD. I also have Ubuntu 18.04 on DVD. I have been a user of Linux for more than 10 years, but this problem has me stumped.
I believe I did not overwrite any files. I can get Elementary to work on my Virtualbox VM. It simply will not load to my hard drive as the boot sector is "full" according to an alert which comes up each time I boot the Ubuntu 18.04.
Any suggestions will be deeply appreciated. Not sure I can "create a mount point for the partition and mount it using a 'live' system?"
How did you manage to "accidentally" copy files into the EFI or boot partition?
You could only have done that either by acting as root with a sudo command in terminal or perhaps by using a file manager as root; I hope you were not logged in as root.
Does Elementary even allow logging in as root by default or is it like Ubuntu where the root account is disabled by default?
Finally, how many kernels are installed in your system? If you have added many new kernels without any being removed either manually by you or automatically by the system, there may be too many for the size of the partition.
Let's see the output of terminal command df -hT which may help us more, and sudo ls -la /boot
Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo --- Wireless-Info --- SolvedThreads --- System-Info-Script
ajgreeny:
I did the deed when I was making a USB to load Elementary using unetbootin. Missed the boot sector was selected by unetbootin. Not being careful.
Here are the results of the commands you asked for:
Hope this helps. I am stumped. Thank you for your kind help.Code:bob@robert-VivoBook-ASUS:~$ sudo df -hT Filesystem Type Size Used Avail Use% Mounted on udev devtmpfs 1.9G 0 1.9G 0% /dev tmpfs tmpfs 376M 2.0M 374M 1% /run /dev/mmcblk0p2 ext4 110G 58G 47G 55% / tmpfs tmpfs 1.9G 202M 1.7G 11% /dev/shm tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/loop0 squashfs 9.2M 9.2M 0 100% /snap/canonical-livepatch/94 /dev/loop2 squashfs 90M 90M 0 100% /snap/core/8268 /dev/loop3 squashfs 3.8M 3.8M 0 100% /snap/gnome-system-monitor/127 /dev/loop1 squashfs 4.3M 4.3M 0 100% /snap/gnome-calculator/544 /dev/loop6 squashfs 15M 15M 0 100% /snap/gnome-characters/399 /dev/loop4 squashfs 45M 45M 0 100% /snap/gtk-common-themes/1440 /dev/loop5 squashfs 1.0M 1.0M 0 100% /snap/gnome-logs/81 /dev/loop7 squashfs 161M 161M 0 100% /snap/gnome-3-28-1804/116 /dev/loop8 squashfs 92M 92M 0 100% /snap/core/8689 /dev/loop9 squashfs 55M 55M 0 100% /snap/core18/1668 /dev/mmcblk0p1 vfat 511M 511M 0 100% /boot/efi tmpfs tmpfs 376M 20K 376M 1% /run/user/121 tmpfs tmpfs 376M 28K 376M 1% /run/user/1000 /dev/mmcblk1p1 ext4 117G 7.2G 104G 7% /media/bob/Memory bob@robert-VivoBook-ASUS:~$ sudo ls -la /boot total 108632 drwxr-xr-x 4 root root 4096 Mar 16 16:23 . drwxr-xr-x 24 root root 4096 Mar 16 16:23 .. -rw-r--r-- 1 root root 235810 Feb 3 08:07 config-5.3.0-40-generic -rw-r--r-- 1 root root 235831 Feb 28 07:40 config-5.3.0-42-generic drwx------ 10 root root 4096 Dec 31 1969 efi drwxr-xr-x 5 root root 4096 Mar 16 16:23 grub -rw-r--r-- 1 root root 41462198 Mar 14 11:48 initrd.img-5.3.0-40-generic -rw-r--r-- 1 root root 41456176 Mar 16 16:23 initrd.img-5.3.0-42-generic -rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin -rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf -rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin -rw------- 1 root root 4483816 Feb 3 08:07 System.map-5.3.0-40-generic -rw------- 1 root root 4485514 Feb 28 07:40 System.map-5.3.0-42-generic -rw------- 1 root root 9138424 Feb 3 08:11 vmlinuz-5.3.0-40-generic -rw------- 1 root root 9142520 Feb 28 07:41 vmlinuz-5.3.0-42-generic
Last edited by ajgreeny; March 17th, 2020 at 05:35 PM. Reason: Code tags
Above is the EFI partition which shows as 100% full so you can simply navigate to /boot/efi in a terminal (cd /boot/efi) and remove the incorrect files, you need to use sudo as the files are owned by root./dev/mmcblk0p1 vfat 511M 511M 0 100% /boot/efi
Yahcek:
Got into the sector by using sudo...now I am not sure what files to delete. Do I delete everything but the EFI? Not sure how to proceed after getting into the files. Any suggestions?
Thanks for your help this far. Much appreciated.
Post back here the output of sudo ls -la /boot/efi/EFI and we are more likely to be ale to tell you what can be deleted.
Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo --- Wireless-Info --- SolvedThreads --- System-Info-Script
ajgreeny:
Here is the output:
bob@robert-VivoBook-ASUS:~$ sudo ls -la /boot/efi/EFI
[sudo] password for bob:
total 16
drwx------ 4 root root 4096 Mar 6 22:10 .
drwx------ 10 root root 4096 Dec 31 1969 ..
drwx------ 2 root root 4096 Mar 13 12:21 BOOT
drwx------ 3 root root 4096 Mar 6 22:11 ubuntu
Thanks for your help on this. Much appreciated. And next time I use unetbootin I will be much more careful...measure twice and cut once as they say.
The directories you show from the /boot/efi/EFI output are all standard directories expected to be there so would need to look in the various directories to see what is there. If you don't know what is expected, you could run the same command but show what is in the directories BOOT and ubuntu.
Bookmarks