This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Neon installation on sofware raid1 (mdadm) done

Tags: neon, raid1, mdadm, installation, grub neon, raid1, mdadm, installation, grub neon, raid1, mdadm, installation, grub
(comma "," separated)
rela
Registered Member
Posts
2
Karma
0
Hi,

I set up a new htpc with two 1To nvme and want to run raid1 to secure my system and data. I know that Neon live installer does not give this option, so I did this :

1 - Boot last Neon live user edition
2 - Install mdadm
3 - Create two same partitions on both disks (little fat32 for efi with boot/esp flags and unformatted for raid)
4 - Create the raid device :
Code: Select all
mdadm --create /dev/md0 --verbose --metadata=1.0 --level=1 --raid-devices=2 /dev/nvme0n1p2 /dev/nvme1n1p2

5 - Create two ext4 partitions on md0 for / and home
6 - Run Neon installer, /boot/efi mount point for /dev/nvme0n1p1, / for /dev/md0p1 and /home for /dev/md0p2

Everything goes fine until installer stop on grub-install error, let's do this manually :

7 - Mount needed stuff
Code: Select all
mount --bind /dev /tmp/../dev (.. is calamares path)
mount -t proc /proc /tmp/../proc
mount --bind /run /tmp/../run
mount -t sysfs /sys /tmp/../sys

8 - Chroot installed system :
Code: Select all
chroot /tmp/../

9 - Install grub :
Code: Select all
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=neon
update-grub

10 - Install mdadm

Everything done without errors => exit chroot and reboot => system boot on grub prompt, I can manually boot the OS with :
Code: Select all
linux (md/0,gpt1)/boot/vmlinuz root=/dev/md0p1
initrd (md/0,gpt1)/boot/initrd.img-<kernel_version>
boot


I think I miss just a little thing to get the grub menu, it seems grub could not find grub.cfg but don't know why, I spent all the day to find a solution but without results... Secureboot is disabled in the bios so I tried to create an entry pointing on grubx64.efi instead of shimx64.efi, I tried to create device.map for grub and I tried to use path instead of uuid, everything has no effects. All ideas are welcome :)

/etc/fstab
Code: Select all
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=59AC-D3DC                            /boot/efi      vfat    defaults,noatime 0 2
UUID=1defaf73-5602-4c9b-a3cc-e239646eba64 /              ext4    defaults,noatime 0 1
UUID=3c2042bd-ce3b-4f2b-af28-5a63390f68da /home          ext4    defaults,noatime 0 2


/etc/mdadm/mdadm.conf
Code: Select all
# definitions of existing MD arrays
ARRAY /dev/md/0  metadata=1.0 UUID=1bb70057:295ffd0f:65b76779:28c685ee name=neon:0


/boot/efi/EFI/neon/grub.cfg
Code: Select all
search.fs_uuid 1defaf73-5602-4c9b-a3cc-e239646eba64 root mduuid/1bb70057295ffd0f65b7677928c685ee,gpt1
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg


efibootmgr -v
Code: Select all
Boot0001  UEFI OS       HD(1,GPT,203df3f7-5383-4c7e-b9b8-6b0be255eef7,0x800,0x305000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0002* neon  HD(1,GPT,203df3f7-5383-4c7e-b9b8-6b0be255eef7,0x800,0x305000)/File(\EFI\NEON\SHIMX64.EFI)


ls -l /dev/disk/by-partuuid/
Code: Select all
lrwxrwxrwx 1 root root 15 août   8 21:47 03c86afa-7d21-42e3-a6f8-d8b2d7b85182 -> ../../nvme1n1p1
lrwxrwxrwx 1 root root 15 août   8 21:47 07579f05-5d99-4589-8be3-1893c86bc34e -> ../../nvme1n1p2
lrwxrwxrwx 1 root root 15 août   8 21:47 203df3f7-5383-4c7e-b9b8-6b0be255eef7 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 août   8 21:47 e51295be-0fec-473e-809e-31e809751d73 -> ../../nvme0n1p2

Last edited by rela on Wed Aug 11, 2021 8:53 am, edited 1 time in total.
rela
Registered Member
Posts
2
Karma
0
I finally found out the problem, it's due to bad grub prefix. It should be (hd1,gpt1)/EFI/neon but it is (hd1,gpt1)/EFI/ubuntu So grub is looking for a folder which not exist.
The workaround is to install grub with --bootloader-id=ubuntu instead of neon or simply copy /boot/efi/EFI/neon to /boot/efi/EFI/ubuntu I'd prefer change the grub prefix but it seems this variable is generate by grub-install and there is no option to change this way...

What is strange is that apparently this problem is not related to the use of mdadm...

My Neon install on raid1 is now fully functional, is there a place (wiki or something else ) where write an howto ? It could help people who wants to do same.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft