Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Boot from Debian install disk and Execute a shell:
- Disks:
- sda 8:32 0 32G 0 disk
- |-sda1 8:33 0 1G 0 part /boot
- |-sda2 8:34 0 4G 0 part [SWAP]
- `-sda3 8:35 0 27G 0 part /
- sdb 8:48 0 477G 0 disk /home
- Make Swap Partition:
- mkswap /dev/sda2 && swapon /dev/sda2
- Format disk partitions:
- mkfs.vfat -F32 /dev/sda1
- mkfs.btrfs /dev/sda3
- mkfs.btrfs /dev/sdb
- Mount Partitions:
- # mount /
- mount -t btrfs -o ssd,noatime,discard,space_cache,compress=lzo /dev/sda3 /mnt
- cd /mnt
- btrfs subvolume create Debian
- cd ..
- umount /mnt
- mount -t btrfs -o ssd,noatime,discard,space_cache,compress=lzo,subvol=Debian /dev/sda3 /mnt
- # mount /home
- cd /mnt
- mkdir home
- mount -t btrfs -o ssd,noatime,discard,space_cache,compress=lzo /dev/sdb /mnt/home
- btrfs subvolume create DebianHome
- cd ..
- umount /mnt/home
- mount -t btrfs -o ssd,noatime,discard,space_cache,compress=lzo,subvol=DebianHome /dev/sdb /mnt/home
- # mount boot
- mkdir /mnt/boot
- mount -t vfat /dev/sda1 /mnt/boot
- Install Base System:
- /usr/sbin/debootstrap --arch amd64 jessie /mnt/ http://ftp.us.debian.org/debian
- Mount the temporary api filesystems:
- cd /mnt/
- mount -t proc proc proc/
- mount --rbind /sys sys/
- mount --rbind /dev dev/
- mount -t tmpfs tmpfs tmp/
- Chroot in the Debian Root partition:
- LANG=C.UTF-8 chroot /mnt/ /bin/bash
- export PATH=/bin:/sbin:/usr/bin:/usr/sbin
- export LANG=C
- Write File System Table:
- apt update
- apt install debian-keyring vim
- vim /etc/fstab
- # <file system> <dir> <type> <options> <dump> <pass>
- #/dev/sda3
- UUID=.... / btrfs rw,noatime,compress=lzo,ssd,discard,space_cache,subvolid=257,subvol=/Debian,subvol=Debian 0 0
- #/dev/sdb
- UUID=.... /home btrfs rw,noatime,compress=lzo,ssd,discard,space_cache,subvolid=257,subvol=/DebianHome,subvol=DebianHome 0 0
- #/dev/sda1
- UUID=.... /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
- #/dev/sda2
- UUID=.... swap swap defaults 0 0
- Configure apt:
- dpkg --add-architecture amd64
- vim /etc/apt/sources.list
- deb http://ftp.us.debian.org/debian jessie main contrib non-free
- deb-src http://ftp.us.debian.org/debian jessie main contrib non-free
- deb http://ftp.us.debian.org/debian jessie-updates main contrib non-free
- deb-src http://ftp.us.debian.org/debian jessie-updates main contrib non-free
- deb http://security.debian.org/ jessie/updates main contrib non-free
- deb-src http://security.debian.org/ jessie/updates main contrib non-free
- apt update
- Configuring Locale
- apt install locales
- dpkg-reconfigure locales
- apt install console-setup
- dpkg-reconfigure console-setup
- dpkg-reconfigure keyboard-configuration
- Setting Timezone
- #Setting the third line of the file /etc/adjtime to “UTC” or “LOCAL” determines whether the system
- #will interpret the hardware clock as being set to UTC respective local time. The following command
- #allows you to set that.
- editor /etc/adjtime
- 0.0 0 0.0
- 0
- LOCAL
- dpkg-reconfigure tzdata
- Configure Networking
- editor /etc/network/interfaces
- auto eth0
- allow-hotplug eth0
- iface eth0 inet dhcp
- Set your hostname in /etc/
- echo 'linux' > /etc/hostname
- Set root password and create user:
- passwd
- #Enter the new password
- useradd -m -g users -s /bin/bash debian
- passwd debian
- #Enter the new password
- Install Kernel:
- apt install btrfs-tools
- apt-get update --fix-missing
- apt install linux-base linux-image-amd64 linux-headers-amd64
- apt install firmware-linux-free
- apt install firmware-linux
- apt install firmware-linux-nonfree
- Add kernel modules to the initrd:
- #*********This has to be the point of weakness...
- #*********I've installed Debian using this exact process replacing btrfs subvolumes
- #*********for ext4 partitions and Debian worked just fine...
- vim /etc/initramfs-tools/modules
- btrfs
- zlib-deflate
- libcrc32c
- crc32c
- vim /usr/share/initramfs-tools/modules.d/btrfs
- btrfs
- zlib-deflate
- libcrc32c
- crc32c
- vim /etc/modules-load.d/modules.conf
- btrfs
- zlib-deflate
- libcrc32c
- crc32c
- update-initramfs -u -k all
- Install sudo and edit visudo
- apt install sudo
- EDITOR=nano visudo
- # add this under root in User privilage specification
- debian ALL=(ALL) ALL
- Configure the Booting Process
- #I'm already using systemdboot for arch linux so I just need to add a conf file
- nano /boot/loader/entries/debian.conf
- title Debian
- linux /vmlinuz
- initrd /initrd.img
- options root=PARTUUID=.... rootflags=subvol=Debian rw
- Exit chroot, Unmount partitions and reboot
- exit
- umount -R /mnt
- reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement