Difference between revisions of "Linux arch install"

From John Freier
Jump to: navigation, search
(Created page with "Here are my steps. 1. Boot in to Arch ISO. 2. Update date time. timedatectl set-ntp true 3. Setup Partitions 3.a Use lsblk or fdisk -l to find the path of the harddisk....")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Here are my steps.
+
Here are my steps. These steps are for bios, NOT uefi
  
 
1. Boot in to Arch ISO.
 
1. Boot in to Arch ISO.
  
 
2. Update date time.
 
2. Update date time.
   timedatectl set-ntp true
+
   # timedatectl set-ntp true
  
 
3. Setup Partitions
 
3. Setup Partitions
Line 13: Line 13:
 
3.b Start up fdisk to format a harddisk.
 
3.b Start up fdisk to format a harddisk.
  
   fdisk /dev/sda
+
   # fdisk /dev/sda
  
 
   Remember to change the type for swap to hex '82' or swap
 
   Remember to change the type for swap to hex '82' or swap
Line 24: Line 24:
 
3.c When all the partitions are setup use 'w' to apply the changes.
 
3.c When all the partitions are setup use 'w' to apply the changes.
  
   w
+
   # w
  
 
4. Format the new partitions.
 
4. Format the new partitions.
  
   mkfs.ext2 /dev/sda1
+
   # mkfs.ext2 /dev/sda1
   mkswap /dev/sda2
+
   # mkswap /dev/sda2
   mkfs.ext4 /dev/sda3
+
   # mkfs.ext4 /dev/sda3
  
 
5. Mount the new file partitioned file systems and turn swap on.
 
5. Mount the new file partitioned file systems and turn swap on.
  
   mount /dev/sda3 /mnt
+
   # mount /dev/sda3 /mnt
   mount --mkdir /dev/sda1 /mnt/boot
+
   # mount --mkdir /dev/sda1 /mnt/boot
 
    
 
    
 
   swapon /dev/sda2
 
   swapon /dev/sda2
 +
 +
6. Use pacstrap in install arch.
 +
 +
  # pacstrap /mnt base base-devel linux linux-firmware networkmanager vim
 +
 +
7. Generate the fstab file to define the partitions and filesystems
 +
 +
  # genfstab -U /mnt >> /mnt/etc/fstab
 +
 +
 +
8. Sudo login in to the system
 +
 +
  # arch-chroot /mnt
 +
 +
9. Set the timezone.
 +
 +
  # ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime
 +
 +
Update the time in /etc/adjtime
 +
 +
  # hwclock --systohc
 +
 +
10. Localization - Edit the file
 +
 +
  vim /etc/locale.gen
 +
 +
Uncomment out
 +
  en_US.UTF-8 UTF-8
 +
  en_US ISO-8859-1
 +
 +
Generate language file by running the following file.
 +
  # locale-gen
 +
 +
11. Create and edit the locale.conf.
 +
 +
  # vim /etc/locale.conf
 +
 +
Add the following
 +
  LANG=en_US.UTF-8
 +
 +
12. Set the hostname.
 +
 +
  # echo "archlinux" > /etc/hostname
 +
 +
13. Set the root password
 +
 +
  # passwd
 +
 +
 +
14. Install Grub - This is the bootloader
 +
 +
  # pacman -S grub
 +
  # grub-install --target=i386-pc /dev/sda
 +
  # grub-mkconfig -o /boot/grub/grub.cfg
 +
 +
 +
15. Enable NetworkManager - To make sure you have internet upon startup.
 +
 +
  # systemctl enable NetworkManager
 +
 +
15. Done.  Now exit, remove the IOS, and restart.
 +
 +
  # exit

Latest revision as of 12:50, 22 June 2022

Here are my steps. These steps are for bios, NOT uefi

1. Boot in to Arch ISO.

2. Update date time.

 # timedatectl set-ntp true

3. Setup Partitions

3.a Use lsblk or fdisk -l to find the path of the harddisk.

 /dev/sda

3.b Start up fdisk to format a harddisk.

 # fdisk /dev/sda
 Remember to change the type for swap to hex '82' or swap
 sda1 - primary - Linux - boot - 1gb
 sda2 - primary - Linux swap - swap - 1.5 x memmory
 sda3 - primary - Linux - root - The rest.


3.c When all the partitions are setup use 'w' to apply the changes.

 # w

4. Format the new partitions.

 # mkfs.ext2 /dev/sda1
 # mkswap /dev/sda2
 # mkfs.ext4 /dev/sda3

5. Mount the new file partitioned file systems and turn swap on.

 # mount /dev/sda3 /mnt
 # mount --mkdir /dev/sda1 /mnt/boot
 
 swapon /dev/sda2

6. Use pacstrap in install arch.

 # pacstrap /mnt base base-devel linux linux-firmware networkmanager vim

7. Generate the fstab file to define the partitions and filesystems

 # genfstab -U /mnt >> /mnt/etc/fstab


8. Sudo login in to the system

 # arch-chroot /mnt

9. Set the timezone.

 # ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime

Update the time in /etc/adjtime

 # hwclock --systohc

10. Localization - Edit the file

 vim /etc/locale.gen

Uncomment out

 en_US.UTF-8 UTF-8
 en_US ISO-8859-1

Generate language file by running the following file.

 # locale-gen

11. Create and edit the locale.conf.

 # vim /etc/locale.conf

Add the following

 LANG=en_US.UTF-8

12. Set the hostname.

 # echo "archlinux" > /etc/hostname

13. Set the root password

 # passwd


14. Install Grub - This is the bootloader

 # pacman -S grub
 # grub-install --target=i386-pc /dev/sda
 # grub-mkconfig -o /boot/grub/grub.cfg


15. Enable NetworkManager - To make sure you have internet upon startup.

 # systemctl enable NetworkManager

15. Done. Now exit, remove the IOS, and restart.

 # exit