daily pastebin goal
59%
SHARE
TWEET

arch bcache btrfs instal

a guest Mar 8th, 2014 140 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set -k
  2.  
  3. DIRNAME=./arch
  4.  
  5. source "./arch/arch-config"
  6.  
  7. source "./arch/functions.sh"
  8.  
  9. modprobe raid0
  10.  
  11. modprobe raid1
  12.  
  13. modprobe raid5
  14.  
  15. modprobe dm-mod
  16.  
  17. modprobe bcache
  18.  
  19. # clearing device: /dev/sda
  20.  
  21. dd if=/dev/zero of=/dev/sda bs=512 count=2000000
  22.  
  23. dd if=/dev/zero of=/dev/sda bs=512 seek=5858533168 count=2000000
  24.  
  25. # clearing device: /dev/sdb
  26.  
  27. dd if=/dev/zero of=/dev/sdb bs=512 count=2000000
  28.  
  29. dd if=/dev/zero of=/dev/sdb bs=512 seek=5858533168 count=2000000
  30.  
  31. # clearing device: /dev/sdc
  32.  
  33. dd if=/dev/zero of=/dev/sdc bs=1M
  34.  
  35. # clearing device: /dev/sdd
  36.  
  37. dd if=/dev/zero of=/dev/sdd bs=1M
  38.  
  39. echo "2\no\ny\nn\n\n\n+100M\nef00\nn\n\n\n+200M\n\nn\n\n\n+16G\n8200\nn\n\n\n\nfd00\np\nw\ny\n" | gdisk /dev/sdc
  40.  
  41. sgdisk --backup=table /dev/sdc
  42.  
  43. sgdisk --load-backup=table /dev/sdc
  44. partprobe /dev/sdc
  45.  
  46. sgdisk --load-backup=table /dev/sdd
  47. partprobe /dev/sdd
  48.  
  49. mdadm --create /dev/md0 --level=1 --metadata=1.2 --raid-devices=2 /dev/sd[cd]4
  50.  
  51. pacman -Syy --noconfirm yajl wget binutils base-devel
  52.  
  53. cd /tmp
  54.  
  55. wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz
  56.  
  57. tar -xpvf package-query.tar.gz
  58.  
  59. cd package-query
  60.  
  61. makepkg -i --asroot --noconfirm
  62.  
  63. cd /tmp
  64.  
  65. wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
  66.  
  67. tar -xpvf yaourt.tar.gz
  68.  
  69. cd yaourt
  70.  
  71. makepkg -i --asroot --noconfirm
  72.  
  73. cd /root
  74.  
  75. yaourt -S --noconfirm bcache-tools
  76.  
  77. make-bcache --wipe-bcache --writeback -B /dev/sd[ab] -C /dev/md0
  78.  
  79. mkfs.vfat -F 32 /dev/sdc1
  80.  
  81. mkfs.ext3 -L boot /dev/sdc2
  82.  
  83. mkswap -L swap_c /dev/sdc3
  84.  
  85. swapon /dev/sdc3
  86.  
  87. mkfs.vfat -F 32 /dev/sdd1
  88.  
  89. mkfs.ext3 -L boot /dev/sdd2
  90.  
  91. mkswap -L swap_d /dev/sdd3
  92.  
  93. swapon /dev/sdd3
  94.  
  95. mkfs.btrfs -f -d raid1 /dev/bcache0 /dev/bcache1
  96.  
  97. mount /dev/bcache0 /mnt/
  98.  
  99. btrfs subvolume create /mnt/home
  100.  
  101. mkdir /mnt/boot
  102.  
  103. mount  /dev/sdc2 /mnt/boot
  104.  
  105. mkdir /mnt/boot/efi
  106.  
  107. mount /dev/sdc1 /mnt/boot/efi
  108.  
  109. pacstrap /mnt base base-devel zsh
  110.  
  111. genfstab -U -p /mnt >> /mnt/etc/fstab
  112.  
  113. arch-chroot /mnt
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top