You are not logged in.

#1 2015-04-19 07:12:33

Schwertspize
Member
Registered: 2015-04-17
Posts: 12

[Solved] Installation with UEFI and BIOS

Hey,
I were sometimes at my friends or relatives and they were asking me for help with their pc (mostly windows). Something is broken or there is a virus or such things. As we know let, from a broken Windows I can't repair anything. That's why I asked them about backup. They all answered backup? Why backup? Also with recovery USB/cd, on none of them there was a recovery partition. Because of that, and because I have got only a cd at home, I decided to look for a Linux, which can easily get installed on an USB stick without needless things like desktop (desktops are cool, but I won't work with this os so I don't need thaz), but with the most tools installed on the most free space left. I found out that arch cam do everything. But I asked myself how I can install (on a 8gb stick) arch on half that stick on the last partitions so I can keep one 4gb fat32 partition as first for data. My second question is how I can get that stick bootable on almost every PCs with UEFI and bios support (I read that I have to use a gpt for uefi and a mbr for bios. How is that all possible?)
Sorry for that wall of text.

TL;DR how to format my USB drive (8gb) to get a working machine (uefi and bios compatibility) after an 4gb fat32 partition. (and no separated /home partition, I won't use /home)

Last edited by Schwertspize (2015-04-29 18:16:43)

Offline

#2 2015-04-19 10:38:03

PaterSiul
Member
Registered: 2015-04-01
Posts: 18

Re: [Solved] Installation with UEFI and BIOS

What's wrong with this one?

In the End it's about getting Arch on a stick in a way that lets you boot on most computers. Installing your tools is then easy.

Last edited by PaterSiul (2015-04-19 10:40:12)

Offline

#3 2015-04-19 10:53:53

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: [Solved] Installation with UEFI and BIOS

Schwertspize wrote:

how I can get that stick bootable on almost every PCs with UEFI and bios support (I read that I have to use a gpt for uefi and a mbr for bios. How is that all possible?)

You can set up gummiboot to boot the system in EFI-mode (as outlined in the Beginner's Guide) and then use GRUB to boot in non-EFI mode with these commands (replace X with the correct drive letter):

# grub-install --target=i386-pc --recheck /dev/sdX
# gub-mkconfig -o /boot/grub/grub.cfg

If you use a GUID partition table (GPT) then you will need a BIOS boot partition for GRUB (type "ef02" in gdisk, I use sectors 34-2047) but be aware that not all motherboards will support this method.

There was a thread recently about booting with syslinux in both EFI & non-EFI mode.


Jin, Jîyan, Azadî

Offline

#4 2015-04-19 11:58:57

Schwertspize
Member
Registered: 2015-04-17
Posts: 12

Re: [Solved] Installation with UEFI and BIOS

1. Nothing is wrong with it, I just didn't recognise how to do the (dual)boot
2. I know I need two bootloader, maybe the syslinux but I found out that Windows <=7 boot JUST from mbr and >=8 ONLY get. I just didn't know how that is possible with the partition tables...
Thank you for the reply, i think I will get it working with that syslinux thread.

Offline

#5 2015-04-19 12:05:34

PaterSiul
Member
Registered: 2015-04-01
Posts: 18

Re: [Solved] Installation with UEFI and BIOS

Schwertspitze, your bootloader is tied to your hard drive (or, in this case, your usb drive).

UEFI-systems usually have a legacy mode. Installing in legacy mode is not so great, if you want uefi. But for the usual linux-on-windows-rescue-operations, it should do fine.

In any case, to boot from your usb drive, you will need to set the boot device (even if only temporarily) from hard drive 1 to usb. Pretty much like booting from a live cd or usb.

Or is there anything I misunderstood?

Offline

#6 2015-04-19 12:16:59

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: [Solved] Installation with UEFI and BIOS

Schwertspize wrote:

I found out that Windows <=7 boot JUST from mbr and >=8 ONLY get.

Not quite -- WIndows (either 7 or 8) will only boot in non-EFI mode on an MBR disk and will only boot in EFI-mode on a GPT disk.


Jin, Jîyan, Azadî

Offline

#7 2015-04-19 15:35:12

Schwertspize
Member
Registered: 2015-04-17
Posts: 12

Re: [Solved] Installation with UEFI and BIOS

Thank you, especially for that answer about windoof. I think I will manage to do it this way

Offline

#8 2015-04-24 20:10:53

Schwertspize
Member
Registered: 2015-04-17
Posts: 12

Re: [Solved] Installation with UEFI and BIOS

I am lost. Could anyone explain (or post a link where that is explained) to me how I can get the liveUSB [1] running on a Mac, and how I can keep that system up to date (I read any changes will be removed after shutdown. I decided that that will be the best documented and working thing, if I could do changes to that system later after install. Last question: is it possible to use the very first partition as fat32 for data and keep a mbr partition scheme? I do want to use my USB key and that system don't read gpts...
Thank you!

[1] USB flash installation media is a good article about that, but then I won't be able to use all my space on that USB media. Also the instructions to get the full capacity are only Linux sad

Last edited by Schwertspize (2015-04-24 20:19:52)

Offline

#9 2015-04-25 11:10:51

PaterSiul
Member
Registered: 2015-04-01
Posts: 18

Re: [Solved] Installation with UEFI and BIOS

Live USB typically refers to read-only as they come from hammering a CD/DVD-System onto a USB key. There sometimes are ways to countermand that, typically called "persistant live usb". According to the article you linked to, in arch this is done by using the article I linked to. Even if not, this is generally the best way, since it allows for usual updates and does not introduce a difference to installed systems.

I get the impression that your lost-ness stems from a lack of understanding of the boot process.

BIOS/MBR: Your BIOS usually tries a list of devices to boot from. It boots the first device on that list that has a bootloader on it's MBR. And usually there are ways to get a temporary boot menu. This is how you choose which boot loader to control the next steps.

UEFI/GPT/MBR: Your UEFI usually tries a list of devices to boot from. It boots the first device on that list that has a special partition called "EFI system partition" with a file on it that contains a boot loader. If it has CSM or "legacy mode" enabled, it checks for MBR before going to the next device. UEFI also usually provides a way to set a temporary boot device. This is how you choose which boot loader to control the next steps.

The boot loader then might load "the rest of itself", in case of grub for example. In any case the next step is to load OS-specific stuff. In the case of linux that would be the kernel and possibly an initrd. The kernel then goes on to load the init system which handles the start of pretty much everything else.


So, in order to get a USB key that works independent of the computer, it ought to be MBR. There are UEFI-systems that won't boot it, but there are still enough BIOS-systems around (those can't boot GPT) to make this the safer bet. On your friends/relatives computer, you then use the BIOS/UEFI boot menu to choose the USB key as boot device.

To get an arch system on your USB key, you treat it like a regular install. You partition it to your liking (with your 4GiB-FAT32-partition and your 4GiB linux partition). To be on the safe side, you create a boot partition as you first partition - although this should no longer be necessary. You might also want to have a swap partition or file if you want to be able to use your drive on computers with little ram. If you refrain from using GUIs, you might get away without one.

You need to take special care when it comes to partition references in fstab and your boot loader configs. When you boot from your key, it is very likely shown as "/dev/sda", while, attached to a system that was booted from another device, it won't be. So, to be on the safe side, use UUIDs instead of device paths.

Also, GRUB2 might not be the best choice for your boot loader. GRUB legacy or syslinux are explained in Installing Arch Linux on a USB key.

Be prepared for a lot of trial and error. What you are setting out to do isn't exactly easy. It needs know how. So you'll read a lot. And tinker until it works. Also, judging by this and that article, a Mac might not be the ideal platform to use for this project.

Please be more specific when asking questions like

Could anyone explain (or post a link where that is explained) to me how I can get the liveUSB [1] running on a Mac[...]

Knowing, where exactly your are stuck, for example, would help tremendously.

Last edited by PaterSiul (2015-04-25 11:13:23)

Offline

#10 2015-04-29 18:24:14

Schwertspize
Member
Registered: 2015-04-17
Posts: 12

Re: [Solved] Installation with UEFI and BIOS

So, in order to get a USB key that works independent of the computer, it ought to be MBR. There are UEFI-systems that won't boot it, but there are still enough BIOS-systems around (those can't boot GPT) to make this the safer bet. On your friends/relatives computer, you then use the BIOS/UEFI boot menu to choose the USB key as boot device.

Thank you. That is what I wanted to know, I did thought I wrote something else but I wasn't so there was the problem... I just didn't tell that there was so many information conflicting each other so I just didn't know what is right and what is wrong. And concerning the Mac, I don't have any other pc there for now....

Hopefully solved, now

Offline

Board footer

Powered by FluxBB