Quick Install

From ArchBang

Jump to: navigation, search
(Created page with "Following on from the thread on ArchBang forums: http://bbs.archbang.org/viewtopic.php?pid=32159#p32159 Created a simple script which will quickly install ArchBang: #!/bin/b...")
Line 11: Line 11:
   # by Mr Green
   # by Mr Green
   #
   #
-
 
+
 
   # check for root
   # check for root
   [[ ${EUID} -ne 0 ]] && echo "::This script must be run as root::" && exit 1
   [[ ${EUID} -ne 0 ]] && echo "::This script must be run as root::" && exit 1
-
 
+
 
   # Variables
   # Variables
   ACM="arch-chroot /mnt"
   ACM="arch-chroot /mnt"
-
 
+
 
   # copy live iso environment to /mnt (new install device)
   # copy live iso environment to /mnt (new install device)
   echo "Copy live root image to /mnt "
   echo "Copy live root image to /mnt "
   cp -ax / /mnt
   cp -ax / /mnt
-
 
+
 
   # copy kernel to new install
   # copy kernel to new install
   echo "Add kernel to new install..."
   echo "Add kernel to new install..."
   cp -vaT /run/archiso/bootmnt/arch/boot/$(uname -m)/vmlinuz /mnt/boot/vmlinuz-linux
   cp -vaT /run/archiso/bootmnt/arch/boot/$(uname -m)/vmlinuz /mnt/boot/vmlinuz-linux
-
 
+
 
   # generate fstab for new device
   # generate fstab for new device
   echo "Create /etc/fstab..."
   echo "Create /etc/fstab..."
   genfstab -U -p /mnt > /mnt/etc/fstab
   genfstab -U -p /mnt > /mnt/etc/fstab
-
 
+
 
   # remake boot image
   # remake boot image
   echo "Rebuild boot image..."
   echo "Rebuild boot image..."
   ${ACM} /usr/bin/mkinitcpio -p linux
   ${ACM} /usr/bin/mkinitcpio -p linux
-
 
+
 
   # Install syslinux bootloader (optional)
   # Install syslinux bootloader (optional)
   echo "Add syslinux bootloader..."
   echo "Add syslinux bootloader..."
   ${ACM} /usr/bin/syslinux-install_update -iam
   ${ACM} /usr/bin/syslinux-install_update -iam
-
 
+
 
   # clean up new install, basically removing archiso files that are needed live
   # clean up new install, basically removing archiso files that are needed live
   echo "Clean new install..."
   echo "Clean new install..."
   rm /mnt/etc/mkinitcpio-archiso.conf
   rm /mnt/etc/mkinitcpio-archiso.conf
   rm -r /mnt/etc/initcpio
   rm -r /mnt/etc/initcpio
-
 
+
 
   echo "::Install complete::"
   echo "::Install complete::"
   echo "## Edit /mnt/boot/syslinux/syslinux.cfg before rebooting into new install ##"
   echo "## Edit /mnt/boot/syslinux/syslinux.cfg before rebooting into new install ##"
-
 
+
 
Copy and paste script into a text editor, save as fast-install.
Copy and paste script into a text editor, save as fast-install.

Revision as of 12:28, 20 March 2016

Personal tools