Advertisement
BSDG33KCLUB

Tux Hat Linux 2.3 install without internet access

Nov 28th, 2014
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. Installation without Internet access
  2.  
  3. If you wish to install the archiso(e.g. the offical monthly release) as it is without an Internet connection, or, if you don't want to download the packages you want again:
  4.  
  5. First, please follow the beginners' guide and skip some parts(like #Establish_an_internet_connection) until the #Install_the_base_system step.
  6. Install the archiso to the new root
  7.  
  8. Instead of installing the packages with pacstrap(as it downloads every packages from remote repository and we have no Internet access now), please copy everything in the Live environment to the new root:
  9.  
  10. # time (cp -ax /{usr,bin,lib,lib64,sbin,etc,home,opt,root,srv,var} /mnt)
  11.  
  12. Note: This command excludes some special directories, as they should not be copied to the new root.
  13.  
  14. Then, create some directories and copy the kernel image to the new root, in order to keep the integrity of the new system:
  15.  
  16. # mkdir -vm755 /mnt/{boot,dev,run,mnt}
  17. # cp -vaT /run/archiso/bootmnt/arch/boot/$(uname -m)/vmlinuz /mnt/boot/vmlinuz-linux
  18. # mkdir -vm1777 /mnt/tmp
  19. # mkdir -vm555 /mnt/{sys,proc}
  20.  
  21. After that, please generate a fstab as described in Beginners' guide#Generate_an_fstab.
  22. Chroot and configure the base system
  23.  
  24. Next, chroot into your newly installed system:
  25.  
  26. # arch-chroot /mnt /bin/bash
  27.  
  28. Please note that before you configure the locale,keymap,etc,... there are something necessary to do, in order to get rid of the trace of a Live environment(in other words, the customization of archiso which does not fit a non-Live environment).
  29. Restore the configuration of journald
  30.  
  31. This customization of archiso will lead to storing the system journal in RAM, it means that the journal will not available after reboot:
  32.  
  33. # sed -i 's/Storage=volatile/#Storage=auto/' /etc/systemd/journald.conf
  34.  
  35. Reset the pam's configuration
  36.  
  37. This configuration of pam perhaps break the security of your new system, it's recommend to use the default configuration:
  38.  
  39. # nano /etc/pam.d/su
  40.  
  41. #%PAM-1.0
  42. auth sufficient pam_rootok.so
  43. # Uncomment the following line to implicitly trust users in the "wheel" group.
  44. #auth sufficient pam_wheel.so trust use_uid
  45. # Uncomment the following line to require a user to be in the "wheel" group.
  46. #auth required pam_wheel.so use_uid
  47. auth required pam_unix.so
  48. account required pam_unix.so
  49. session required pam_unix.so
  50.  
  51. Remove special udev rule
  52.  
  53. This rule of udev starts the dhcpcd automatically if there are any wired network interfaces.
  54.  
  55. # rm /etc/udev/rules.d/81-dhcpcd.rules
  56.  
  57. Disable and remove the services created by archiso
  58.  
  59. Some service files are created for the Live environment, please disable the services and remove the file as they are unnecessary for the new system:
  60.  
  61. # systemctl disable pacman-init.service choose-mirror.service
  62. # rm -r /etc/systemd/system/{choose-mirror.service,pacman-init.service,etc-pacman.d-gnupg.mount,getty@tty1.service.d}
  63. # rm /etc/systemd/scripts/choose-mirror
  64.  
  65. Remove special scripts of the Live environment
  66.  
  67. There are some scripts installed in the live system by archiso scripts, which are unnecessary for the new system:
  68.  
  69. # rm /etc/systemd/system/getty@tty1.service.d/autologin.conf
  70. # rm /root/{.automated_script.sh,.zlogin}
  71. # rm /etc/sudoers.d/g_wheel
  72. # rm /etc/mkinitcpio-archiso.conf
  73. # rm -r /etc/initcpio
  74.  
  75. Set the password of arch
  76.  
  77. The customization script created a normal user called arch for the Live environment. You can set a passwd for user arch in order to login with this username(there is no passwd for arch by default):
  78.  
  79. # passwd arch
  80.  
  81. Or, if you don't want to use this username, please remove this user:
  82.  
  83. # userdel -r arch
  84.  
  85. Create an initial ramdisk environment
  86. # mkinitcpio -p linux
  87.  
  88. Set the root password
  89. # passwd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement