You are not logged in.

#1 2023-09-16 15:10:25

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

[SOLVED] Need help with GRUB menu and boot loader

I've install arch on a partition on my system (sda9) however my boot partition is not large enough to add the boot loader info for arch. It is only 100mb.
I need some help in being able to see Arch in my GRUB menu I can launch Arch from the menu as I do with the other OS's on the system?

Here is my lsblk info.
The boot/efi contents and the /boot from the /dev/sda9 folder.
Let me know what other info might be needed.

demo@LM21:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   100M  0 part /boot/efi
├─sda2   8:2    0    16M  0 part 
├─sda3   8:3    0 249.1G  0 part 
├─sda4   8:4    0   877M  0 part 
├─sda5   8:5    0   450M  0 part 
├─sda6   8:6    0    40G  0 part 
├─sda7   8:7    0    16G  0 part [SWAP]
├─sda8   8:8    0 524.8G  0 part 
└─sda9   8:9    0   100G  0 part 
sdb      8:16   0   1.8T  0 disk 
├─sdb1   8:17   0   1.8T  0 part 
└─sdb2   8:18   0    40G  0 part /
sdc      8:32   1   3.8G  0 disk 
├─sdc1   8:33   1    10M  0 part 
├─sdc2   8:34   1   500M  0 part 
└─sdc3   8:35   1   3.3G  0 part 
sr0     11:0    1     0B  0 rom  

root@LM21:/boot/efi# ls
Boot  bootmgr  BOOTNXT  EFI  grub.old  initramfs-linux.img  vmlinuz-linux

root@LM21:/boot# ls
config-5.15.0-56-generic  grub                          initrd.img-5.15.0-83-generic  System.map-5.15.0-83-generic  vmlinuz-5.15.0-83-generic
config-5.15.0-70-generic  initrd.img                    initrd.img.old                vmlinuz                       vmlinuz.old
config-5.15.0-71-generic  initrd.img-5.15.0-56-generic  System.map-5.15.0-56-generic  vmlinuz-5.15.0-56-generic
config-5.15.0-83-generic  initrd.img-5.15.0-70-generic  System.map-5.15.0-70-generic  vmlinuz-5.15.0-70-generic
efi                       initrd.img-5.15.0-71-generic  System.map-5.15.0-71-generic  vmlinuz-5.15.0-71-generic

I don't mess with it much and all of the  boot efi stuff I don't understand even though I have read over and over about it.
Maybe if I do it enough it would sink in.
Thanks for your help.
Please be patient with me.

Last edited by MAYBL8 (2023-09-19 16:59:26)

Online

#2 2023-09-16 21:56:10

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

you can start by removing all those unnecessary initrd/vmlinuz files, im guessing ubuntu ? that should clear up plenty of space, should be under add/remove kernels i think, havent used ubuntu in a long time.

EDIT: https://help.ubuntu.com/community/RemoveOldKernels , their documentation seems to be rather old, even when i was using debian before arch i was using 'apt' instead of 'apt-get' but hey it should still work fine.

Last edited by jonno2002 (2023-09-16 22:02:00)

Offline

#3 2023-09-17 12:12:40

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

I now have this .
What is next to do?

root@LM21:/boot# ls
config-5.15.0-83-generic  grub        initrd.img-5.15.0-83-generic  System.map-5.15.0-83-generic  vmlinuz-5.15.0-83-generic
efi                       initrd.img  initrd.img.old                vmlinuz                       vmlinuz.old

Online

#4 2023-09-17 21:02:34

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

if you now have enough space then install your bootloader.
also you have "initramfs-linux.img  vmlinuz-linux" in your /boot/efi which can be deleted too, they should be in /boot.
i see you also have the efi partition mounted to '/boot/efi' which would imply that you dont want /boot on the efi partition, which would save space too having your boot files on the root paritition (sda9).

Offline

#5 2023-09-17 21:41:10

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

All that sounds good.
If I put the boot files on the /boot on sda9 will that mess up Windows which is also on this system?
What commands would I use to accomplish this?
Thanks

Online

#6 2023-09-17 21:47:39

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

ok now im really confused, you say arch is on sda9 yet your lsblk shows root (/) mounted to sdb2.

Offline

#7 2023-09-17 21:55:08

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

Arch is installed on sda9 but I don't have a menu choice to boot into it.
I am booted into Linux Mint on sdb2.
Does that make sense?
Thanks

Online

#8 2023-09-17 22:20:48

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

ok you need to boot from the installation media and do the following in this order:

make sure that /dev/sda is in fact the correct drive as drive assignments can and do change, if the drive is sdb or some other then adjust following commands to suit.

mount /dev/sda9 /mnt
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
mkinitcpio -P
reboot

that should work hopefully

EDIT: sorry missed a step, make sure to run grub-mkconfig as well, have updated the list

Last edited by jonno2002 (2023-09-17 22:23:49)

Offline

#9 2023-09-17 23:54:08

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

When booting to my installation media which is a arch installed on a usb flash dirve see this for lsblk:

All of the sda entries are the same as above except there are no mountpoints on any of them

I have sdc
              sdc1 10M
              sdc2 500M   /boot
              sdc3 3.3G    /

How does that change the above instructions?

Online

#10 2023-09-18 01:54:01

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

When i got to the grub-install line it said
grub-install: error: /boot/efi doesn’t look like an EFI partition.

Online

#11 2023-09-18 07:13:53

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

so long as sda is the right drive dont worry about it.

post output of this from the arch-chroot where grub-install fails:

lsblk -f && fdisk -l

EDIT: and i guess i should look at the fstab too:

cat /etc/fstab

Last edited by jonno2002 (2023-09-18 07:19:48)

Offline

#12 2023-09-18 13:19:29

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

Ok i have a file with that info in it.
How do i get it here from the command line.
Do i use pastebin or something like that?

Online

#13 2023-09-18 14:04:57

dakota
Member
Registered: 2016-05-20
Posts: 280

Re: [SOLVED] Need help with GRUB menu and boot loader


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#14 2023-09-18 14:08:07

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

Ok it is

Http://0x0.st/HO2B.txt

Last edited by MAYBL8 (2023-09-18 14:09:39)

Online

#15 2023-09-18 21:49:24

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

you havent mounted the efi partition, either you missed this step:

mount /dev/sda1 /mnt/boot/efi

or you need to create the dir first, here is the whole list again in order:

mount /dev/sda9 /mnt

mkdir -p /mnt/boot/efi

mount /dev/sda1 /mnt/boot/efi

arch-chroot /mnt

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

grub-mkconfig -o /boot/grub/grub.cfg

mkinitcpio -P

reboot

EDIT: i messed up, this command should have been run BEFORE arch-chroot:

lsblk -f && fdisk -l

Last edited by jonno2002 (2023-09-18 22:05:52)

Offline

#16 2023-09-18 22:17:16

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

Now i get
grub-install: error: failed to make directory: '/boot/efi/EFI/GRUB'.

Online

#17 2023-09-18 22:28:53

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

this is getting tedious now, post output of:

df -h /dev/sda1

Offline

#18 2023-09-18 22:37:01

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

Filesystem.     Size.      Used.    Avail.  Use%.   
/dev/sda1       99M        99M.         0.     100%

Mounted. On
/boot/efi

Online

#19 2023-09-18 22:40:55

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

ls -Rlh /boot/efi

Offline

#20 2023-09-18 22:44:32

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

http://0x0.st/HO9S.txt

Last edited by MAYBL8 (2023-09-18 22:44:58)

Online

#21 2023-09-18 22:49:02

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

rm /boot/efi/vmlinuz-linux /boot/efi/initramfs-linux.img
me in post #4 wrote:

also you have "initramfs-linux.img  vmlinuz-linux" in your /boot/efi which can be deleted too, they should be in /boot.

should work after you remove those files

Offline

#22 2023-09-18 23:00:04

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

Ok I did read that but I thought I did all of that . I obviously missed that .  Sorry.

That got me a little futher.
Now I got this error:

After running mkinitcpio -P

Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
Using default configuration file: '/etc/mkinitcpio.conf'
-k /boot/vmlinuz-linux -g /boot/initfamfs-linux.img --microcode /boot/*-ucode.img
ERROR: specified kernel image does not exist: '/boot/vmlinux-linux'

Online

#23 2023-09-18 23:06:36

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

run

pacman -S linux

after arch-chroot

Offline

#24 2023-09-18 23:24:19

MAYBL8
Member
Registered: 2022-01-14
Posts: 212

Re: [SOLVED] Need help with GRUB menu and boot loader

First thanks for sticking with me on this.

Ok that got me through the initial process .

The grub menu showed up but the only entry in it is:

UEFI Firmware settings as a choice.

That happened after I did the grub-mkconfig  command

Online

#25 2023-09-19 07:57:40

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: [SOLVED] Need help with GRUB menu and boot loader

did you run grub-mkconfig again after running 'pacman -S linux' ?

ls /boot

Offline

Board footer

Powered by FluxBB