You are not logged in.
I'm in a quest for installing arch in a pendrive, I finally made a successful UEFI install with GRUB, but unfortunatelly it doesn't boot in Legacy-only computers.
Here are my devices:
Computer 1: UEFI-only boot support
Computer 2: Legacy-only boot support
Computer 3: UEFI/Legacy boot support (changeble in motherboard settings)
Does GRUB can handle a Universal Pen-Drive that could boot anywhere independently of the boot or partition(MBR/GPT) system of the Device that's booting the Pen Drive?
Is there a way I could install two boot systems? one for Legacy and on for UEFI and use the same persitent storage?
How do I proceed?
******Other information*************************************************************************************************************************************************************************************
Commands I used to install arch linux in my pen drive:
1.partitions
cgdisk /dev/sdb
for boot: EF00
for root: default
2.
mkfs.fat -F32 /dev/sdb1
mkfs.ext4 /dev/sdb2
mount /dev/sdb2 /mnt
mkdir /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sdb1 /mnt/boot/efi
3.install the base system
pacstrap /mnt base vim
4.Generate the file system tab
genfstab -U -p /mnt >> /mnt/etc/fstab
4.1. Verify the configuration:
cat /mnt/etc/fstab
n. EFIVARS:
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
findmnt /boot/efi
efivar -l
efibootmgr -c -d /dev/sdb -p 1 -l /EFI/refind/refind_x64.efi -L "rEFInd"
5.Change root for the new system
arch-chroot /mnt
echo usbarch > /etc/hostname
passwd
6.Set the correct time zone
ln -sf /usr/share/zoneinfo/Brazil/East
cd /etc/
6.1 correct the time
vim locale.gen
-uncomment the location you want
locale-gen
vim /etc/mkinitcpio.conf
-"write "block" before autodetect and remove the other "block""
mkinitcpio -p linux
installing GRUB:
pacman -S grub
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --removable --recheck
grub-mkconfig -o /boot/grub/grub.cfg
7. enable dhcp
systemctl enable dhcpcd
unmount -R /mnt
Last edited by Zatura (2016-03-02 03:40:48)
Offline
Simply create a BIOS boot partition (type EF02 in gdisk) and run the GRUB install command for non-UEFI systems (you have already installed the UEFI GRUB loader):
# grub-install --target=i386-pc --recheck /dev/sdX
https://wiki.archlinux.org/index.php/Gr … ll_to_disk
I'm curious, why have you created a custom NVRAM entry for a rEFInd .efi loader?
Jin, Jîyan, Azadî
Offline
Simply create a BIOS boot partition (type EF02 in gdisk) and run the GRUB install command for non-UEFI systems (you have already installed the UEFI GRUB loader):
# grub-install --target=i386-pc --recheck /dev/sdX
Hi, Head_on_a_Stick, I Tried your solution different ways and it didn't work.
Firstly, I did exactly what you did, it boots normally in my Legacy-only notebook, however when I try to boot in my surface pro 3(UEFI-only) it just show a lot of error messages.
I kept using my google search skills and I found something called DUET that looks like it's a solution.
Will it work if i install in my pen drive? if so, is there any good tutorial that could make my life easier installing this DUET?
Thank you for replying!
Last edited by Zatura (2016-03-02 00:26:54)
Offline
What's "lot of error messages" anyway?
Isn't DUET the thing that "introduce" UEFI to a BIOS-only system...?
Offline
I do this all the time. Just install booloaders for both setups.
Offline
let us see
# efibootmgr -v
# mount /dev/sdb1 /mnt
# tree /mnt
What is necessary to know it is about where the boot loader is pointed to. Also if it is grub, it should be addressed to the same grub.cfg for both ways of booting (MBR or UEFI)
Grub, in MBR mode, mostly needs the first Mb gap at the beginning of the media volume.
It would be much appreciated if you put tags to your post
Last edited by TheSaint (2016-01-15 22:03:02)
do it good first, it will be faster than do it twice the saint
Offline
I made 3 partitions:
/dev/sdb1 (EFI FAT32 fs) EF00 200M
/dev/sdb2 (BIOS EXT4 fs) EF02 200M
/dev/sdb3 (root EXT4 fs) default 6G <---ROOT
Do i really need separeted partitions for BIOS and EFI?
This is what i did
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --removable --recheck
grub-install --target=i386-pc --boot-directory=/boot --bootloader-id=grub --removable --recheck /dev/sdb (/dev/sdb?? is it right?? it shouldn't be /dev/sdb2 ?)
grub-mkconfig -o /boot/grub/grub.cfg
what am i making wrong? it seems that some files get messed up after this, and that's why things are not working
Last edited by Zatura (2016-03-02 03:39:53)
Offline
/dev/sdb2 (BIOS EXT4 fs) EF02 200M
BIOS boot partitions are not supposed to have filesystems.
How did you create it?
What is the full output of:
# parted -l
EDIT: Also, a BIOS boot partition only needs to be ~1MiB in size (maybe even less) so 200MiB is far too big. This isn't a problem per se but I don't like it
EDIT2: to answer your question, you only need a BIOS boot partition to boot GRUB in a non-UEFI system from a GPT disk.
It is possible to use syslinux to boot in both UEFI and non-UEFI modes without a BIOS boot partition, there was even a thread about it here if your search fu is up to it
Last edited by Head_on_a_Stick (2016-01-19 21:20:22)
Jin, Jîyan, Azadî
Offline
It would be much appreciated if you put tags to your post
Zatura, it is possible to edit your posts to add the proper code tags - that would be nice, but not necessarily required/expected. But it is expected that once instructed on how to post well that you do so - yet on the very next post after this was suggested you completely ignored it. Please use code tags properly. If you are unsure how, see the "BBCode" link right under every post text-entry box.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline