#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)

quartz knoll
#

its making my default arch linux boot entry in grub boot with linux-lts and it wont boot in general so every time i want to boot i need to go to advanced settings and i dont want to have to do thatw

low agate
#

/etc/default/grub GRUB_DEFAULT="Arch Linux, with Linux linux-lts" GRUB_SAVEDEFAULT=true sudo grub-mkconfig -o /boot/grub/grub.cfg

#

@quartz knoll

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

low agate
quartz knoll
quartz knoll
#

do you mean line 131?

#

for copying

low agate
#

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

quartz knoll
#

my default arch linux entry in grub still tries to boot to linux-lts

#

even aftert those changes

eternal hedge
#

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

quartz knoll
#

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

eternal hedge
#

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

quartz knoll
#

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

low agate
#

/etc/grub.d/40_custom menuentry "Arch Linux" { ... }

low agate
quartz knoll
#

where do i pu t it?

#

wait nvm

#

i didnt read 😭

#

but what goes in the { . . .}

#

and do i just write menuentry "Arch Linux" ?

low agate
#

Do you have /etc/grub.d/10_Linux ? Change it instead.

quartz knoll
#

where would i put it in this?

low agate
#

what is the content?

quartz knoll
#

a lot

low agate
#

no, keep it as it is.

quartz knoll
#

alright

#

so do i change 40_custom?

low agate
#

to make your file has higher priority, you need a file with lower number then 10_liunx. t.ex 09_custom.

quartz knoll
#

so i can just rename 40_custom

#

or can i?

#

to 09_custom

low agate
#

yes

quartz knoll
#

how do i do that exactly

#

i need to do it in terminal

#

since it wont let me through dolphin

low agate
#

sudo mv 40_custom 10_custom

#

sudo chmod a=rx 10_custom

quartz knoll
#

i am the super user but its still not working

#

i am in the directory as well

low agate
#

you can create 10_custom file in your home directory first and move to /etc/grub.d/ later on.

quartz knoll
#

wouldnt it need to be an 09_custom file so it has highier priority than 10_linux

low agate
#

yes

quartz knoll
#

alright i made it

#

its a txt file atm

#

and its fully empty

low agate
#
cat <<EOF
menuentry "Arch Linux" {
...
}
EOF```
quartz knoll
#

? like this

#

wouldnt i need the comment lines from this

quartz knoll
#

and the exec line

#

especially the exec line

low agate
#

no exec line needed. you need to replace ... with your content.

quartz knoll
#

like i did?

#

oh

#

wait

#

wym replace ... with my content

quartz knoll
#

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

low agate
#

This is the content you need to replace ...

quartz knoll
#

wouldnt i need to get rid of that -lts tho in the bottom?

low agate
#

yes

quartz knoll
#

what file was that from again?

#

grub.cfg?

low agate
#

You need all content inside 09_custom

quartz knoll
#

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

low agate
#

please show 09_custom

quartz knoll
low agate
#

yes

quartz knoll
#

so now what

low agate
#

sudo cp 09_custom /etc/grub.d/

#

sudo chmod a=rx /etc/grub.d/09_custom

quartz knoll
#

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

low agate
quartz knoll
#

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 😭

low agate
#

sudo rm -f /etc/grub.d/09_custom.txt

quartz knoll
#

alr done

#

thanks

low agate
#

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

quartz knoll
#

alright ima reboot and see if it worked

#

if not ill report back

#

It still runs Linux-lts

low agate
#

You should remove 40_custom and 41_custom.

quartz knoll
#

alright i removed them

quartz knoll
low agate
quartz knoll
#

Still boots -lts

low agate
#

what is inside /etc/grub/grub.cfg?

quartz knoll
#

thats the whole file

low agate
#

/etc/default/grub GRUB_DISABLE_SUBMENU=y

quartz knoll
#

do you want me to uncomment it?

low agate
#

yes

quartz knoll
#

regen the grub config?

low agate
#

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

quartz knoll
#

just making sure 😭

low agate
#

before reboot, show /etc/grub/grub.cfg

quartz knoll
#

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

low agate
#

show /etc/default/grub

quartz knoll
low agate
#

are you able to boot? which entry?

quartz knoll
#

ill show you what shows up now

#

the default arch linux entry is gone

#

i only see -lts and arch linux linux

low agate
quartz knoll
#

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

quartz knoll
#

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

low agate
#

/etc/default/grub GRUB_DEFAULT=0

#

I need go now, do your best!

quartz knoll
#

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

low agate
quartz knoll
#

Windows, uefi system

#

Thats it

#

No arch Linux what so ever

low agate
quartz knoll
#

I can't check

#

I can't see my Linux files

#

Since I can't boot to Linux without the grub entry

low agate
quartz knoll
#

I have the installation usb

#

Which one do I press

low agate
#

The first one

quartz knoll
#

Alright I'm in

low agate
#

lsblk -f

quartz knoll
#

Sda 5,6,7. Are my linux

#

Supposedly

low agate
#

which one is your archlinux partition?

quartz knoll
#

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

low agate
#

mount /dev/sda6 /mnt

#

arch-chroot /mnt

#

less /boot/grub/grub.cfg

quartz knoll
#

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

low agate
#

do this instead.

#

mount /dev/sda6 /mnt

quartz knoll
#

Sda5 instead of 6?

low agate
#

mount /dev/sda5 /mnt/boot

quartz knoll
low agate
#

umount /mnt/boot

#

mount /dev/sda1 /mnt/boot

quartz knoll
#

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

low agate
#

ls /mnt/boot

#

umount /mnt/boot

#

mount /dev/sda5 /mnt/boot

#

ls /mnt/boot

quartz knoll
#

Sda 5

#

Had it

#

The 8nstra fms Linux iso

#

And the vmlinuz

#

And grub and stuff

low agate
#

arch-chroot /mnt

#

less /boot/grub/grub.cfg

quartz knoll
#

There's more

low agate
#

You only need to show menuentries

#

ls -la /etc/grub.d/

quartz knoll
#

How do I leave the text menu again?

#

So I can I put commands?

low agate
#

q

quartz knoll
low agate
#

chmod +x /etc/grub.d/09_custom

#

ls -la /etc/grub.d/

quartz knoll
low agate
#

grub-mkconfig -o /boot/grub/grub.cfg DO NOT REBOOT

#

less /boot/grub/grub.cfg FIND menuentry from 09_custom

quartz knoll
#

Is it that?

#

Or this

#

Wait NVM it's the same boot entry but yeah there it is

low agate
#

q

#

exit

#

shutdown -r 0 now reboot and remove USB stick.

quartz knoll
#

Okay so I see arch linux

#

And it boots

#

But now windows isn't there😭

low agate
#

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

quartz knoll
#

this is false already

low agate
#

sudo grub-mkconfig -o /boot/grub/grub.cfg This should trigger os-prober to locate windows.

quartz knoll
#

alr reboot?

#

or what then

#

do this?

low agate
#

NOT REBOOT YET

#

always check grub.cfg first!

quartz knoll
#

09 is right there

#

then 30

low agate
#

now reboot

#

your boot screen?

quartz knoll
#

Yep I see both

low agate
#

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.

quartz knoll
#

alright no problem

#

thanks for the help

low agate
#

If everything works, you may close this post by change the title [Solved] ...

quartz knoll
#

alright i will

#

How do i make grub boot into Arch linux with linux linux and not Arch linux with linux-lts [solved]