Advertisement
encfs

Untitled

Oct 5th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.26 KB | None | 0 0
  1. 1--Start Arch OS and Login to user
  2.  
  3. 2--Build and install debootstrap package
  4.  
  5. cd
  6. wget https://aur.archlinux.org/cgit/aur.git/snapshot/debootstrap.tar.gz
  7. wget https://aur.archlinux.org/cgit/aur.git/snapshot/debian-archive-keyring.tar.gz
  8. wget https://aur.archlinux.org/cgit/aur.git/snapshot/gnupg1.tar.gz
  9. tar zxvf debootstrap.tar.gz
  10. tar zxvf debian-archive-keyring.tar.gz
  11. tar zxvf gnupg1.tar.gz
  12. cd debootstrap && makepkg -is
  13. cd
  14. cd debian-archive-keyring && makepkg -is
  15. cd
  16. cd gnupg1 && makepkg -is
  17. cd
  18. rm -r debootstrap gnupg1 debian-archive-keyring debootstrap.tar.gz gnupg1.tar.gz debian-archive-keyring.tar.gz
  19.  
  20. 3--Check partitions
  21.  
  22. lsblk
  23. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
  24. sda 8:0 0 1.8T 0 disk #My_Files
  25. sdb 8:16 0 3.7T 0 disk #Backup
  26. sdc 8:32 0 465.8G 0 disk #home
  27. sdd 8:48 0 477G 0 disk
  28. |-sdd1 8:49 0 8G 0 part #swap
  29. |-sdd2 8:50 0 469G 0 part #Games
  30. sde 8:64 0 111.8G 0 disk
  31. |-sde1 8:65 0 1G 0 part mou #boot
  32. |-sde2 8:66 0 110.8G 0 part #root
  33.  
  34. 4--Mount Partitions:
  35.  
  36. mount -t btrfs -o ssd,noatime,discard,space_cache,compress=lzo,subvol=Debian /dev/sde2 /mnt
  37. mount -t btrfs -o ssd,noatime,discard,space_cache,compress=lzo,subvol=DebianHome /dev/sdc /mnt/home
  38. mount -t btrfs -o autodefrag,noatime,space_cache,compress-force=lzo /dev/sda /mnt/My_Files
  39. mount -t btrfs -o ssd,noatime,discard,space_cache,compress=lzo /dev/sdd2 /mnt/Games
  40. mount -t vfat /dev/sde1 /mnt/boot
  41.  
  42. 5--Install Base System:
  43.  
  44. /usr/sbin/debootstrap --arch amd64 jessie /mnt/ http://ftp.us.debian.org/debian
  45.  
  46. 6--Generate File System Table:
  47.  
  48. genfstab -U -p /mnt >> /mnt/etc/fstab
  49.  
  50. 7--Mount the temporary api filesystems:
  51.  
  52. cd /mnt/
  53. mount -t proc proc proc/
  54. mount --rbind /sys sys/
  55. mount --rbind /dev dev/
  56. mount -t tmpfs tmpfs tmp/
  57.  
  58. 8--Chroot into Debian Root partition and Configure apt:
  59.  
  60. LANG=C.UTF-8 chroot /mnt/ /bin/bash
  61. export PATH=/bin:/sbin:/usr/bin:/usr/sbin
  62. export LANG=C
  63.  
  64. dpkg --add-architecture amd64
  65. apt update
  66. apt install debian-keyring vim
  67. vim /etc/apt/sources.list
  68. deb http://ftp.us.debian.org/debian jessie main contrib non-free
  69. deb-src http://ftp.us.debian.org/debian jessie main contrib non-free
  70.  
  71. deb http://ftp.us.debian.org/debian jessie-updates main contrib non-free
  72. deb-src http://ftp.us.debian.org/debian jessie-updates main contrib non-free
  73.  
  74. deb http://security.debian.org/ jessie/updates main contrib non-free
  75. deb-src http://security.debian.org/ jessie/updates main contrib non-free
  76. apt update
  77.  
  78. 9--Configuring Locale
  79.  
  80. apt install locales
  81. dpkg-reconfigure locales
  82.  
  83. apt console-setup
  84. dpkg-reconfigure console-setup
  85. dpkg-reconfigure keyboard-configuration
  86.  
  87. 10--Setting Timezone
  88.  
  89. #Setting the third line of the file /etc/adjtime to “UTC” or “LOCAL” determines whether the system
  90. #will interpret the hardware clock as being set to UTC respective local time. The following command
  91. #allows you to set that.
  92.  
  93. editor /etc/adjtime
  94. 0.0 0 0.0
  95. 0
  96. LOCAL
  97.  
  98. dpkg-reconfigure tzdata
  99.  
  100. 11--Configure Networking
  101. editor /etc/network/interfaces
  102.  
  103. auto eth0
  104. allow-hotplug eth0
  105. iface eth0 inet dhcp
  106.  
  107. 12--Set your hostname in /etc/
  108.  
  109. echo 'hostname-here' > /etc/hostname
  110.  
  111. 13--Set root password and create user: apt
  112.  
  113. passwd
  114. #Enter the new password
  115. useradd -m -g users -s /bin/bash username
  116. passwd username
  117. #Enter the new password
  118.  
  119. 14--Install a Kernel **A lil clueless here, What do you think?**
  120. apt install btrfs-tools
  121. apt-get update --fix-missing
  122.  
  123. apt install linux-base linux-image-amd64 linux-headers-amd64
  124.  
  125. ** I don't know what it means to update the kernel
  126. ** so If you have anything to add here to fix the kernel go for it
  127.  
  128. apt install firmware-linux-free
  129. apt install firmware-linux
  130. apt install firmware-linux-nonfree
  131.  
  132. 15--Configure the Booting Process
  133. mkdir -p /boot/Debian
  134.  
  135. vim /etc/kernel/postinst.d/zz-update-efistub
  136. #!/bin/sh
  137. cp /vmlinuz-3.16.0-4-amd64 /initrd.img-3.16.0-4-amd64 /boot/Debian
  138.  
  139. nano /boot/loader/entries/debian.conf
  140. title Debian
  141. linux /Debian/vmlinuz
  142. initrd /initrd.img
  143. options root=PARTUUID=.... rootflags=subvol=Debian rw
  144.  
  145. chmod +x /etc/kernel/postinst.d/zz-update-efistub
  146. ls -la /boot/Debian/
  147.  
  148. 16--Exit chroot, Unmount partitions and reboot
  149.  
  150. exit
  151. umount -R /mnt
  152. reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement