You are not logged in.
Pages: 1
Hi,
I installed arch on a USB thumb drive by following https://wiki.archlinux.org/index.php/In … _signature, in the end I installed grub and executed grub-mkconfig -o /boot/grub/grub.cfg after which it would complain that the location does not exist.
Now, when I boot my system from the USB drive, the screen just turns black and it doesn't boot. So I'm now wondering:
Do I need to extend grub.cfg of my internal drive that boots a different distribution or
should I boot from the Arch installation drive, mount my drive's main partition to /mnt and create /boot/grub/ manually before I run grub-mkconfig -o /boot/grub/grub.cfg again?
Or is it something different altogether?
I created 3 partitions on my thumb drive:
/dev/sdd1 1M Win95/FAT32 mkfs.vfat
/dev/sdd3 ~65GB ext4 mkfs.ext4
/dev/sdd3 1G swap
Last edited by stdcerr (2019-10-31 02:13:19)
Offline
it should work with no hdd/ssd installed in the pc at all, purely from the usb stick.
your EFI partition is far too small, the wiki states 260-512mb and yours is "1M"
it sounds like youve not mounted things correctly or executed commands while not in the correct arch-chroot, without a complete list of what you did though its all guess work.
maybe just try again and follow the instructions extra carefully, and if that doesnt work reply here with an EXACT list of commands you used during the install.
Offline
it should work with no hdd/ssd installed in the pc at all, purely from the usb stick.
your EFI partition is far too small, the wiki states 260-512mb and yours is "1M"
I thought I saw somewhere that this is enough - sadly can't find the link anymore now... ok, I'll redo it but this time with 512MB
it sounds like youve not mounted things correctly or executed commands while not in the correct arch-chroot, without a complete list of what you did though its all guess work.
maybe just try again and follow the instructions extra carefully, and if that doesnt work reply here with an EXACT list of commands you used during the install.
Ok, let's see: I have two USB sticks connected to my box, one I boot the live iso from and the other one, I want to install '/' on.
booted into live system:
with lsblk I confirm that /dev/sd1 is the stick I booted from and /dev/sdd is the stick I want to install Arch on:
#fdisk /dev/sdd to create new layout:
Device Boot Start End Sector Size Id Type
/dev/sdd1 2048 1050623 512M c W95 FAT32 (LBA)
/dev/sdd2 1050624 24797783 117.8G 83 Linux
/dev/sdd3 247977984 2097152 1G 82 Linux swap/ Solaris
# mkfs.vfat /dev/sdd1
# mkfs.ext4 /dev/sdd2
# mkswap /dev/sdd3
# swapon /dev/sdd3
# mount /dev/sdd2 /mnt
# pacstrap /mnt base linux linux-firmware vim
...
...
# pacstrap /mnt man-db man-pages // I forgot to add these above - just in case
...
# genfstab -U >> /mnt/etc/fstab
# cat /mnt/etc/fstab
#/dev/sdd2
UUID=bla-bla-bla-bla / ext4 rw,relatime 0 1
#/dev/sdd3
UUID=bla-bla-bla-bla none swap defaults 0 0
... looks good
# arch-chroot /mnt
# ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime
# hwclock --systohc
setup /etc/locale.gen
and create with
# locale-gen
create and set LANG in /etc/locale.conf
create and set KEYMAP in /etc/vconsole.conf
configure /etc/hostname and set hostname it in /etc/hosts
I'll have an mdadm RAId system but I'll deal with mounting it once I ca boot this system
set password with
# passwd
# pacman -Syyu grub intel-ucode
# grub-mkconfig -o /boot/grub/grub.cfg
/usr/bin/grub-mkconfig: line 248: /boot/grub/grub.cfg.new: No such file or directory
# exit
(now out of arch-chroot)
# umount -R /mnt
# reboot attempt to boot from USB stick with installed Arch now
and I again don't see anything booting but just a black screen with a flashing cursor...
Offline
# pacman -Syyu grub intel-ucode # grub-mkconfig -o /boot/grub/grub.cfg /usr/bin/grub-mkconfig: line 248: /boot/grub/grub.cfg.new: No such file or directory
I don't see a step where you actually install grub to the USB stick. That's probably why you are seeing that error message.
https://wiki.archlinux.org/index.php/GRUB#Installation
Offline
yip and also the efi partiton type needs to be "EFI System" not "W95 FAT32 (LBA)" , and you need to mount /dev/sdd1 to /mnt/efi so you can install grub, and since its a usb stick make sure you use --removable when you install grub.
Offline
I thought I saw somewhere that this is enough - sadly can't find the link anymore now...
Here it is. That is for a BIOS boot partition to use grub in BIOS boot mode on a GPT partitioned disk.
Whether or not this is what you want is not clear as there wasn't nearly enough info in the first post to know. But everything else in this thread seems to assume you are trying to use (u)efi booting.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Okay,
Thank you everybody for the comments!
I booted again from the live USB stick, fired-up fdisk/dev/sdd & changed the type of /dev/sdd1 to "ef" "EFI (FAT-12/16/32)" leaving everything else the way it was. I then followed https://wiki.archlinux.org/index.php/GRUB#Installation and installed grub with the command # grub-install --target=i386-pc /dev/sdd but I got:
Installing for i386-pc platform.
grub-install:error: failed to get canonical pth of `airootfs`.
#
meh okay, then there's this: https://wiki.archlinux.org/index.php/GR … on_methods
that seemed to work well as it copied some files to /mnt/usb and at the end I saw Installation finished. No error reported sounds good I thought, move on, next step:# grub-mkconfig -o /mnt/usb/boot/grub/grub.cfgp and again, I got /usr/bin/grub-probe:error failed to get canonical pth of `airootfs`. ... What does this even mean? lsblk shows me as first device:
loop0 7:0 0 513.1M 1 loop /run/archiso/sfs/airootfs
is that related?
I tried it again but this time:
# grub-install --target=i386-pc --debug --removeable --boot-directory=/mnt/usb/boot /dev/sdd
but got the same airootfs error on grub-mkconfig..... what's the trick here? I must be missing something..!
Offline
That error is from trying to run the grub-install command from the live iso rather than from inside a chroot. Use arch-chroot first, or if you really want to do if from outside the chroot, you could try adding the flag "--root-directory=/mnt", or perhaps "--root-directory=/mnt/usb" in your case.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It seems to me that your boot partition is not mounted anywhere. You should mount it under the boot directory of your USB, and it should be in your fstab, too. When I made my own Arch bootable USB, I followed the second example layout:
https://wiki.archlinux.org/index.php/In … le_layouts
with the efi system partition mounted as /mnt/boot, and then used this guide:
https://wiki.archlinux.org/index.php/GRUB#UEFI_systems
And yeah, as Trilby said, I did the installation from chroot (with mounted boot directory!), and it worked for me.
The only way... is all the way!
Offline
That error is from trying to run the grub-install command from the live iso rather than from inside a chroot. Use arch-chroot first, or if you really want to do if from outside the chroot, you could try adding the flag "--root-directory=/mnt", or perhaps "--root-directory=/mnt/usb" in your case.
Okay ye, I'll give that a shot but as for EFI or not EFI, in the installation guide at https://wiki.archlinux.org/index.php/In … _boot_mode, my live USB only has acpi/ devicetree/ dmi/ and memmap/ in /sys/firmware/ there's no efi/ present....
Offline
So either your hardware does not support efi booting, or it was not enabled when you booted the iso. In any case, there are many conditional parts of the installation: for example, gpt vs mbr partition tables, efi or BIOS booting, and many others. Figure out / decide which you are doing first, then follow the steps for your setup. You cannot mix and match steps meant for different configurations.
If you do have a gpt partition table booting in BIOS mode with grub, then you should have that very small initial partition.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Okay,
I'm struggling a bit here... I've figured out now what to do in my BIOS to properly boot from the USB stick in UEFI mode. So I'm set to go with files in /sys/firmware/efi/efivars.
lsblk lists my target stick still as /dev/sdd with 1 being the prepared EFI partition, 2 the mian / partition & 3 the swap. Okay, I mount /dev/sdd2 to /mnt and then use arch-chroot /mnt to switch to it. From here I did a pacman -S efibootmgr grub just to make sure, I've got the latest, then since /mnt/boot/ already exists I just did mount /dev/sdd1 /mnt/boot and then grub-install --target=x86_64-efi --efi-directory=/mnt/boot --bootloader-id=GRUB --removable got the installation going. Which completed with saying "Installation finished. No error reported". Now grub-mkconfig -o /boot/grub/grub.cfg to create the configuration file. And done Nice exit, reboot, change boot order & here we go, booting into Arch from my USB drive, nice!
My two main mistakes were: #1 not realizing what I need to select to boot the stick in UEFI mode and #2 I didn't realize that I had to be chrooted to execute all the Grub install commands (including grub-install and the following grub-mkconfig).
Thanks everbody for the help provided!
Last edited by stdcerr (2019-11-02 20:18:52)
Offline
Pages: 1