Arch Linux: Hybrid Install With Encrypted UEFI & Legacy BIOS On a USB Stick

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 114

  • @nuclearnyanboi
    @nuclearnyanboi 3 года назад +8

    This is not the first time Ermanno has saved me from endless headaches. Thanks man

    • @eflinux
      @eflinux  3 года назад +2

      Always happy to help!

  • @amarmisra9582
    @amarmisra9582 4 года назад +8

    Best as always...learning Arch Linux as never would have been possible...

  • @juxuanu
    @juxuanu 4 года назад +6

    I'll be buying a laptop later this month. I'll be doing UEFI + Secure Boot + Plymouth + LUKS + Hibernation. Thank you for your videos, they've helped and inspired and I'm ready to set everything up.

    • @eflinux
      @eflinux  4 года назад +2

      Let me know how it goes!

    • @juxuanu
      @juxuanu 4 года назад +1

      @@eflinux it went all smooth :-)

    • @eflinux
      @eflinux  4 года назад +1

      great!

  • @ДедМороз-р7д
    @ДедМороз-р7д 4 года назад +4

    Super install video Ernanno ! Thanks :)

  • @Mikesco3
    @Mikesco3 4 года назад +4

    Yeah thanks to Ermanno I finally got started using Arch Linux, I was a long time Deb-based systems user who wanted to try Arch but didn't want to sink in the wiki time required to do the initial transition, but his explanations are really great

    • @eflinux
      @eflinux  4 года назад

      I am happy to hear that!

    • @Foxy10-b6n
      @Foxy10-b6n Год назад

      @@eflinux Yea! As a deb starter, this is very difficult to understand... are you using an arch system to do all this???? No commands from deb are working, and setting up an arch system to build an arch system is a little redundant; when I followed the video of making an arch USB stick, it never booted in legacy, and my comp using aptio bios is a little bit particular with that. Secure boot keys have to be deleted, which I hate; I wish there was a way to have the option from the get-go that offered USB boo or normal boot. I am sure there is a way, but it isn't very public

  • @LouisCheungCN
    @LouisCheungCN Год назад

    Thank you very much.
    Your instructions are easy to follow.
    I now have an Arch system on USB for Stable Diffusion.

  • @legymhueck9271
    @legymhueck9271 4 года назад +1

    Thanks so much for enlightening me on the topic of booting legacy and uefi systems. It has so far always been a compromise since where I work, there are old and new systems and I always wanted my external SSD to work on both, so I resorted to legacy.
    Don't get me wrong on what I'm about to say now but: Your tutorials are great! From this video, however, I've learned only 2 pieces: ef02 and double partitions. You've been doing the other installation steps over and over again, and I know them by heart and I've memorized them for the past 10 years.
    To be able to get the nitty-gritty of Arch Linux with all its ramifications, what I'd do would be just to refer to a "base install video" and the new stuff could be an extension to the base install.
    Surely, it's entirely up to you and it's just my two cents to the topic.

    • @eflinux
      @eflinux  4 года назад

      Thanks for the comment. That's what I did in the past, when I did the series with numbers, base install and the rest. With this video it's a little different as it's on a stick with different options and a twofold installation of GRUB, so I felt like it kind of belongs to a different category.

  • @JulioOAO
    @JulioOAO 4 года назад +4

    Thanks for this awesome video and your very straightforward explanations, it is very helpful.

  • @quasar-lv6pp
    @quasar-lv6pp 5 дней назад

    thank you! You bring the light!

  • @mep8157
    @mep8157 4 года назад +2

    Ermanno thx for the video as you promised 😁😁

  • @modo4211
    @modo4211 3 года назад +1

    This is exactly what I am searching for! Thank you so much for your videos!

    • @eflinux
      @eflinux  3 года назад +1

      You are so welcome!

  • @CaterpillarOGM
    @CaterpillarOGM 2 года назад +1

    Many thanks for such a detailed and awesome tutorial !!!
    Anyway, I followed the steps indicated herein, and manage to boot into a fully fledged Arch Linux system with encryption and persistence but I happen to have something to point out.
    Unfortunately, the usb only boots in a bare metal EFI machine, yet not at all in a bare metal MSDOS-only aware 64-bit machine powered by an old BIOS firmware which is clearly GPT-blind (i.e. gpt-unaware/it's boot manager can't even detect a USB device as one if the stick's real partition table is GPT).
    The stick is indeed bootable in both kinds (be it an virtual EFI/GPT or an virtual BIOS/MSDOS-MBR system) of type-2 hypervisor-made virtual machine endowed with a modern emulated firmware, and at this point I think that VMs providers emulate even BIOS firmwares in a way that they are able to identifiy and parse a GPT partitioned device in order to grant a degree of OS compatibility, but I'm far from stating that I am totally sure or have the subject-required deep knowledge to confirm that these hypotheses on VMs' firmwares are factual.
    By the way, a working solution to this problem is what the Arch Wiki and other related documentation as the Gentoo Wiki refer as - following the 'h' fdisk commadn output - the "flaky and dangerous" Hybrid Master Boot Record partiton table, which opens another really dirty can full of complications, as extensively discussed here www.rodsbooks.com/gdisk/hybrid.html .
    Kind regards from a follower, keep up with the good job!!!

  • @esmirol
    @esmirol Год назад

    Very helpfull - thank you for your excellent work, Ermanno!

  • @bakieral
    @bakieral 4 года назад +2

    Sorry for longish and not well written english...With this guide i learned that -maybe it was already written at somewhere in arch wiki- if you encrypt a partition and if you format the disk with a regular style (for example gdisk /dev/sda -o ) the encryption can not be removed completely. I say this because i installed arch with this guide but for desktop environment i installed kde mega pack which did not go well for 64gigabyte usb, and i tried to install again but this time just with uefi no legacy and no encryption. So this time i got 2 partitions. After installment there was something wrong even though every went smoothly after boot all my partitions were empty and i dont why exactly. i tried two times with an another guide of this channel it was all same, empty partitions... ok, and i followed this video tutorial again... and when i was trying to make third partition encrypted part was still at there. Ok again i am gonna install to same usb but i changed my mind: uefi + legacy but i don’t want ecryption. First i reformatted usb with dd if=/dev/zero of=/dev/sda bs=4096 status=progress then i followed this guide just skipped encryption part. And now arch linux with i3-wm gaps. Fast clean and working.

  • @markring40
    @markring40 4 года назад +3

    Great!! Danke!

  • @michaelokeeffe1477
    @michaelokeeffe1477 3 года назад +1

    Hi Ermanno loved the video's that you do all well explained. just wondering if i could follow this video with out doing the encryption, is it just a matter of following all the steps except the encryption part. Again thanks for the wonderful videos pleas keep them up. It has being a joy watching them

    • @eflinux
      @eflinux  3 года назад +2

      Hi Michael! You can, or there is also a similar video on the channel without encryption.

  • @ruijieyu9035
    @ruijieyu9035 2 года назад

    Thanks a lot for this video. I already have a uefi encrypted disk, so in order to add bios functionality, I probably just need to add the bios partition in the front, and install a boot loader there.

  • @tylerdean980
    @tylerdean980 2 года назад +1

    Thanks a lot, really appreciate it. I’ve been trying to do this for a long time, but the graphical installers never worked for me. I would have preferred this with Debian or something, because I’m not going to be using this USB as a daily driver, maybe a few times a week at most, so it will be a little bit of a chore to use a rolling release in those conditions, I would love to see a Debian install if you could make one. But I’ll be using this until it breaks irreparably or something, I just hope I can remember to update it frequently. The only thing I did differently from you is instead of using ext4 I’m using f2fs, a file system designed from the ground up for flash based media. Hopefully it gives me some more life out of the usb stick.

    • @greyshopleskin2315
      @greyshopleskin2315 Год назад

      You can install debian in the arch way. I don't remember how it is called, but there's a page in the debian Wiki explaining it

  • @TengwarTeacher
    @TengwarTeacher 3 года назад

    This was amazing and just what I needed! Thank you!

  • @drishalballaney6590
    @drishalballaney6590 4 года назад +1

    That is why I use arch...you can setup the system as per your needs. I don't think any other gui install system wil support this properly. Note that for usb, something lighter like artix linux will be better as it uses openRC/runit which is lighter for a flash storage but has nearly same installation technique as arch linux as it is a non systemd version of arch

  • @pabloperalta6254
    @pabloperalta6254 2 года назад

    This video was awesome!!

  • @joir2000
    @joir2000 4 года назад +1

    Thank you very much for the explanation
    Over here it works well with an xfce4 desktop.

    • @eflinux
      @eflinux  4 года назад +2

      Is it pure vanilla? I haven’t tried xfce yet :)

    • @joir2000
      @joir2000 4 года назад +1

      @@eflinux I installed LXDE as well, but that one works better than xfce

  • @juanmanuelborrero2250
    @juanmanuelborrero2250 4 года назад +2

    Very nice video Ernanno ! Question: how about including a good swap (if one can afford it) ? One never knows the ram of the laptops this USB stick is going to be running arch on ...

    • @eflinux
      @eflinux  4 года назад +2

      Swap is not recommended on a removable device according to the wiki. That’s because it saves writes to the USB stick.

    • @juanmanuelborrero2250
      @juanmanuelborrero2250 4 года назад

      @@eflinux True enough ! Thanks

  • @EkmekArasiKofte242
    @EkmekArasiKofte242 3 года назад +2

    Thank you a lot.

    • @eflinux
      @eflinux  3 года назад +1

      You are welcome!

  • @kpostaagasichannel
    @kpostaagasichannel 3 года назад +2

    on grub install ı have this error:
    /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. please specify --target
    Please help.

    • @eflinux
      @eflinux  3 года назад +2

      It seems you didn't specified the target during Grub installation. For UEFI and BIOS there is always a --target option.

    • @kpostaagasichannel
      @kpostaagasichannel 3 года назад +2

      @@eflinux Thanks 😅

  • @renegomez2274
    @renegomez2274 2 года назад

    I got this "error: device /dev/mapper/cryptusb not found" when I did reboot... :(
    I can use the iso to open the encrypted device, mount and chroot, so I can do changes but I do not know what is wrong.

  • @kalitsiadischaritos4685
    @kalitsiadischaritos4685 4 года назад +1

    Very nice video. just a question, since you don't need journal and the size of a thump drive could not be huge, why don't use ext2 instead ?

    • @eflinux
      @eflinux  4 года назад +2

      Thanks for the question. I guess the Arch Wiki is also choosing this probably for other benefits of the ext4 file system, like better performance and faster file system checks.

  • @cjchico
    @cjchico 4 года назад +1

    Amazing tutorial! Could you do one just like this but using BTRFS and LUKS?

    • @eflinux
      @eflinux  4 года назад

      I’ll add it to the list :)

  • @JM-sn5eb
    @JM-sn5eb 2 года назад

    If you will not have a topic for a video in the future, please consider another encrypted USB bios uefi install but on btrfs.
    I tried few times and I wasn't able to make it working.

  • @nejathakan5521
    @nejathakan5521 3 года назад

    wow 😍
    Thanks to your tutorials I became using Arch Linux as my Daily driver now on all of my 3 Computers having 2 of them being Laptops.
    I learned so much more about Linux since by the Arch Wiki and by your Channel. Combination of these 2 sources are amazing ❤️🌹❤️

  • @brentkline6774
    @brentkline6774 3 года назад +1

    How do you connect to the internet when you login to arch with no desktop manager, like at about 30 mins into the video you began installing packages but it didn't show you logging back into wifi

    • @eflinux
      @eflinux  3 года назад +1

      Good point. Thanks for asking that. So, the PC I plugged the USB into had ethernet, so it is automatically activated. If you need to use Wifi, you'd type nmtui in the terminal and connect to your wifi that way.

  • @ProEloVek-om3gz
    @ProEloVek-om3gz 4 года назад +2

    Cognitively. Ermanno and how do you feel about this encryption root > cryptsetup-q-y-v-c aes-xts-plain64 -s 512 -h sha512 luksFormat .

    • @eflinux
      @eflinux  4 года назад +1

      CIA level:)

  • @alanwalker8834
    @alanwalker8834 3 года назад

    Nice clip now i no what to do .1st Thing to do is learn all about using Vim

  • @fabsmad
    @fabsmad 2 года назад

    Hello and thanks for this great tutorial. I just need a little help: when grub asks me the passphrase I can't enter it. If I digit the passphrase and press enter...nothing happens! Could you help me please?
    Fujitsu U937

  • @AriannaEuryaleMusic
    @AriannaEuryaleMusic 2 года назад

    I got an error at grub legacy installation, it wouldnt let me do it//
    my partitions in this case are sdc1, sdc2, sdc3..so,
    grub-install --target=i386-pc --boot-directory=/boot /dev/sdc
    #return this msg:
    grub-install error: hostdisk//dev/sdc appears to contain a exfat filesystem ...."
    I tried changing t sdc1 and still got errors.
    Then I moved on installing efi,, and got no errors..
    Well, it works! (on efi)
    Thank You!
    BTW... I HATE VIM, that was the hardest part, i dont know why they make it so difficult to use it

  • @manthonymontoya
    @manthonymontoya 3 года назад

    For whatever reason, when I run the lsblk command. My usb stick, which should be fully formatted shows up with a partition already created. On my screen it’s SDD
    But underneath it also has SDD1 - and this seems to make the first few steps of the install impossible.

  • @vishalaryalearner
    @vishalaryalearner 3 года назад +1

    Sir, should i use --boot-directort=/boot --efi-directory=/boot/Efi
    For installing efi with i386 grun

    • @eflinux
      @eflinux  3 года назад +1

      As it is in the tutorial.

  • @MrFooSteven
    @MrFooSteven 3 года назад +1

    Double grub, interesting!

  • @ilyaa643
    @ilyaa643 3 года назад +1

    Thx

  • @porpora76
    @porpora76 2 года назад

    Hi. Tnx. I am new to Linux. I tried to follow instructions. But because of my very low internet speed I never reach the end or there are always problems. Is there a way to use the isolated as a repository? I mean, an offline installation? By the way, I have the ISO. Tnx

  • @EkmekArasiKofte242
    @EkmekArasiKofte242 3 года назад +2

    Do I have to install amd and intel ucode packages?

    • @eflinux
      @eflinux  3 года назад +2

      You can. Depending on the machine you'll be using the USB stick with, it might be helpful.

    • @EkmekArasiKofte242
      @EkmekArasiKofte242 3 года назад +1

      I will use it on different machines so I have to download both packages, right?

    • @eflinux
      @eflinux  3 года назад +2

      Correct.

  • @PavanKumar-qq3dn
    @PavanKumar-qq3dn 4 года назад +1

    I have questions does usb works on both amd and Intel example if I install Linux to usb in Intel system and it will work in amd ?

    • @eflinux
      @eflinux  4 года назад +2

      Yes it will.

  • @aeryqc4315
    @aeryqc4315 3 года назад

    Works also with USB 2.0 or is only recommented with USB 3.0 ? Is It important to Check write and read Speed USB Stick to Run with Gnome Environment?

    • @shadygoat9146
      @shadygoat9146 3 года назад

      it honestly doesnt matter too much, as long its not like 10 years old. Though, usb 3 is a lot faster, so it is definetly recommended to use that one. I tried using an old usb and it was so slow, it was unbearable...

  • @stevezep6750
    @stevezep6750 3 года назад

    So this USB would be able to be put into my computer and disable secure boot and it will show up?

    • @stevezep6750
      @stevezep6750 3 года назад

      Also are you using a Linux terminal to write these commands

    • @eflinux
      @eflinux  3 года назад

      It should.

  • @johnfudacz5273
    @johnfudacz5273 3 года назад +1

    Is the finished USB compatible with Secure Boot?

    • @eflinux
      @eflinux  3 года назад +1

      No, as this works on legacy too.

    • @johnfudacz5273
      @johnfudacz5273 3 года назад +1

      @@eflinux Thanks for the reply. I appreciate this tutorial.

  • @IdRatherNotHaveAHandleThankYou
    @IdRatherNotHaveAHandleThankYou 4 года назад +2

    may I ask as to why one would prefer _Vim_ over something like _Nano?_

    • @eflinux
      @eflinux  4 года назад +1

      I used nano in some tutorials and some people asked why I’m not using vim. I try to change from time to time :)

    • @peterarbeitsloser7819
      @peterarbeitsloser7819 4 года назад

      Because vim is more extensible and has more functionality. Also no arrow keys needed.

    • @shadygoat9146
      @shadygoat9146 3 года назад

      think of it this way; nano is for the basic ones, vim is for the cool kids

  • @nadiasmith3262
    @nadiasmith3262 3 года назад

    Would this work with an SSD. Say a 128GB for example and work via a USB3.0 port and or a SATA board connection.

    • @shadygoat9146
      @shadygoat9146 3 года назад

      yeah just use the appropriate /dev/sdX

  • @hoangndst
    @hoangndst 3 года назад +1

    It didnt connect to wifi automatically? How to fix it?

    • @eflinux
      @eflinux  3 года назад +1

      You didn't enable NetworkManager probably. You can do that with sudo systemctl enable NetworkManager.

  • @ibrahim.3999
    @ibrahim.3999 3 года назад

    how to install arch on usb if I am on
    manjaro?

  • @mycal51
    @mycal51 4 года назад +1

    is it possible to make a text version of this, so could just copy n paste?

    • @eflinux
      @eflinux  4 года назад +1

      I have some parts of this on my site, but I didn’t have the time to create a new file. I’ll do when I get the chance. Sorry for the inconvenience.

  • @alanwalker8834
    @alanwalker8834 3 года назад +1

    USB =10M =250M=29G
    Total download 368.32
    ........ Install 1266.34
    proceed with installation (y/n)
    error partition /full 97626 blocksneeded 62976 blocks free
    error failed to commit transaction
    (not enough free disk space)
    errors occured no packages were upgraded
    ==>error: failed to install packages to new root
    1 root@archiso~#
    Any help would be appreciated or point me in the right direction
    Thank you
    This occured at pacstrap /mnt base linux linux-firmware vim.
    Thanks

    • @eflinux
      @eflinux  3 года назад +1

      Hey Alan! The installer is complaining about space, so if your USB key is big enough, I suspect there are some partitions which haven't been formatted before installing, or some hidden ones, just a hunch:)

    • @alanwalker8834
      @alanwalker8834 3 года назад +1

      @@eflinux Hi tks but i put it through dd command and it wiped it clean before i started tks anyway

    • @eflinux
      @eflinux  3 года назад +1

      What is df -h giving you?

    • @alanwalker8834
      @alanwalker8834 3 года назад +1

      just looking at the usb in gparted it says /dev/sdb3 name Linux filesystem then file system unknown size 29.04 gb ---- -----

    • @eflinux
      @eflinux  3 года назад +1

      Difficult to say, I'd try with another key if possible juust to make sure that the problem is not hardware.

  • @ilyaa643
    @ilyaa643 3 года назад +1

    Can I not encrypt and just follow along?

    • @eflinux
      @eflinux  3 года назад +1

      How do you mean?

    • @ilyaa643
      @ilyaa643 3 года назад

      @@eflinux to skip encryption. It worked tho thanks. Installing dwm and openbox. But I encrypted the windows recovery partition accidentally :(

  • @Mikesco3
    @Mikesco3 4 года назад

    Why not lxde if a usb stick since it has a really small footprint

    • @eflinux
      @eflinux  4 года назад

      Definitely doable!

  • @georgechong5065
    @georgechong5065 3 года назад +1

    will the encryption slow the linux system down?

    • @eflinux
      @eflinux  3 года назад +1

      You'll feel it only on boot, but slightly.

    • @georgechong5065
      @georgechong5065 3 года назад +1

      @@eflinux thanks for the reply. I tried to leave a message under your other video,but the message kept beening deleted. I made a USB stick arch system following your steps on my mac,and it works fine on the Mac, but it won't work on my windows pc. Do you have any clue?

    • @eflinux
      @eflinux  3 года назад +1

      Have you checked the PC BIOS if it allows booting from there?

  • @imrokwasiba9027
    @imrokwasiba9027 4 года назад +2

    I'm here again.

  • @micleh
    @micleh 4 года назад +1

    On one USB stick I experience an odd behaviour and grub won't install saying:
    grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels. This is not supported yet..
    grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
    grub-install: error: will not proceed with blocklists.
    I first thought that the size for the EF02 partition was too small since I chose 1MB - as recommended in the arch wiki (link: see below)
    I found this article (askubuntu.com/questions/666527/install-grub-claims-that-i-have-multiple-partiton-labels-and-that-embedding-is) to solve the problem, the simplest method being to add "--force" to the grub-install command.
    I'm not yet sure why this stick shows this behaviour and whether / how I can fix it permanently. The fix offered here was unsuccessful: wiki.archlinux.org/index.php/Multiboot_USB_drive

    • @eflinux
      @eflinux  4 года назад +2

      That's odd. Probably some steps went wrong during partitioning. Difficult to say from here. See this for reference: magyar.urown.cloud/arch-usb.html

    • @guadelhabib9755
      @guadelhabib9755 3 года назад

      I'm probably late :) faced the same problem. Fixed with cleaning first sectors before gdisk.
      dd if=/dev/zero of=/dev/sdX bs=logical-sector-size seek=0 count=2048

  • @HaaqAsykar
    @HaaqAsykar Год назад

    When i got to step "systemctl enable org.cups.cupsd" it say "failed to enable unit :unit file org.cups.cupsd.service does not exist". How to fix sir?