LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Closed Thread
  Search this Thread
Old 04-24-2016, 06:42 PM   #1
mike_mck2
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Slackware
Posts: 41

Rep: Reputation: 1
Screwed up my UEFI partition


Well, I messed up my UEFI partition.

I picked up a Thinkpad X220 with Win 7 pro on it, and I installed Slackware 14.2 for a dual boot. During installation, the setup didn't offer ELILO, only LILO.
I skipped the LILO installation, rebooted, and made sure I was set for both UEFI and Legacy boot, with Legacy first.
Booted off of the Slack CD and ran pkgtool and tried to setup ELILO, but it just dumped me back to the main menu.

I also tried to install LILO to /dev/sda2, the root partition of the Win7 partition, but lilo warned me that this would destory my data on that partition and would not install.

Anyway, I went ahead and installed LILO to the MBR of /dev/sda, which was of course the UEFI partion. I think.....

Anyway, while I'm not especially interested in booting into Win7, I would like to have the option, just in case.

Is there anything I can do to recover the UEFI partion at this point?


Win7 is on /dev/sda2, 337mb partition on /dev/sda1, slackware is on /dev/sda3

TIA
 
Old 04-24-2016, 08:23 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
Quote:
Originally Posted by mike_mck2 View Post
Well, I messed up my UEFI partition.
Nothing in your post indicates that you actually have an EFI partition.

But if you do that is certainly /dev/sda1. But maybe /dev/sda1 it is just the Windows 7 system partition. In any case, if you have one what you did didn't screw it up (see below).

Quote:
I picked up a Thinkpad X220 with Win 7 pro on it, and I installed Slackware 14.2 for a dual boot. During installation, the setup didn't offer ELILO, only LILO.
This is because your firmware was set to boot either in Legacy mode, or maybe in both UEFI and Legacy but with priority Legacy

Quote:
I skipped the LILO installation, rebooted, and made sure I was set for both UEFI and Legacy boot, with Legacy first.
Booted off of the Slack CD and ran pkgtool and tried to setup ELILO, but it just dumped me back to the main menu.
Of course as you are in Legacy mode Linux has no way to "talk" to the EFI firmware.

Tu be able to run ELILO you must be in UEFI mode.

But in this mode you won't be able to boot Linux because you have no EFI boot file (yet).

Quote:
Anyway, I went ahead and installed LILO to the MBR of /dev/sda, which was of course the UEFI partion. I think....
Of course not. /dev/sda is the whole device (the disk) whereas the EFI partition (if it exists) is just a slice of it and the MBR (Master Boot Record) is a partition table, not a partition.

Quote:
Anyway, while I'm not especially interested in booting into Win7, I would like to have the option, just in case.

Is there anything I can do to recover the UEFI partition at this point?
Again we are not sure there actually is one so far.

Quote:
Win7 is on /dev/sda2, 337mb partition on /dev/sda1, slackware is on /dev/sda3
We need to fist make sure what's what and if you really have an EFI partition

Please post the output of following commands, typed as root:
Code:
lsblk -o model,name,fstype,size,mountpoint
fdisk -l|sed -n "\@/dev@p"
But if /dev/sda1 is actually a Windows system partition (probably with an ntfs file system then) just appending the following stanza to /etc/lilo.conf should allow you to boot Windows 7:
Code:
other=/dev/sda1
label=windows
table=/dev/sda
Do that first, then run "lilo -t -v" and check for any error.

If all seems to go well, then type "lilo" to actually write the boot loader and reboot after that.

You should then see a "windows" entry in the boot menu and be able to start Windows.

If that works, there is no need to switch to UEFI.

Last edited by Didier Spaier; 04-24-2016 at 08:44 PM.
 
Old 04-24-2016, 08:54 PM   #3
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Dupe: http://www.linuxquestions.org/questi...on-4175578177/
 
Old 04-24-2016, 08:55 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Duplicate thread - see here.
 
  


Closed Thread



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
how to install linux mint side by side windows into an uefi machine without uefi partition valgalsan Linux - Newbie 2 11-03-2015 12:25 PM
Do I Need a Special UEFI Boot Partition? joncr SUSE / openSUSE 4 10-05-2012 09:15 AM
My Partition Screwed Up After Upgrade!! hitmen Linux - Newbie 1 08-27-2012 03:07 AM
HELP! partition table screwed up CARLiCiOUS Linux - Software 2 04-15-2005 03:25 PM
What to do when a partition is screwed. waterox LinuxQuestions.org Member Success Stories 6 08-12-2004 01:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:28 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