LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2019, 03:41 PM   #1
Choklit
LQ Newbie
 
Registered: Mar 2019
Posts: 6

Rep: Reputation: Disabled
Red face How do I reinstall Grub and Efi (or Uefi) on my external HDD after I accidentally deleted the partition.


I run Ubuntu 18.04 dual-boot with Windows XP. I recently was trying to recover a sad USB drive using "Disks" and accidentally hit delete and wiped the partition containing Grub and whatever else needed to boot my PC.
I have been running this PC by starting from my ext HDD which gives me the option to start Ubuntu or Windows.
I would like to reinstall the files needed to start my PC without deleting all the other files on the Ext HDD.
I have taken a snapshot of the HDD shown by TestDisk and one Shown by G-parted if that is of any help in finding a solution. I will be deeply grateful for any help at all please.
Attached Files
File Type: pdf ScreenShot-USB-HDD.pdf (370.5 KB, 49 views)
 
Old 12-17-2019, 06:05 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,573

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
It is very difficult to view the images you posted but from what I can see, you have Linux (Ubuntu) on sdb. Where is XP, on another drive? Is this an EFI install of Ubuntu? There is not EFI partition and I'm not sure that XP can be installed and/or boot from a GPT or EFI install. As far as reinstalling Grub, the Ubuntu site at the link below gives a number of methods to use in different situations.

https://help.ubuntu.com/community/Grub2/Installing
 
Old 12-23-2019, 10:16 PM   #3
Choklit
LQ Newbie
 
Registered: Mar 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you Yancek I shall read those notes but meantime I repost the images. Maybe you can see something else missing. I think I accidentally deleted the partition also??
Attached Files
File Type: pdf ScreenShot-USB-HDD.pdf (327.0 KB, 38 views)

Last edited by Choklit; 12-23-2019 at 10:20 PM. Reason: Forgot images
 
Old 12-24-2019, 06:09 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,573

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
The image in your second post shows you have 2 500GB hard drives. The GParted shows 41GB unallocated space after the first partition. Is this where the partition was that you deleted? Is your old xp on the other drive? Did you have a separate boot partition for Ubuntu in this space? Seems unlikely there would be a 40GB boot partition. Is this the drive on which you have Ubuntu as there only Linux partitions there? Is this a Legacy install where you have Grub boot code in the MBR? If so, on which drive do you usually boot from?
 
Old 12-24-2019, 03:42 PM   #5
Choklit
LQ Newbie
 
Registered: Mar 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for the quick reply and Merry Christmas to you and yours.
I shall work my way through your questions and get back to you soon.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ooooy. EFI boot mmx64.efi.efi not found bulgin Linux - Newbie 12 12-20-2018 11:03 AM
[SOLVED] Can't find /boot/efi/EFI/Slackware/vmlinuz kernel configuration ironQiu Slackware 4 02-09-2015 06:21 AM
boot efi disk with without a non-efi bios pc... masavini Programming 1 11-12-2013 08:48 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
EFI main GPT overwritten everytime (when windows 7 runs) - structure of EFI masuch Linux - Newbie 2 07-20-2012 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration