LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 06-04-2014, 01:14 PM   #16
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Undecided
Posts: 3,624
Blog Entries: 1

Rep: Reputation: Disabled

Quote:
Originally Posted by metaschima View Post
The reason to switch to UEFI and also to x86-64 is the same: because they are the future and because there are benefits. You will have to switch one day, the question is not if but when.
Buzzkill.
 
Old 06-04-2014, 01:26 PM   #17
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu
Posts: 38

Rep: Reputation: 2
Quote:
Originally Posted by moisespedro View Post
Is there any reason to switch to UEFI?
If you have GPT drive (and in case of capacity > 2 Tb it is almost a must) and you want to dual-boot windows 7/8, then you have no choice. That was my case. If you have GNU/Linux only system - I see no obvious reason to upgrade. There are small technical advantages such as slightly faster boot or no need to use a boot loader(in case of linux kernel is configured with EFI stub it could be booted directly), possibility to use UEFI shell and other UEFI applications before boot to any OS.
 
Old 06-04-2014, 01:27 PM   #18
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,140

Rep: Reputation: 152Reputation: 152
Quote:
Originally Posted by metaschima View Post
The reason to switch to UEFI and also to x86-64 is the same: because they are the future and because there are benefits. You will have to switch one day, the question is not if but when.
I can easily see why would someone switch to x86-64 but not why someone would switch to UEFI. In my case, at least.
 
Old 06-04-2014, 01:34 PM   #19
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,532

Rep: Reputation: Disabled
Quote:
Originally Posted by moisespedro View Post
I can easily see why would someone switch to x86-64 but not why someone would switch to UEFI. In my case, at least.
If your computer supports it then you should switch. UEFI allows support for GUID partition tables, faster booting, and plenty of features that cannot be implemented in BIOS. Now, that doesn't mean you will use the features, and if you don't then you can wait. You will have to switch one day tho, and personally I try to switch to newer technologies sooner as long as they are available because I don't know how much time I will have to do the switch in the future. I mean, if it is available on my hardware and it is newer I will switch to it now, not later. Procrastination has never helped me and probably never will.
 
1 members found this post helpful.
Old 06-04-2014, 01:51 PM   #20
dugan
Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 5,000

Original Poster
Rep: Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558
I'm not sure if you all have been following the Syndicated Linux News forum, but there have been a couple of recent entries about UEFI booting:

Boot managers and boot devices on a PC with UEFI firmware
How to delete boot managers from a UEFI boot menu

No more MBR-overwriting, bootloader-chaining, setting up LILO/GRUB/BCD boot menus, or any of that nonsense. You just use Linux software to add or remove your boot partitions from the menu that you get when you start the computer up and press F8 during the POST.

I think that's much better.

Last edited by dugan; 06-04-2014 at 01:55 PM.
 
1 members found this post helpful.
Old 06-04-2014, 03:18 PM   #21
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 304

Rep: Reputation: 77
I'm Sold

Quote:
Originally Posted by dugan View Post
No more MBR-overwriting, bootloader-chaining, setting up LILO/GRUB/BCD boot menus, or any of that nonsense. You just use Linux software to add or remove your boot partitions from the menu that you get when you start the computer up and press F8 during the POST.
I'm sold. I need to run out an buy a new motherboard with UEFI!

I've never used UEFI and had been waiting for the Slackware solutions to be figured out. (which they appear to have been) You make it sound enticing and not a pain at all.

Last edited by TracyTiger; 06-04-2014 at 03:23 PM. Reason: Slackware solution available
 
Old 06-05-2014, 01:51 AM   #22
ymf331
Member
 
Registered: May 2014
Posts: 38

Rep: Reputation: Disabled
I haven't tried the stub loader yet but, for me, efi was more frustrating than the bios setup.
 
Old 06-07-2014, 07:19 AM   #23
jtsn
Member
 
Registered: Sep 2011
Location: Europe
Distribution: Slackware
Posts: 908

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
UEFI is a proprietary pre-boot single-tasking operating system heavily influenced by Windows design principles (including executable format and calling convention). Of course it sucks and is buggy as hell. It is basically an overcomplicated 64 bit version of MS-DOS. The main purpose for its introduction was to hinder booting alternative operating systems (Secure Boot).

But you don't have the choice. PC hardware with a real BIOS implementation is not available anymore (and most recent BIOS implementations were worse than UEFI). Enabling the Compatibility Support Module (CSM) and simulating a "legacy boot" doesn't give you the IBM BIOS back, it only complicates things further. So you have to deal with UEFI, if you want or not.
 
Old 06-07-2014, 09:46 AM   #24
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,658
Blog Entries: 3

Rep: Reputation: 224Reputation: 224Reputation: 224
well lets reinvent the wheel 26 X 1 3/8 in the 1890's or is it a 650a as of today. it is all the same to me the system is looking at a boot loader and why people want to be confusing.
It is looking for an image and wow lets put it on a fat32 partition. well. All the same all the same stuff. nothing new. not one thing.

It is an image loaded into ram and for what I see oh well.
 
Old 06-08-2014, 02:09 AM   #25
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu
Posts: 38

Rep: Reputation: 2
Quote:
Originally Posted by jtsn View Post
UEFI is a proprietary pre-boot single-tasking operating system heavily influenced by Windows design principles (including executable format and calling convention)...
That's true. But usually BIOS was not superior in any sense. Also proprietary(open/free alternatives exist but how many use them?), single-tasking, often buggy. The only advantage is simplicity.
 
Old 10-18-2014, 05:31 PM   #26
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 71

Rep: Reputation: 22
Challenged by:
0. switch to uefi
slackware-on-uefi

I wondered about 'Upgrading' from MBR to UEFI on a Uefi-firmware computer

First I read some good stuff for understanding what is happening and needed.
0. slackware64-14.1/README_UEFI.TXT
uefi on hardware
2. uefi and elilo
3. uefi-boot
4. boot managers
5. delete bootmanagers
modify bootmanagers
6. efi bootloaders
7. gdisk
8. convert MBR to GPT
9. switch to uefi, but with grub

THUS this is/was the plan:

Current: MBR lilo-booted Slackware64-current (after 14.1) system on a UEFI firmware computer: a PC SPecialist UltraNote -based on a Clevo W550EU- with intel i7, 16Gb RAM, and OS on a mSATA SSD drive and rest on a 750Gb HDD. Two years ago, Slackware was installed by PXE and the drives reformatted (to MBR) to remove any traces of an unwanted test OS and to use the'legacy BIOS'-mode, which was then the most reliable.

Aim: Change to Uefi in situ (without reformatting the whole drive which would remove data and the installed system etc.)

Precaution: backup that data before start....
Experiment: try it out with a spare external drive

We need an extra partition on the boot-drive:

Quote:
Instead of installing the boot files in the Master Boot Record (MBR), an entry for each OS in created in /boot/efi/EFI directory, which should be in an EFI partition.(4)
Quote:
The EFI specification includes a description of a new partition table type, the GUID Partition Table (GPT). .. most EFI computers do use GPT disks. Windows also enforces the EFI/GPT association, at least for its boot disk.. In Linux, there are two main ways to create a GPT disk:

Use ... Parted, to create your partitions, and explicitly tell that tool to use GPT.. select Device -> Create Partition Table, expand the Advanced item, select gpt as the partition table type, and click Apply to create a new partition table. [This] erases your existing partitions.
Use GPT fdisk (gdisk, cgdisk, or sgdisk) to create your partitions. These tools can convert an existing MBR disk to GPT format, or they can partition a blank disk. (6)
THUS: use only gdisk for disc-conversion to GPT. Use parted only for freeing space for the ESP by re-sizing partitions !

I practised each step below with an external drive (with a slackware istallation) before doing the whole stuff 'in situ' on my internal drives. In this practice run I had access to internet help and experienced some difficulties I could repair easily. This reminded me not to resize partitions by changing the left boundaries. A file-system check after all actions was also helpful (can be done from within parted).


For the real change:

STEP 1: Boot with a UEFI install/boot medium (0) into the laptop.

Get into the SETUP menu (or 'Bios'). For MBR discs and legacy-booting via MBR and Lilo, OS was set to 'others' and in my case 'uefi was disabled' automatically. (Note, all Windows stuff had been eradicated by formatting the drives to MBR format, although an inactive 'Windows Bootmanager' was still present).

I disabled all internal MBR drives for booting

Only by turning OS to 'Windows 8' and by enabling uefi my Slackware boot-stick worked and started in uefi-mode

Did not mount internal drives (parted and gdisk only work on UNMOUNTED partitions).


STEP 2: on the boot drive created an ESP (Efi System Partition)(0, 4, 6)
Used parted to shrink a (not completely occupied) partition on the boot drive to create space for a EPS partition (around 100-200MB seems to be enough; probably depending how many OSs one wants to boot (but see (3)).

STEP 3: converted discs to GPT-format with gdisk (7)
Ran gdisk on the drives and checked message:

Quote:
bash-4.3# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

Command (? for help):
Instead, you can get an error message when your drive is completely occupied:

Quote:
Warning! Secondary partition table overlaps the last partition by 33 blocks! You will need to delete this partition or resize it in another utility
This indicates that there is not enough space to place GPT information as described in (8):

Quote:
Conversions from MBR to GPT works because of inefficiencies in the MBR partitioning scheme. On an MBR disk, the bulk of the first cylinder of the disk goes unused—only the first sector (which holds the MBR itself) is used. Depending on the disk's CHS geometry, this first cylinder is likely to be sufficient space to store the GPT header and partition table. Likewise, space is likely to go unused at the end of the disk because the cylinder (as seen by the BIOS and whatever tool originally partitioned the disk) will be incomplete, so the last few sectors will go unused. This leaves space for the backup GPT header and partition table. (Disks partitioned with 1 MiB alignment sometimes leave no gaps at the end of the disk, which can prevent conversion to GPT format—at least, unless you delete or resize the final partition.)
Pressed "q" to leave gdisk without changing anything.

I got this error and had to reduce the size of my last partition (swap space) (I did this with parted) to get the above clean message.

If you cannnot add an extra primary partition on your MBR drive you have to convert the disk first to GPT, in which all partitions appear the same.

gdisk /dev/sdb

typed "p" to print the partition table (as it will be when disk is converted to GPT
typed "s" to sort the order of partition numbers (which you have to take over to /etc/fstab ) (8)
typed "w" to convert MBR disc to GPT format.

After that, there were gaps in between some partitions as expected (8)

I made then the EPS in the freed-up space as a fat32 formatted partition (with parted but this can be done with gdisk) and then made sure that it was set to the efi format with gdisk:

type "p" to print the partition table: which could show the ESP as 0700. If so:
type "t" to change the ESP to its required format: ef00
type "w" to confirm this.

my boot disk and my data disk:

Quote:
bash-4.3# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdb: 250069680 sectors, 119.2 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E3ED2D86-4ACF-42C3-AC1E-A60501A9078E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 250069646
Partitions will be aligned on 1-sector boundaries
Total free space is 124658311 sectors (59.4 GiB)

Number Start (sector) End (sector) Size Code Name
1 63 125001764 59.6 GiB 8300 Linux filesystem
2 125003776 125413375 200.0 MiB EF00 EFI System




bash-4.3# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): DEF58BCE-4DC4-41D7-920D-EB3D905BB65F
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 8-sector boundaries
Total free space is 16554 sectors (8.1 MiB)

Number Start (sector) End (sector) Size Code Name
1 63 292961339 139.7 GiB 8300 Linux filesystem
2 292961340 585922679 139.7 GiB 8300 Linux filesystem
3 585922743 624992759 18.6 GiB 8300 Linux filesystem
4 624992823 729231359 49.7 GiB 8300 Linux filesystem
5 729233408 944738303 102.8 GiB 8300 Linux filesystem
6 944740352 976760831 15.3 GiB 8200 Linux swap

##########
EDIT: I should have used fsck on the ESP to check whether the fat32 formatting had been done correctly.
(see this very informative Arch-linux page, as referred to from this slack-doc page).
##########

STEP 4 Set up Elilo (0)

Mounted the partition of the boot-disk with the slackware installation (sdb1) to /mnt
Mounted the partition with the EPS (sdb2) to /mnt/boot/efi

Checked whether all was there
Ran eliloconfig; this only worked when the whole system is recognized as uefi-capable: gpt discs; /boot/efi partition present


I got this far AND according to all info, the computer should now be uefi-only.....

But rebooting fails. I need the USB-stick to boot into the installation.

In SETUP I now see an option for secure boot (disabled)

I tried then to do a minimal install (i.e. only the a-packages) in order to get throught the Slackware setup program.

After that still no proper reboot joy.

This is in /boot/efi/EFI/Slackware:

Quote:
bash-4.3# ll /boot/efi/EFI/Slackware/
total 9336
drwxr-xr-x 2 root root 4096 Oct 18 19:27 ./
drwxr-xr-x 3 root root 4096 Oct 17 19:22 ../
-rwxr-xr-x 1 root root 160 Oct 17 21:19 elilo.conf*
-rwxr-xr-x 1 root root 242346 Mar 29 2013 elilo.efi*
-rwxr-xr-x 1 root root 5617105 Oct 17 20:04 initrd.gz*
-rwxr-xr-x 1 root root 3681296 Sep 9 03:46 vmlinuz*
These vmlinuz and initrd.gz look the same as used for booting via lilo in /boot:

-rw-r--r-- 1 root root 3681296 Sep 9 04:46 vmlinuz-generic-3.14.18
-rw-r--r-- 1 root root 5617105 Oct 17 21:04 initrd.gz


and the Slackware installed elilo.conf was:

Quote:
chooser=simple
delay=1
timeout=1
#
image=vmlinuz
label=vmlinuz
initrd=initrd.gz
read-only
append="root=/dev/sdb1 vga=normal ro"
/boot/efi/EFI/Slackware/elilo.conf lines 1-9/9 (END)




STEP 5 I probably might go ahead with this: use efibootmgr for making changes:

Quote:
To remove unwanted entries from the boot menu,.... type the following command, as root, to delete a specific entry:
efibootmgr -b 0003 -B.
The number (0003) is the hexadecimal number representing the entry you want to delete.(5)

But there seems no need for it.

When I reset the OS to 'others' in the SETUP menu legacy-bios-mode kicks in and I boot into my system as usual via lilo.

Oh, how one can be relieved seeing the Slackware boot-screen appear :-)

Still, I am a bit disappointed that uefi does not work this way. But I don't think I am up to completely reinstall my system: too much stuff to do on an evening.... and possibly to no avail. I also could not boot from my external drive with a huge.s and despite setting delay and timeout to 300.

Thus despite all theory, in my case uefi-mode does not seem to override MBR stuff (that luckily was not been removed by gdisk conversion).


Do I need to change elilo.conf (but how?)
Do I need to put the huge.s in the /boot/efi/EFI/Slackware?
Do I need to include something in the initrd apart from ext4 file system info?
Do I have bad uefi-firmware???

Cheers,

Rob


PS Yes, this might have been a stupid experiment but one has to try...

######
EDIT: The problem arose from an incorrect fat32 file system on the ESP, as described later on
######

Last edited by brobr; 10-21-2014 at 05:09 AM. Reason: adding some pointers
 
Old 10-19-2014, 09:12 AM   #27
dad_
Member
 
Registered: Aug 2009
Location: St. Petersburg, Russia
Distribution: Slackware 14.1/current(x86_64/EFI), gentoo, debian, puppy, ubuntu
Posts: 38

Rep: Reputation: 2
Quote:
Originally Posted by brobr View Post
...
But rebooting fails. I need the USB-stick to boot into the installation.
...
Could you please describe in more detail how does it fail? Post (part of) boot log or the error message. How do you exactly boot EFI from your boot menu - maybe you have a screenshot? Have you tried to boot from UEFI shell on USB stick?
 
Old 10-19-2014, 04:07 PM   #28
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 71

Rep: Reputation: 22
Hi dad_ thanks for replying.

OK: In the boot menu of SETUP 'Slackware' is present and first choice (and the only uefi choice unless I attach my eufi-boot flash-drive to a USB3-port).

In uefi-mode, without the boot-USB, the system hangs, that is: does not start at all and reverts after a couple of seconds to the SETUP screen.
In my SETUP eufi mode is only possible by setting 'OS' to 'Windows 8', which then enables me to set 'Uefi' to 'enabled'.
(this is NOT secure boot as this option comes up in another tab (security) and is only available with the above setting of OS Windows 8 + uefi enabled)

When I boot with the uefi USB-stick and then by pressing 'tab' can input my path to / and the kernel (/dev/sdb1 vmlinuz), it reverts to the boot screen of the USB-disk.

If, in SETUP, I set OS to 'others' uefi is greyed-out and automatically set to 'disabled'.

THEN I get the lilo-boot screen ....and the system boots normally

It just seems that my SETUP firmware does not want to accept that other OSs than Windows 8 can boot uefi...... or it is buggered somehow.

(But why does the boot USB-stick work; that's not Windows 8 either???)

#### EDIT: removed output of what bootlogd (after editing rc.S according to this post) spitted out in /var/log/boot and the top of dmesg as it basically showed the lilo-boot. Hope this might make the post more digestable..
#### end EDIT


Cheers,

Rob

Last edited by brobr; 10-20-2014 at 05:12 PM. Reason: typos, removed irrelevant info
 
Old 10-19-2014, 04:51 PM   #29
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
When you boot in uefi mode with the usb key, once system loaded could you post output with:
Code:
modprobe efivars
efibootmgr -v
 
Old 10-19-2014, 05:54 PM   #30
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 71

Rep: Reputation: 22
Hi keefaz,

after modprobe efivars:

Quote:
#efibootmgr

BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0001,0000,0006
Boot0000* Windows Boot Manager
Boot0001* Slackware
Boot0006* UEFI: Generic USB Flash Disk 2.00

#efibootmgr -v

BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0001,0000,0006
Boot0000* Windows Boot Manager HD(2,96800,32000,b804aed4-64ef-46bf-896e-8773957b2820)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a .8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0001* Slackware HD(2,7736800,64000,86ce4157-bde7-4e5f-890d-c0e406ad8bc0)File(\EFI\Slackware\elilo.efi)
Boot0006* UEFI: Generic USB Flash Disk 2.00 ACPI(a0341d0,0)PCI(14,0)USB(1,0)HD(1,3f,79920,0003d704)AMBO
 
  


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
[SOLVED] Dual boot Windows 8 and ubuntu on UEFI system enrico_dvchp Ubuntu 3 02-18-2013 01:10 AM
Slackware on a former UEFI system garpu Slackware - Installation 2 11-23-2012 11:59 PM
[SOLVED] Need advice installing slackware to a GPT/UEFI system arubin Slackware 38 10-21-2012 12:31 PM
Help Creating UEFI A MENU For My Bootable (BIOS/UEFI) CDROM ssenuta Linux - Hardware 0 08-27-2012 10:11 PM
/ file system 81% from 50% over the weekend. AZDAVE Mandriva 6 05-12-2004 09:58 AM


All times are GMT -5. The time now is 11:27 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration