You are not logged in.

#1 2021-09-08 17:37:10

Sue_Perb
Member
Registered: 2020-06-25
Posts: 32

GRUB2 refusing to boot manually added partition

Hi

I've been trying recently to free up and use the other half of my disk, which had been taken up by a dormant ubuntu partition. I formatted this partition (/dev/sda5) and then copied my data from arch on /dev/sda6 into it. I'm now trying to boot into it, delete sda6, and extend sda5 to access my full disk from one OS. However, I am having a significant number of issues adding grub menu entries in /etc/grub.d/40_custom.

This implementation shows no error messages, but instead shows a black screen for a second before going back to the grub menu.

menuentry "Arch2" {
        insmod ext4 #NOTE: i tried xfs here as well
        search --set=root --label arch2 --hint hd0, msdos5
        configfile /boot/grub/grub.cfg
}

I've also tried with this, which says "/boot/vmlinuz-linux not found" (it definitely exists there)
i tried /vmlinuz-linux too which had the same result.

menuentry "Arch2" {
        search --set=root --fs-uuid 1f7bdb09-1a34-41dc-9629-dfa69263875c #sda5's fs uuid
        linux /boot/vmlinuz-linux  root=UUID=1f7bdb09-1a34-41dc-9629-dfa69263875c rw splash
        initrd /boot/initramfs-linux.img
}

I've also tried setting root to hd0, msdos1 (my boot partition)

Thank you in advance for any help

Offline

#2 2021-09-08 17:52:47

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: GRUB2 refusing to boot manually added partition

Why not just delete sda5 and use gparted to expand sda6 into the free space?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2021-09-08 17:58:49

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: GRUB2 refusing to boot manually added partition

Yes, the procedure seems somewhat... roundabout.

But if you have a separate /boot and sda5/6 is the root partition, you should just change the root= kernel parameter and not GRUB's $root.

Offline

#4 2021-09-09 19:15:32

Sue_Perb
Member
Registered: 2020-06-25
Posts: 32

Re: GRUB2 refusing to boot manually added partition

Hi

Raynman wrote:

you should just change the root= kernel parameter and not GRUB's $root.

I don't know what you mean by this - I have tried both

set root=(hd0, msdos5) #or msdos1

and

search --set=root=UUID=uuid here
Slithery wrote:

Why not just delete sda5 and use gparted to expand sda6 into the free space?

I thought extending a partition backwards was impossible?

Thank you

Offline

#5 2021-09-09 19:17:36

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: GRUB2 refusing to boot manually added partition

You can extend a partition to the left, it's just risky. Backup your data first in case something goes wrong.

Offline

#6 2021-09-09 19:44:50

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: GRUB2 refusing to boot manually added partition

Sue_Perb wrote:

I thought extending a partition backwards was impossible?

It is impossible to do in one operation. That's why gparted moves it left first and then extends it right,


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2021-09-10 17:59:03

Sue_Perb
Member
Registered: 2020-06-25
Posts: 32

Re: GRUB2 refusing to boot manually added partition

Thank you I will try gparted

(I will mark as [SOLVED] if it works)

Offline

Board footer

Powered by FluxBB