#How do i make grub boot into Arch linux with linux linux and not Arch linux with linux-lts [Solved]
284 messages · Page 1 of 1 (latest)
/etc/default/grub GRUB_DEFAULT="Arch Linux, with Linux linux-lts" GRUB_SAVEDEFAULT=true sudo grub-mkconfig -o /boot/grub/grub.cfg
@quartz knoll
@low agate i dont wanna boot arch linux with Linux linux-lts i wanna boot it with Linux linux i tried changing the grub default to that and it still didnt work
Copy your /boot/grub/grug.cfg menuentry line to /etc/default/grub GRUB_DEFAULT=
edit /etc/default/grub; GRUB_DEFAULT='Arch Linux'
sudo grub-mkconfig -o /boot/grub/grub.cfg
my default arch linux entry in grub still tries to boot to linux-lts
even aftert those changes
on line 144 delete the "-lts" after the vmlinuz-linux
on line 146 do the same thing after initramfs-linux
make sure you have vmlinuz-linux (without the -lts) in your /boot folder otherwise it won't boot. same with initramfs
i made sure i had all the files ik have all of them with and without -lts
and i edited those lines and got rid of the -lts properly
but the default boot entry still tries to boot into linux-lts
you should be able to edit the entries from grub itself. when it comes up, instead of pressing enter to select it, press "e" to edit. I think it's "e" at least
look at the entry and see if it's correct, otherwise you can change those lines I mentioned earlier and then boot it
So I edited the lines
In grub itself
But it didn't save
When I rebooted
And tried it again
It didn't work
For some reason
It runs a command line
I changed it
Got rid of the -lts
It boots normally
Then the options at the bottom
Are tab lists completion
Press Ctrl x or F10 to boot, Ctrl c or F2 for a command-line (opens terminal) or ESC to discard edits and return to grub menu
If I click Ctrl x or f10 to boot after making changes
It boots
But then I rebooted
And it doesn't save the changes I made
/etc/grub.d/40_custom menuentry "Arch Linux" { ... }
Create custom menuentry and regnerate grub.cfg;
where do i pu t it?
wait nvm
i didnt read 😭
but what goes in the { . . .}
and do i just write menuentry "Arch Linux" ?
Do you have /etc/grub.d/10_Linux ? Change it instead.
what is the content?
no, keep it as it is.
to make your file has higher priority, you need a file with lower number then 10_liunx. t.ex 09_custom.
yes
how do i do that exactly
i need to do it in terminal
since it wont let me through dolphin
you can create 10_custom file in your home directory first and move to /etc/grub.d/ later on.
wouldnt it need to be an 09_custom file so it has highier priority than 10_linux
yes
cat <<EOF
menuentry "Arch Linux" {
...
}
EOF```
no exec line needed. you need to replace ... with your content.
wait a min
this part right here
is what shows up when i boot
its also the few lines i changed when i edited grub
within grub its selfd
This is the content you need to replace ...
wouldnt i need to get rid of that -lts tho in the bottom?
yes
You need all content inside 09_custom
from menu entry to initramfs-linux-lts.img
but just remove the -lts ofc
would i copy this one?
or this one
also couldnt i just get rid of the menu entry for -lts since it doesnt work to begin with
this is the grub.cfg
just checking if i can do other options other than 09_custom righ tnow
idm doing the custom obviously its just any idea could work
please show 09_custom
yes
so now what
oh yeah do i get rid of the txt?
so it turns into an empty file
i would have to turn it into a shell script
like all the other ones
What txt?
i did it wrong one sec
i made the 09_custom a text file
just wait
thats the file i made its in my home atm
wait
i think i did it
there we go
dont mind the .txt i moved it there by mistake
i shouldve just made an empty file and didnt realize it was a txt 😭
sudo rm -f /etc/grub.d/09_custom.txt
sudo grub-mkconfig -o /boot/grub/grub.cfg
alright ima reboot and see if it worked
if not ill report back
It still runs Linux-lts
You should remove 40_custom and 41_custom.
alright i removed them
do i run this again?
yes
Still boots -lts
what is inside /etc/grub/grub.cfg?
/etc/default/grub GRUB_DISABLE_SUBMENU=y
yes
regen the grub config?
?
You don't have to ask this every time. this is standard, every time you change anything related to grub, you need to do this. :D
just making sure 😭
before reboot, show /etc/grub/grub.cfg
also
i didnt read the before reboot message
but it did do smth
it got rid of the original Arch linux menuentry
now it has both arch linux -lts and regular arch linux linux
bascially what ever i would see in advanced options is what is there
and the default arch linux boot entry is gone
heres the rest of the file btw
show /etc/default/grub
are you able to boot? which entry?
ill show you what shows up now
the default arch linux entry is gone
i only see -lts and arch linux linux
No, the submenu entry is gone.
The arch Linux entry is gone and everything that was in the sub menu is there
Linux Linux -lts doesn't work only Linux Linux works
Correct!
Is there a way for me to also get rid of the -lts entry?
So it's only the working entry and windows
And uefi
sudo chmod -x /etc/grub.d/10_linux
/etc/default/grub GRUB_DEFAULT=0
I need go now, do your best!
Yea no worries thanks I'll give any updates if it does or doesn't work
Okay so the Linux entry is gone .
Like nothing
Once I changed it to grub_defsult =0
What entries do you have now?
What are inside /boot/grub/grub.cfg ?
I can't check
I can't see my Linux files
Since I can't boot to Linux without the grub entry
you can boot with archlinux.iso from USB.
The first one
Alright I'm in
lsblk -f
which one is your archlinux partition?
Sda 7 is my arch Linux swap sda 5 is my EFI and sda 6 is my Linux filesystem
I would assume it would be in sda 6
The final command gave a output of no such file or directory
But I can still boot into grub so idk
Okay so I just did ls boot
And it's completely empty
Nothing showed up as an output to ls boot
your boot partition is located at sda5.
do this instead.
mount /dev/sda6 /mnt
Sda5 instead of 6?
mount /dev/sda5 /mnt/boot
All I know is that sda 6 is where I keep all my files for Linux and sda 7 is my swap and sda 5 is my EFI for linux
Because I remember what amt of space I allocated to each
q
grub-mkconfig -o /boot/grub/grub.cfg DO NOT REBOOT
less /boot/grub/grub.cfg FIND menuentry from 09_custom
/etc/default/grub GRUB_DISABLE_OS_PROBER=false
sudo grub-mkconfig -o /boot/grub/grub.cfg
DO NOT REBOOT
less /boot/grub/grub.cfg Find menuentries for both 09_custom and 30_os-prober
this is false already
sudo grub-mkconfig -o /boot/grub/grub.cfg This should trigger os-prober to locate windows.
Yep I see both
From now on, when you want to boot a new kernel or OS, you will need to create a custum menuentry like /etc/grub.d/XY_custom.
If everything works, you may close this post by change the title [Solved] ...