Last active
December 20, 2015 14:59
-
-
Save wopfel/6150628 to your computer and use it in GitHub Desktop.
My steps for creating an encrypted ArchLinux installation based on LVM inside a virtual machine. Meine Schritte zum Erstellen einer verschlüsselten, auf LVM basierenden ArchLinux-Installation innerhalb einer virtuellen Maschine.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Boot: archlinux-2012.10.06-dual.iso | |
Boot: archlinux-2012.11.01-dual.iso | |
Boot: archlinux-2013.01.04-dual.iso | |
Netzwerkkarte auf Bridge stellen, dann mit Putty einwählen | |
passwd ; /etc/rc.d/sshd start | |
loadkeys de-latin1 (loadkezs deßlatin1) | |
cfdisk /dev/sda | |
New - Primary - 500 MB - Beginning | |
Bootable | |
Mit dem Cursor eins nach unten - New - Primary - Enter | |
Write - yes | |
Quit | |
cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sda2 | |
YES | |
Kennwort | |
Kennwort | |
cryptsetup luksOpen /dev/sda2 lvm | |
Kennwort | |
pvcreate /dev/mapper/lvm | |
vgcreate main /dev/mapper/lvm | |
vgs | |
lvcreate -L 3GB -n root main | |
lvcreate -L 200MB -n swap main | |
lvcreate -L 100MB -n home main | |
mkfs -t ext4 /dev/mapper/main-root | |
mkfs -t ext4 /dev/mapper/main-home | |
mkfs -t ext2 /dev/sda1 | |
mkswap -L swap /dev/mapper/main-swap | |
mount /dev/mapper/main-root /mnt | |
mkdir /mnt/home | |
mount /dev/mapper/main-home /mnt/home | |
mkdir /mnt/boot | |
mount /dev/sda1 /mnt/boot | |
pacstrap /mnt base base-devel | |
GRUB?? ----> | |
arch-chroot /mnt pacman -S grub-bios | |
Y - Enter | |
<----- GRUB | |
SYSLINUX?? ----> | |
arch-chroot /mnt pacman -S syslinux | |
syslinux-install_update -i -a -m -c /mnt | |
vi /mnt/boot/syslinux/syslinux.cfg | |
APPEND cryptdevice=/dev/sda2:main root=/dev/mapper/main-root rw lang=de locale=de_DE.UTF-8 | |
<----- SYSLINUX | |
swapon -L swap | |
genfstab -U -p /mnt >> /mnt/etc/fstab | |
arch-chroot /mnt | |
echo myhostname > /etc/hostname | |
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime | |
echo 'LANG="de_DE.UTF-8"' > /etc/locale.conf | |
vi /etc/locale.gen | |
/de_DE - mit n weitersuchen bis Zeile #de_DE.UTF-8 UFT-8 gefunden - Cursor an Anfang der Zeile - # mit x entfernen - mit ZZ speichern | |
locale-gen | |
echo KEYMAP=de-latin1 > /etc/vconsole.conf | |
vi /etc/mkinitcpio.conf | |
MODULES="ext4" | |
HOOKS="base udev autodetect pata scsi sata usb usbinput keymap encrypt lvm2 filesystems fsck shutdown" | |
Ab 01.01.2013 (?) folgende Zeile verwenden, da pata+scsi+sata+usb "deprecated" ist | |
HOOKS="base udev autodetect block usbinput keymap encrypt lvm2 filesystems fsck shutdown" | |
Ab 01.10.2013 (?) folgende Zeile verwenden, da usbinput "deprecated" ist | |
HOOKS="base udev autodetect block keyboard keymap encrypt lvm2 filesystems fsck shutdown" | |
mkinitcpio -p linux | |
vi /etc/default/grub | |
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:cryptroot" | |
passwd | |
Kennwort | |
Kennwort | |
grub-install --target=i386-pc --recheck --debug /dev/sda | |
mkdir -p /boot/grub/locale | |
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo # \ ist Shift+Ü | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# noch ungetestet: | |
systemctl enable dhcpcd@.service | |
pacman -S openssh | |
systemctl enable sshd.service | |
adduser | |
pacman -S acpid ntp dbus avahi cups | |
systemctl enable acpid.service | |
systemctl enable ntpd.service | |
systemctl enable avahi-daemon.service | |
systemctl enable cups.service | |
pacman -S ntp | |
vi /etc/ntp.conf | |
ntpd -gq | |
hwclock -w | |
exit | |
umount /mnt/{boot,home,} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment