I accidentally formatted boot partition, so now when I boot the computer it just said “no bootable device found". How can I repair the boot partition?

  • 1
    use a livcd to create a new one. Install grub.
    – jiggunjer
    Jan 17, 2017 at 5:19
  • in the hope you read this message... if you solve the problem pick the answer that helped you to solve the problem and upvote the all the work you find useful. If you find the solution by yourself, you can post it as your own answer...(and you can still pick another one as best answer). Welcome on SuperUser.
    – Hastur
    Mar 1, 2017 at 6:32

3 Answers 3


you could download supergrub2 put this on a cd or usb then boot into your system then reinstall grub from your system Im only guessing your using linux


use the Ubuntu installation CD to repair the installation to a working condition.

Also try attaching the disk as secondary disk in another machine and try recreating the /boot with files copied from similar OS. For more details check the link below



Depends on what you mean by "boot" partition. If it's the linux partition that is mounted as /boot then earlier answers involving 'repair', or using your original installation media and looking for a repair option, are probably all you need. I'd recommend trying the original install media first, since it's going to be closest to what you had already, but any grub tool will probably suffice.

OTH if it's the main boot partition for the system and was mounted as / in linux, without a separate /boot partition, it can be a whole lot more work. (If even possible.)

From beginning, if not already done and if you have the hardware available, make an image of the partition using something like dd before doing anything else that can possibly write to that partition.

Depending on the original file system, different tools are available to "unformat" the disk. The one I've seen most promising results from for others is TestDisk.

I can't give testimonial to that, or any other tools, since the list time I formated the wrong disk I was using DOS and had to use DOS debug and lots of hex math to recreate the FAT table by hand. :'( I haven't made that mistake again!

Hopefully you had ext3/4 and the backup superblocks will save the day. And now you have personal experience in the need for backups, and the wisdom of compartmentalized partitions. I'd rather sacrifice some diskspace to extra partitions than my data to errors - human or mechanical.

Best wishes and lots of luck.

  • Formatted two partition, an efi partition and an unknown partition.
    – edwankael
    Jan 17, 2017 at 7:59
  • The only one partition left is the xubuntu volume group (xubuntu _vg)
    – edwankael
    Jan 17, 2017 at 8:00
  • 1
    with a volume group name I'm guessing you used LVM during install, and you've entered a realm I have zero experience. Discretion being the better part of valor I must defer to other minds. I suggest you update your Q to give as much detail as possible: what command/process used to format the partitions, what the partition descriptions were (name/size/mount/etc.), and everything you've done since that might have affected the partitions. Also, “no bootable device found" looks like a BIOS message, so there may not be any partitions with the boot flag attached.
    – Chindraba
    Jan 17, 2017 at 18:25
  • Decided to switch from xubuntu to ubuntu. Xubuntu on laptop is quite a mess IMO. (Doing scaling, Bluetooth, multi monitor, etc.) I've made backup and then restore to ubuntu. It's all good now. Thanks for the help!
    – edwankael
    Jan 17, 2017 at 18:28
  • 1
    Glad you've found a solution! Not sure if it's possible, but since you're not going to try to fix the problem stated in the Q, maybe you can close the Q so others don't try to help find a solution you cannot try. Enjoy the fresh install, and practice good backups.
    – Chindraba
    Jan 17, 2017 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .