![]() Once the boot loader on the new disk loads, make sure you select to boot the new system entry you created earlier. You may need to change the boot device priorities in your BIOS to do this. Reboot the computer, making sure it boots from the new RAID disk ( /dev/sdb) and not the original disk ( /dev/sda). Running "embed /boot/grub/e2fs_stage1_5 (hd0)". yesĬhecking if "/boot/grub/e2fs_stage1_5" exists. yesĬhecking if "/boot/grub/stage2" exists. Check that the "partition type" is detected as "0xfd", as shown below, to make sure you have the right partition:įilesystem type is ext2fs, partition type 0xfdĬhecking if "/boot/grub/stage1" exists. Then we install GRUB onto the MBR of our new second drive. The MBR will then be correct, your new second drive will have become your first drive, and you will be able to boot from this disk. If your first disk fails, however, and you remove it, or you change the order disks are detected in the BIOS so that you can boot from your second disk, then your second disk will become the first disk in the system. the first disk in the system (when it is not currently the case). Then we tell GRUB to assume the new second drive is (hd0), i.e. the partition we just added above, on the second partition of the second drive). first disk, first partition), and (hd1,1) (i.e. Then we find our two partitions - the current one (hd0,0) (I.e. (Discuss in Talk:Convert a single drive system to RAID) GRUB Legacy Reason: Support more boot loaders, simplify. Install the boot loader on the RAID array If you do not do this, you can get an ALERT! /dev/md0 does not exist error when booting: Then save the array configuration with UUIDs to make it easier for the system to find /dev/md0 at boot. ![]() If the chroot command gives you an error like chroot: failed to run command `/bin/zsh': No such file or directory, then use chroot /mnt/new-raid/ /bin/bash instead.Įdit /etc/nf and change the MAILADDR line to be your email address, if you want emailed alerts of problems with the RAID 1. Rebuild the initramfs Chroot into the RAID system # mount -bind /sys /mnt/new-raid/sys mnt/new-raid/etc/fstab /dev/md0 / ext4 defaults 0 1 It is recommended to use Persistent block device naming. ![]() You need to tell fstab on the new disk where to find the new device. If you then toggle the primary drive for boot, you can boot the degraded array. install the bootloader and generate a grub.cfg within the chroot environment. You can add the mdadm_udev hook to /etc/nf, regenerate the initramfs. Note: Another alternative that avoids the uuid-shuffle, is to chroot your degraded array after it has been created and file copied to each of the respective arrays (e.g. After having done so, the easiest way to add an entry to boot from the degraded arrays is simply to copy the "Arch Linux, with Linux linux" entry and change the UUID's to match your arrays as shown in /dev/disk/by-uuid. dev/md0, /dev/md1 or simply use the UUID for each of the raid filesystems. Now you can simply add an entry containing either the device files (e.g. To /etc/default/grub and regenerate grub.cfg. To restore generation of a single entry per-line for each boot option, simply add: This is complicated by the default generation options making use of a primary boot entry, and placing the remaining boot entries in sub-menus. ![]() You can then add a menu entry in /boot/grub/grub.cfg pointing to the raid partitions for boot. To boot the system from your degraded array, you will need to (1) add the mdadm_udev hook to the HOOKS in /etc/nf (after the entry for block) and (2) regenerate the initramfs and generate a new configuration file. Notice we added the fallback line and duplicated the Arch Linux entry with a different root directive on the kernel line.Īlso update the "kopt" and "groot" sections, as shown below, if they are in your /mnt/new-raid/boot/grub/menu.lst file, because it will make applying distribution kernel updates easier: Kernel /vmlinuz-linux root=/dev/md0 md=0,/dev/sda1,/dev/sdb1 Use your preferred text editor to open /mnt/new-raid/boot/grub/menu.lst. (Discuss in Talk:Convert a single drive system to RAID) Reason: The following configuration has not been verified after the article has been reorganized on September 2015. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |