You are not logged in.
A little while back my EFI partition got deleted. I have since recreated my EFI partition and restored Grub and my Windows and Manjaro boot loaders.
I now want to get Arch up and running again.
I tried to boot up from a grub shell with the following procedure:
set root=(hd1,gpt7)
linux /boot/vmlinuz-linux root=/dev/sda7
initrd /boot/initramfs-linux.img
boot
However I get the error that vmlinuz-linux could not be found. I mounted the file system and the /boot directory is completely empty.
Once I get the system booted up I need to change the UUID in fstab to the new UUID for my new EFI parition, but I'm not sure where to go from here.
Last edited by robo731 (2019-04-19 15:01:03)
Offline
boot archiso, mount your root to /mnt and other stuffs to their path.
arch-chroot to /mnt then run 'pacman -S linux'
this will restore your kernel.
if your cache isn't present you need to download ~70MB.
archiso# mount /dev/sda1 /mnt
archiso# mount /dev/sda2 /mnt/boot/efi
archiso# arch-chroot /mnt
chroot# pacman -S linux
chroot# exit
archiso# reboot
Last edited by mmdamin (2019-04-18 10:04:51)
Offline
I get the error that vmlinuz-linux could not be found. I mounted the file system and the /boot directory is completely empty
Did you have /boot mounted on another partition (ie, not /dev/sda7)?
archiso# mount /dev/sda1 /mnt archiso# mount /dev/sda2 /mnt/boot/efi
The OP seems to have the root partition on /dev/sda7 and we don't know if they have /boot/efi at all (or where it is mounted if they do) — the installation guide suggests either /boot or /efi as the mount point for the EFI system partition.
Offline
The OP seems to have the root partition on /dev/sda7 and we don't know if they have /boot/efi at all (or where it is mounted if they do) — the installation guide suggests either /boot or /efi as the mount point for the EFI system partition.
I said as example; (S)he should replace it with his/her actual disk.
Offline
To be completely honest, I don't exactly remember, but here is my fstab:
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda7 LABEL=Arch
UUID=c0e5ee18-7fd4-499d-aae2-f7c30031352f / ext4 rw,relatime 0 1
# /dev/sda2
UUID=54A9-30C8 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda5
UUID=D65A8AA15A8A7DCD /mnt/ntfs ntfs defaults 0 0
It seems to indicate to me that I put boot on my EFI partition, which, as I mentioned was wiped out.
Offline
In that case mount that instead of /boot/efi, and reinstall the linux package.
Offline
So, just to make sure I'm clear on this, I should do the following:
First I will update fstab to point to the new EFI partition as opposed to the one that was wiped.
Then I'll run:
archiso# mount /dev/sda7 /mnt
archiso# mount /dev/sda2 /mnt/boot
archiso# arch-chroot /mnt
chroot# pacman -S linux
chroot# exit
archiso# reboot
Offline
chroot# pacman -S linux
I would use
# pacman -Syu linux
The kernel version has been changing pretty quickly recently and your package database might be old.
Offline
I thought of another consideration actually. I mentioned before that I also have Manjaro installed on this system.
The fstab for Manjaro looks like this:
# <file system> <mount point> <type> <options> <dump> <pass>
PARTUUID=75057376-1e72-4444-86fa-9247c15ca353 /boot/efi vfat defaults,noatime 0 2
UUID=8ebb21e6-9440-4cbe-b8d3-13aca67ec511 / ext4 defaults,noatime,discard 0 1
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
UUID=D65A8AA15A8A7DCD /run/media/rob/Storage ntfs defaults,users 0 0
And when I'm booted in Manjaro /boot looks like this:
total 45281
drwxr-xr-x 3 root root 512 Dec 31 1969 efi
drwxr-xr-x 6 root root 4096 Mar 29 13:52 grub
-rw-r--r-- 1 root root 29894829 Apr 3 21:38 initramfs-4.14-x86_64-fallback.img
-rw-r--r-- 1 root root 9367630 Apr 3 21:38 initramfs-4.14-x86_64.img
-rw-r--r-- 1 root root 2219520 Mar 26 07:11 intel-ucode.img
-rw-r--r-- 1 root root 23 Mar 27 14:39 linux414-x86_64.kver
drwxr-xr-x 2 root root 4096 Dec 2 17:00 memtest86+
-rw-r--r-- 1 root root 4859680 Mar 27 14:39 vmlinuz-4.14-x86_64
Will installing the linux package overwrite any of those files? Could that cause a problem?
Offline
Will installing the linux package overwrite any of those files?
No, Manjaro is mounting /boot/efi to the ESP so the Arch kernel image will go in there instead.
And it also looks like Manjaro number their kernel images, Arch Linux always supplies vmlinuz-linux (with no number) for the vanilla kernel package.
Offline
Ok, got it, thanks.
I did the procedure I outlined above without error.
Now I want to get an Arch entry back in grub. I want to use the grub I already have from Manjaro if possible.
Should I boot up Arch like this:
set root=(hd1,gpt7)
linux /boot/vmlinuz-linux root=/dev/sda7
initrd /boot/initramfs-linux.img
boot
Or chroot like I just did and then:
grub-install
update-grub
Or is that not the right way to go about it?
Offline
If you want to use Manjaro's GRUB then boot into that and update the configuration file from there (presuming Manjaro is controlling the bootloader).
Note that Arch does not have an update-grub wrapper script and running grub-install from Arch will remove Manjaro's GRUB configuration.
To boot from the GRUB command line try
set root=(hd0,2)
linux /vmlinuz-linux rw root=/dev/sda7
initrd /initramfs-linux.img
boot
Offline
Ah, I see. Thanks for clarifying and for the correction.
I ran update-grub on Manjaro and it picked up Arch on dev/sda7, but it did not create an entry for it.
Offline
Also you can install systemd-boot;
After that pressing F12 on your firmware startup will open a menu contains "grub" and "Linux Boot Manager".
grub will start grub then Manjaroo, And Linux Boot Manager will start systemd-boot then arch.
Also you can use EFISTUB to boot kernel directly without a bootloader, by that and efibootmgr you can create entries in your firmware, one for Manjaroo and one for Arch.
Last edited by mmdamin (2019-04-18 16:36:32)
Offline
I ran update-grub on Manjaro and it picked up Arch on dev/sda7, but it did not create an entry for it.
Probably because Arch's kernel image is located at /boot/efi in Manjaro.
You can use a file at /boot/grub/custom.cfg (in Manjaro) containing a menuentry stanza to boot Arch and it should be sourced automatically by Manjaro's grub.cfg
Offline
You can use a file at /boot/grub/custom.cfg (in Manjaro) containing a menuentry stanza to boot Arch and it should be sourced automatically by Manjaro's grub.cfg
Thank you, that worked.
Here's the menuentry I used:
menuentry 'Arch' --class arch {
insmod part_gpt
insmod fat
set root='hd0,gpt2'
search --fs-uuid --set=root 7F1E-EE21
linux /vmlinuz-linux root=UUID=c0e5ee18-7fd4-499d-aae2-f7c30031352f rw
initrd /initramfs-linux.img
}
Last edited by robo731 (2019-04-19 15:02:05)
Offline