Last active
March 30, 2022 18:07
-
-
Save entropylost/3bc192e264079be36f73e01c7bb4d3ef to your computer and use it in GitHub Desktop.
Raid0 for Ubuntu (Zorin OS), NVME ssds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PREREQ='mdadm mdrun' | |
prereqs() { | |
echo "$PREREQ" | |
} | |
case $1 in | |
prereqs) | |
prereqs | |
exit 0 | |
;; | |
esac | |
. /scripts/functions | |
IMSM_NO_PLATFORM=1 mdadm -A --scan | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PREREQ='' | |
prereqs() { | |
echo "$PREREQ" | |
} | |
case $1 in | |
prereqs) | |
prereqs | |
exit 0 | |
;; | |
esac | |
. /usr/share/initramfs-tools/hook-functions | |
manual_add_modules vmd | |
manual_add_modules nvme | |
manual_add_modules nvme_core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Executed within a terminal of the install usb | |
sudo bash | |
apt install mdadm | |
IMSM_NO_PLATFORM=1 mdadm --assemble --scan | |
# Install using whichever install program, grub likely breaks. | |
mount /dev/md126p2 /mnt/ | |
mount --bind /dev/ /mnt/dev/ | |
mount --bind /dev/pts/ /mnt/dev/pts/ | |
mount --bind /proc/ /mnt/proc/ | |
mount --bind /sys/ /mnt/sys/ | |
mount --bind /run/ /mnt/run/ | |
chroot /mnt/ | |
mount /dev/md126p1 /mnt/ # EFI Directory | |
apt install mdadm | |
# Set /etc/default/grub GRUB_CMDLINE_LINUX="domdadm" | |
# Write nvme.sh to /etc/initramfs-tools/hooks as nvme. | |
# Write configmdadm.sh to /etc/initramfs-tools/scripts/local-top as configmdadm. | |
chmod u+x /etc/initramfs-tools/scripts/local-top/configmdadm | |
chmod u+x /etc/initramfs-tools/hooks/nvme | |
update-initramfs -u | |
update-grub | |
grub-install --efi-directory="/mnt/" /dev/md126 | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment