LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-27-2018, 10:19 PM   #1
StevenSmithCIS
Member
 
Registered: Sep 2017
Location: Washington
Distribution: Mint 18.x
Posts: 39

Rep: Reputation: Disabled
Fixing MBR (Boot Record) Kali (I know, I know..)


Greetings again. I've read the sticky about Kali, and I know. It's just the version I installed because it was the one we used in school, and was before I'd gotten on here. I also have Mint installed.

My question is: Some time ago, somehow, my boot record must've gotten nuked. I have several partitions with different OS's, but I nuked (on purpose) my Windows partition. Since then, it won't boot.. just says it can't find the operating system, even though I KNOW there is ONE on an external drive, and two others on my hard drive.

What would I have to do to get it to boot up again? Right now, I'm using a live USB stick I made. I'd eventually like to put another flavor where Windows used to be, but want to get it to boot first.

Thank you for any help. I understand if nobody wants to help. :/

FDISK -l Dump:

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 9E6C7635-5EF7-4C37-A94F-C3BB98660A15

Device Start End Sectors Size Type
/dev/sda1 2048 1339070463 1339068416 638.5G Linux filesystem
/dev/sda4 1339070464 1936906239 597835776 285.1G EFI System
/dev/sda5 1936906240 1952602111 15695872 7.5G Linux swap




Disk /dev/sdb: 7.6 GiB, 8166703104 bytes, 15950592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x025df2bd

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 15950591 15948544 7.6G c W95 FAT32 (LBA)


Disk /dev/sde: 149.1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x44fdfe06

Device Boot Start End Sectors Size Id Type
/dev/sde1 * 63 312576704 312576642 149G 83 Linux


Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x955ded33

Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 501622783 501620736 239.2G 7 HPFS/NTFS/exFAT
/dev/sdc2 501622784 1236725759 735102976 350.5G 83 Linux
/dev/sdc3 1236727806 1529694207 292966402 139.7G 5 Extended
/dev/sdc5 1236727808 1529694207 292966400 139.7G 83 Linux


Disk /dev/loop0: 2.4 GiB, 2558234624 bytes, 4996552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
Old 01-27-2018, 10:31 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,062

Rep: Reputation: 2895Reputation: 2895Reputation: 2895Reputation: 2895Reputation: 2895Reputation: 2895Reputation: 2895Reputation: 2895Reputation: 2895Reputation: 2895Reputation: 2895
Hmmmm ...
Code:
/dev/sda4 1339070464 1936906239 597835776 285.1G EFI System
285G ???. What filesystem ?.

If this is indeed a UEFI based system, go into the boot menu, and change the default boot to one you know exists - Linux is fine. Start with the simple possibilities first ...
 
Old 01-27-2018, 10:46 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
I would reinstall grub. Do you know how to do that?
 
1 members found this post helpful.
Old 01-30-2018, 10:29 PM   #4
StevenSmithCIS
Member
 
Registered: Sep 2017
Location: Washington
Distribution: Mint 18.x
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Hmmmm ...
Code:
/dev/sda4 1339070464 1936906239 597835776 285.1G EFI System
285G ???. What filesystem ?.

If this is indeed a UEFI based system, go into the boot menu, and change the default boot to one you know exists - Linux is fine. Start with the simple possibilities first ...
File system *should* be EXT2 according to gparted.

You mean BIOS boot menu? It doesn't have anything there, obviously.. just hardware devices.

I'm really new to linux, and have never had this problem before, so not sure what you mean by the boot menu. (?)

Thank you.

Last edited by StevenSmithCIS; 01-30-2018 at 10:34 PM. Reason: Add possible file system type I forgot
 
Old 01-30-2018, 10:29 PM   #5
StevenSmithCIS
Member
 
Registered: Sep 2017
Location: Washington
Distribution: Mint 18.x
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
I would reinstall grub. Do you know how to do that?
No.
 
Old 01-30-2018, 10:52 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,322
Blog Entries: 25

Rep: Reputation: 4390Reputation: 4390Reputation: 4390Reputation: 4390Reputation: 4390Reputation: 4390Reputation: 4390Reputation: 4390Reputation: 4390Reputation: 4390Reputation: 4390
To format your MBR under Linux, use dd: https://www.axllent.org/docs/view/erase-your-mbr/

Here's another article that might be helpful: https://neosmart.net/wiki/fix-mbr/

You may then have to update/reinstall GRUB. http://www.brighthub.com/computing/l...les/36648.aspx
 
Old 01-30-2018, 11:22 PM   #7
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 972

Rep: Reputation: 259Reputation: 259Reputation: 259
Quote:
Originally Posted by StevenSmithCIS View Post
You mean BIOS boot menu? It doesn't have anything there, obviously.. just hardware devices.

I'm really new to linux, and have never had this problem before, so not sure what you mean by the boot menu. (?)
Obviously you didn't look hard enough, don't know how to navigate the bios which is easy if you can read what's in there, or you don't know how to read. Every bios or EFI firmware interface (computer settings) have a boot section in settings that allow you to prioritize boot devices. You can set the internal drive first, CD drive second, or second internal drive as second boot device, or network boot device, floppy drive, USB drive etc. etc. etc. If you can add drives to the computer, you can select which drive to boot.

Go back and take a harder look. If you can't read this post, ask a friend to do it for you.
 
1 members found this post helpful.
Old 01-31-2018, 06:23 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,574

Rep: Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760Reputation: 1760
You indicate you "had" some release of windows, which one? The reference in your original output indicates you have an EFI partition. Newer windows (8 & 10) pre-installed were almost always EFI, is that what you had? Might help if you indicate which Linux versions you think you have installed.

Which Linux are you using on the usb?
Try mounting /dev/sda4 and posting the output, you can do an online search for mount Linux partition and get thousands of hits, pretty simple.
As suggested above, a more thorough search through your BIOS might provide something. If you indeed have an EFI system you should see "boot from EFI file" or something similar in the boot options.
 
Old 01-31-2018, 10:30 AM   #9
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Posts: 3,092

Rep: Reputation: Disabled
I wouldn't start from here!

Looking at sda, this is where I'd start, back up anything you want off of this disk, then reinstall Linux on there.
Once you have a working Linux on sda, add your other disks boot details to your grub.cfg - that should then let you choose which to boot at start up.
 
Old 01-31-2018, 02:07 PM   #10
StevenSmithCIS
Member
 
Registered: Sep 2017
Location: Washington
Distribution: Mint 18.x
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Brains View Post
Obviously you didn't look hard enough, don't know how to navigate the bios which is easy if you can read what's in there, or you don't know how to read. Every bios or EFI firmware interface (computer settings) have a boot section in settings that allow you to prioritize boot devices. You can set the internal drive first, CD drive second, or second internal drive as second boot device, or network boot device, floppy drive, USB drive etc. etc. etc. If you can add drives to the computer, you can select which drive to boot.

Go back and take a harder look. If you can't read this post, ask a friend to do it for you.
Lol. I've been in the BIOS several times and haven't seen any Linux 'drives' to boot from, but I'll look again and see if there is something else that I haven't already seen. As far as I know, BIOS only contains HARDWARE to boot from, not the software that boots from each drive...
 
Old 01-31-2018, 02:19 PM   #11
StevenSmithCIS
Member
 
Registered: Sep 2017
Location: Washington
Distribution: Mint 18.x
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
You indicate you "had" some release of windows, which one? The reference in your original output indicates you have an EFI partition. Newer windows (8 & 10) pre-installed were almost always EFI, is that what you had? Might help if you indicate which Linux versions you think you have installed.

Which Linux are you using on the usb?
Try mounting /dev/sda4 and posting the output, you can do an online search for mount Linux partition and get thousands of hits, pretty simple.
As suggested above, a more thorough search through your BIOS might provide something. If you indeed have an EFI system you should see "boot from EFI file" or something similar in the boot options.
I had Windows 8.1

Kali Linux on the USB

I'll be honest, I know NOTHING about the mounting process and it confuses me a bit, as a long-time Windows user (out of necessity).

If I do a "mount /dev/sda4" it gives me: "mount: /: /dev/sda4 already mounted on /."

Ok, yeah, I've done searching online before and come up with thousands of things. That's usually how I end up messing something up even worse, by trying several different things, and not knowing exactly what I'm doing, which is why I just came here instead.

Ok, well. NBD I guess. Perhaps I'll just poke around and try to figure it out. Might take me a week or two, but my other work is going okay, so I have a little time now.

Thank you!
 
Old 01-31-2018, 03:04 PM   #12
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 972

Rep: Reputation: 259Reputation: 259Reputation: 259
Quote:
Originally Posted by StevenSmithCIS View Post
Lol.not the software that boots from each drive...
UEFI firmware interface is software based, not a bios. And the file you would specify to boot from the interface has a .efi extension, it is also software.

This is what syg00 was referring too. Because of the 285.1GB "EFI" partition which would be formatted FAT32 (LIKE /dev/sdb1). Pretty much all computers with Windows 8.1 pre-installed are UEFI. The UEFI firmware interface is configured to boot Windows 8.1 by default without entering the interface settings. Now that the default boot item "Windows" is gone, you can press an F (F10, F11, F12) key to get a boot menu and select another OS that was installed before Windows was deleted, which in turn would be selecting a "software" file, but all you would see is the name it was given in the menu.

Typically Windows would have been installed on /dev/sda, the first drive listed and labeled GPT, this is also the drive Fdisk utility reported a EFI partition. So why don't you entertain us and tell us "where was Windows?", it looks like you already installed Linux on that drive and deleted the Microsoft reserved partition and the recovery partition. Everything points to a UEFI system.

We are here to help, but you don't tell us information we need, you just expect us to guess from the Fdisk output you posted.

As mentioned, entertain us with the mess you presented.
 
Old 01-31-2018, 03:06 PM   #13
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 972

Rep: Reputation: 259Reputation: 259Reputation: 259
All I can figure out here is that you screwed up the EFI FAT formatted boot partition and you won't be able to boot anything till you re-do the whole damn thing. But talk to the pros first this time.
 
Old 01-31-2018, 03:14 PM   #14
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 972

Rep: Reputation: 259Reputation: 259Reputation: 259
The EFI boot (system) partition is only supposed to be 200-300MB, not 285GB, everything required to boot your systems was in there.
 
Old 01-31-2018, 03:23 PM   #15
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 972

Rep: Reputation: 259Reputation: 259Reputation: 259
Quote:
Lol
And stop laughing at people willing to help, we didn't do this stupidity, you did!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Fixing MBR with lilo with a non-boot drive galapogos Linux - Kernel 3 01-31-2011 02:04 PM
volume boot record is the same as MBR? miros84 Linux - Software 10 10-29-2010 09:46 AM
fixing boot/mbr via linux stevewm Linux - Newbie 9 05-20-2009 02:03 AM
Moving boot record to mbr raypen Linux - General 5 04-10-2008 08:33 AM
boot record (MBR) emperor13 Linux - General 1 12-01-2001 11:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:19 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration