Skip to content

Instantly share code, notes, and snippets.

@chx
Last active November 23, 2018 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chx/36e8d26646195f14fa3ba755fc66fc09 to your computer and use it in GitHub Desktop.
Save chx/36e8d26646195f14fa3ba755fc66fc09 to your computer and use it in GitHub Desktop.
  1. installimage
  2. Created two soft RAID 1 arrays, one 512MB /dev/md0, one 207G /dev/md1
  3. mount /dev/md0 /boot
  4. cp -a /boot .
  5. umount /boot
  6. mdadm -S /dev/md0
  7. mdadm --zero-superblock /dev/sdb1; mdadm --zero-superblock /dev/sda1
  8. gdisk /dev/sda
  9. add new partition, full size
  10. w (changing sda to GPT)
  11. cfdisk /dev/sdb
  12. Change /dev/sdb1 to bootable and type linux (83)
  13. Write it back
  14. mkfs -t ext3 /dev/sdb1
  15. mount /dev/sdb1 /boot
  16. cp -a boot/* /boot/
  17. umount /boot
  18. grub-install --target=i386-pc /dev/sdb
  19. mount /dev/md1 /mnt
  20. edit /mnt/etc/mdadm.cnf to remove the now dead /dev/md/0 and rename /dev/md/1 to /dev/md/0
  21. edit /mnt/etc/fstab /dev/sdb1 /boot ext3 defaults 0 0 and /dev/md/0 / ext4 defaults 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment