Install 2nd instance of Arch Linux without internet connection

I have successfully install a first instance of Arch Linux using Arch Linux ISO + pacstrap + pacman with internet connection.
I have updated to latest package database list (/var/lib/pacman/sync) and package cache files (/var/cache/pacman/pkg) in first instance of Arch Linux with "pacman -Swyu".
Next, I would like to install 2nd instance of Arch Linux without using internet connection.
I share the "/var/lib/pacman/sync" and "/var/cache/pacman/pkg" via NFS from first Arch Linux instance.
I boot the 2nd instance with Arch Linux ISO and attempt to install without internet connection.  I mount the two NFS shares from 1st instance to "/var/cache/pacman/pkg" and "/mnt/var/lib/pacman/sync" respectively.  I execute
   # pacstrap -i -c /mnt"
to start installation.
I found it is almost impossible with current implementation of pacstrap script.  The pacstrap script always attempt to update package database list with -Sy option.
I think some amendments on pacstrap script is needed to install Arch Linux without internet connection.

I made the edit by adding the option -o to do what you want.
I am too lazy for a feature request right now...
#!/bin/bash
# Assumptions:
# 1) User has partitioned, formatted, and mounted partitions on /mnt
# 2) Network is functional
# 3) Arguments passed to the script are valid pacman targets
# 4) A valid mirror appears in /etc/pacman.d/mirrorlist
shopt -s extglob
out() { printf "$1 $2\n" "${@:3}"; }
error() { out "==> ERROR:" "$@"; } >&2
msg() { out "==>" "$@"; }
msg2() { out " ->" "$@";}
die() { error "$@"; exit 1; }
in_array() {
local i
for i in "${@:2}"; do
[[ $1 = "$i" ]] && return
done
track_mount() {
mount "$@" && CHROOT_ACTIVE_MOUNTS=("$2" "${CHROOT_ACTIVE_MOUNTS[@]}")
api_fs_mount() {
CHROOT_ACTIVE_MOUNTS=()
{ mountpoint -q "$1" || track_mount "$1" "$1" --bind; } &&
track_mount proc "$1/proc" -t proc -o nosuid,noexec,nodev &&
track_mount sys "$1/sys" -t sysfs -o nosuid,noexec,nodev &&
track_mount udev "$1/dev" -t devtmpfs -o mode=0755,nosuid &&
track_mount devpts "$1/dev/pts" -t devpts -o mode=0620,gid=5,nosuid,noexec &&
track_mount shm "$1/dev/shm" -t tmpfs -o mode=1777,nosuid,nodev &&
track_mount run "$1/run" -t tmpfs -o nosuid,nodev,mode=0755 &&
track_mount tmp "$1/tmp" -t tmpfs -o mode=1777,strictatime,nodev,nosuid
api_fs_umount() {
umount "${CHROOT_ACTIVE_MOUNTS[@]}"
valid_number_of_base() {
local base=$1 len=${#2} i=
for (( i = 0; i < len; i++ )); do
(( (${2:i:1} & ~(base - 1)) == 0 )) || return
done
mangle() {
local i= chr= out=
unset {a..f} {A..F}
for (( i = 0; i < ${#1}; i++ )); do
chr=${1:i:1}
case $chr in
[[:space:]\\])
printf -v chr '%03o' "'$chr"
out+=\\
# fallthrough
out+=$chr
esac
done
printf '%s' "$out"
unmangle() {
local i= chr= out= len=$(( ${#1} - 4 ))
unset {a..f} {A..F}
for (( i = 0; i < len; i++ )); do
chr=${1:i:1}
case $chr in
if valid_number_of_base 8 "${1:i+1:3}" ||
valid_number_of_base 16 "${1:i+1:3}"; then
printf -v chr '%b' "${1:i:4}"
(( i += 3 ))
fi
# fallthrough
out+=$chr
esac
done
printf '%s' "$out${1:i}"
dm_name_for_devnode() {
read dm_name <"/sys/class/block/${1#/dev/}/dm/name"
if [[ $dm_name ]]; then
printf '/dev/mapper/%s' "$dm_name"
else
# don't leave the caller hanging, just print the original name
# along with the failure.
print '%s' "$1"
error 'Failed to resolve device mapper name for: %s' "$1"
fi
fstype_is_pseudofs() {
# list taken from util-linux source: libmount/src/utils.c
local -A pseudofs_types=([anon_inodefs]=1
[autofs]=1
[bdev]=1
[binfmt_misc]=1
[cgroup]=1
[configfs]=1
[cpuset]=1
[debugfs]=1
[devfs]=1
[devpts]=1
[devtmpfs]=1
[dlmfs]=1
[fuse.gvfs-fuse-daemon]=1
[fusectl]=1
[hugetlbfs]=1
[mqueue]=1
[nfsd]=1
[none]=1
[pipefs]=1
[proc]=1
[pstore]=1
[ramfs]=1
[rootfs]=1
[rpc_pipefs]=1
[securityfs]=1
[sockfs]=1
[spufs]=1
[sysfs]=1
[tmpfs]=1)
(( pseudofs_types["$1"] ))
newroot=/mnt
hostcache=0
copykeyring=1
copymirrorlist=1
offline=0
usage() {
cat <<EOF
usage: ${0##*/} [options] root [packages...]
Options:
-C config Use an alternate config file for pacman
-c Use the package cache on the host, rather than the target
-d Allow installation to a non-mountpoint directory
-G Avoid copying the host's pacman keyring to the target
-i Avoid auto-confirmation of package selections
-M Avoid copying the host's mirrorlist to the target
-o Do not update the pacman cache for offline installation
-h Print this help message
pacstrap installs packages to the specified new root directory. If no packages
are given, pacstrap defaults to the "base" group.
EOF
if [[ -z $1 || $1 = @(-h|--help) ]]; then
usage
exit $(( $# ? 0 : 1 ))
fi
(( EUID == 0 )) || die 'This script must be run with root privileges'
while getopts ':C:cdGiMo' flag; do
case $flag in
C)
pacman_config=$OPTARG
d)
directory=1
c)
hostcache=1
i)
interactive=1
G)
copykeyring=0
M)
copymirrorlist=0
o)
offline=1
die '%s: option requires an argument -- '\''%s'\' "${0##*/}" "$OPTARG"
die '%s: invalid option -- '\''%s'\' "${0##*/}" "$OPTARG"
esac
done
shift $(( OPTIND - 1 ))
(( $# )) || die "No root directory specified"
newroot=$1; shift
pacman_args=("${@:-base}")
if (( ! hostcache )); then
pacman_args+=(--cachedir="$newroot/var/cache/pacman/pkg")
fi
if (( ! interactive )); then
pacman_args+=(--noconfirm)
fi
if (( ! offline )); then
pacman_args+=(-y)
fi
if [[ $pacman_config ]]; then
pacman_args+=(--config="$pacman_config")
fi
[[ -d $newroot ]] || die "%s is not a directory" "$newroot"
if ! mountpoint -q "$newroot" && (( ! directory )); then
die '%s is not a mountpoint!' "$newroot"
fi
# create obligatory directories
msg 'Creating install root at %s' "$newroot"
mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc}
mkdir -m 1777 -p "$newroot"/tmp
mkdir -m 0555 -p "$newroot"/{sys,proc}
# always call umount on quit after this point
trap 'api_fs_umount "$newroot" 2>/dev/null' EXIT
# mount API filesystems
api_fs_mount "$newroot" || die "failed to setup API filesystems in new root"
msg 'Installing packages to %s' "$newroot"
if ! pacman -r "$newroot" -S "${pacman_args[@]}"; then
die 'Failed to install packages to new root'
fi
if (( copykeyring )); then
# if there's a keyring on the host, copy it into the new root, unless it exists already
if [[ -d /etc/pacman.d/gnupg && ! -d $newroot/etc/pacman.d/gnupg ]]; then
cp -a /etc/pacman.d/gnupg "$newroot/etc/pacman.d/"
fi
fi
if (( copymirrorlist )); then
# install the host's mirrorlist onto the new root
cp -a /etc/pacman.d/mirrorlist "$newroot/etc/pacman.d/"
fi
# vim: et ts=2 sw=2 ft=sh:

Similar Messages

  • Can I install Arch Linux without Internet connection ?

    It sounds noobish but my friends like to know if they can install Arch Linux without Internet connection ?

    mcmillan wrote:
    The core iso should be all you need, just boot off that to start the installation. It's been a while since I did an install, but somewhere along the way it gives you an option to install off the cd or do a net install. You just need to choose the cd installation.
    That being said, all you'll have without internet will be what's on the cd, so you'll be left with a pretty minimal install. If you want to update and install additional software then you'll either need to get the computer temporarily  connected, or download the packages on a different computer and transfer them.
    I am looking to do something similar. I have the core system installed on an older laptop, but I cannot get the wireless working (it has no ethernet). I've tried downloading the libgl packagesfrom a mirror to a thumbdrive, but it's a dependency nightmare. Is there a better way to do this?

  • Installing Arch on PC without Internet Connection/Slow Connection

    Arch Linux requires a fairly good internet connection to set up. How can one install it on machines which don't have any internet connectivity? Is there any way to make a DVD of Arch on a computer connected to internet and having Arch setup(DE,Media Players,Codecs etc) which can then be used on machines without internet connections This would come useful for me to install at my friends place. Does anyone even has a remote solution on this?

    https://wiki.archlinux.org/index.php/Of … f_Packages
    https://wiki.archlinux.org/index.php/Lo … ory_HOW-TO
    and, of course:
    https://wiki.archlinux.org/index.php/Beginners%27_Guide
    You could also install on a computer with a connection, then use something like Clonezilla to deploy it.

  • [SOLVED] Installing Windows XP after Arch Linux

    I'm not sure at all where to post this, so I've decided to do it here since I have the problem on a laptop... Please move if it should be somewhere else.
    I installed Arch Linux on my new laptop a month ago or so, and am very pleased to have found the very kind of distro I've been looking for. However, I'm having trouble with my graphics (either wine doesn't support it, or the drivers don't have 2D/3D acceleration), and now I want to install Windows XP next to Arch Linux.
    Using a GParted LiveCD, I've repartitioned the harddrive as such: Unpartitioned Space (27GB), Linux (197GB), SWAP (5GB).
    I've also removed the bootable flag from the Linux partition, just to be sure. However, when I try to install Windows XP, it gets stuck after unpacking a bunch of drivers, giving me a bluescreen that tells me to make sure the hardware isn't broken, check my harddrive with CHKDSK /F, or look for viruses. Ofcourse I know none of these are true, since I'm running Arch Linux just fine.
    A friend suggested that maybe my hardware isn't supported by Windows XP, which sounds like the most reasonable explanation so far, but I can't find a list of supported hardware. The M$ homepage basicly says
    "Pentium 233-megahertz (MHz) processor or faster (300 MHz is recommended)"
    for CPU, which doesn't help me at all.
    My hardware is:
    Processor: Intel Celeron 2.2 Ghz
    Memory: 2GB DDR2
    Graphics: Intel 4500MHD
    And the laptop is called an "eMachines E525", though that doesn't say much since there are very, very many called this.
    Can anyone give me any hints as to what I might be doing wrong?
    Last edited by Noxic (2010-05-29 18:44:32)

    Sounds like something I'll want to do. Where did you download the drivers? Do I have to follow some guide? Thanks for the tip
    EDIT:
    Indeed I will want to install AHCI drivers, otherwise Arch Linux fails to boot quite badly. There is also a problem preventing me from booting when I'm using AHCI though;
    At boot, Arch Linux checks /dev/sda1 (NTFS) for errors, and expects to check an ext2 filesystem. Obviously, however, /dev/sda1 is an NTFS filesystem.
    Since it tries to read the NTFS partition as an ext2 filesystem, it panics. Arch Linux then prompts me for the root password (or Ctrl+D to reboot), but I've disabled root login and can therefore do nothing at this point.
    I have a GParted livecd and the Arch Linux livecd, so editing files on any of the filesystem isn't a problem at all, but I don't know what to do at this point. Help?
    Last edited by Noxic (2010-05-29 12:40:33)

  • Failing to install Domain Services on a Windows 2012R2 without internet connection

    Hello
    i have a windows 2012r2 server without internet connection.
    when i try to add the Domain Services role it failed in the Feature installation phase
    i even tried to provide an alternate location from a ISO source but that didn't help either 
    im lost here what should i do?
    i attached the fail screenshot
    Thanks 
    Guy

    What error is shown in Event Viewer when the install fails?
    Is it the first 2012 R2 DC in a lower level domain?
    Try installing ADDS via PowerShell:
    Import-Module ServerManager
    Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools
    The other thing that it could be is an issue with the WID (Windows Internal Database)
    Check in the Event Viewer for anything to do with Service: MSSQL$MICROSOFT##WID and perhaps try this:
    Adjust your domain (or domain controller if appropriate) security policy to allow “NT SERVICE\MSSQL$MICROSOFT##WID” to log on as a service, a GPO setting that can be found under Computer Configuration > Policies > Windows Settings > Security Settings
    > Local Policies > User Rights Assignment.
    Kind Regards
    Michael Coutanche
    Blog:   
    Twitter:   LinkedIn:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • If I download Mountain Lion on my MBP , can I use the same installer file on a different computer and continue the installation without Internet connectivity?

    Hi Folks,
    I have just downloaded Mountain lion on my  Macbook Pro(haven't installed it yet) . My question is, can I copy the same downloaded Mountain Lion from the Applications on to an external hard drive and use the same on a different computer? I am having problems with internet connectivity right now, it would be amazing if it can be installed on the iMac without internet connection.
    So is that doable?
    Thanks in advance

    And the 2nd installation would not require internet connectivity? Except , of course during the set up and the configuration of iCloud and location based services, which I can skip at the time

  • I am unable to open my html files saved from mozilla firefox without internet connection...........each time it shows the error message as follows:-

    I have saved some internet pages from mozilla firefox as html pages in F:/ drive....i am using windows7...whenever i open these files without internet connection....then it opens only for a short time and suddenly crashes by displaying the message like that:-
    File not found
    Firefox can't find the file at jar:file:///C:/Program Files (x86)/Mozilla Firefox/omni.ja!/chrome/browser/content/browser/undefinedgoogleads.g.doubleclick.netpagead/ads?client=ca-pub-7133395778201029&format=468x60_as&output=html&h=60&w=468&lmt=1346242109&ad_type=image&flash=11.3.300&url=file:///F:/UJJWAL/C%20TUTORIAL/c_arrays.htm&dt=1346323041583&bpp=19&shv=r20120815&jsv=r20110914&correlator=1346323042092&frm=20&adk=4203423324&ga_vid=377128990.1346323043&ga_sid=1346323043&ga_hid=232002736&ga_fc=0&u_tz=330&u_his=1&u_java=0&u_h=768&u_w=1366&u_ah=728&u_aw=1366&u_cd=24&u_nplug=11&u_nmime=30&dff=helvetica&dfs=12&adx=457&ady=211&biw=1349&bih=664&oid=3&fu=0&ifi=1&dtd=952&xpc=R193iApDeg&p=file://.
    Check the file name for capitalization or other typing errors.
    Check to see if the file was moved, renamed or deleted.
    can anyone fix my problem please?

    What extensions do you have installed? To get a full list, do the following:
    In order to be able to find the correct solution to your problem, we require some more non-personal information from you. Please do the following:
    *Click the Firefox button at the top left, then click the ''Help'' menu and select ''Troubleshooting information'' from the submenu. If you don't have a Firefox button, click the Help menu at the top and select ''Troubleshooting information'' from the menu.
    Now, a new tab containing your troubleshooting information should open.
    *At the top of the page, you should see a button that says "Copy all to clipboard''. Click it.
    *Now, go back to your forum post and click inside the reply box. Press Ctrl+V to paste all the information you copied into the forum post.
    If you need further information about the Troubleshooting information page, please read the article [[Using the Troubleshooting Information page]].
    Thanks in advance for your help!

  • Labwiew 8 won't start without internet connection

    I have Labview 8.0 installed on a NI PXI-1050 chasis with Windows XP and Service Pack 2 installed.  The problem is that Labview will not load up (it locks up at finishing initialization) if I do not have the chasis connected to the internet via ethernet connection.  When I connect to the internet and reboot the computer, Labview is able to start fine.  The chasis is installed in a mobile vechicle and cannot always be connected to the internet.  I've read that Labview 8 needs to connect to the internet to make sure the copy it is running is legitimate?  Is this copy protection messing me up?  Is there a way to run Labview 8 without internet connection?
    Thanks.

    biqbal wrote:
    I've read that Labview 8 needs to connect to the internet to make sure the copy it is running is legitimate? 
    Where did you read this? There's an initial activation that you do when you first install LabVIEW. but there's no "phone home" each time you launch LabVIEW. I can start up LabVIEW without an internet connection.
    More than likely what's causing it are services that run and/or MAX. Software firewalls installed on a computer can block this communication even it's happening on a loopback, but you said that the problem goes away once you connect to the internet, so it's likely not a firewall issue. Is the PXI chassis normally connected directly to the internet through a modem, or is it connected to a router (when it's connected)? Are you using a static IP address on your PXI chassis?

  • Reinstall mavericks without internet connection

    hello , i have a MacBook Pro 13 , and i want to reinstall my mavericks but i search on the internet and i see that it download it and install it aftert it format the hardisk and begin to install the mavericks . the problem is that i don't have fast connection and maybe the electric turn of in sometimes . i afred that my connection lost in the installing proceser ,  i need a way that i can install the mavricks without internet connection . ,

    You need to be connected to the internet or a WiFi, which will then connect, so you can download the installer:OS X Mavericks: Reinstall OS X

  • EHP installation without internet connection

    Hello, we are going to install EHP4 on our SAP ERP system.
    But all our SAP systems (including SAP Solution Manager especially) are in closed network area and have not internet connection. As a result we cannot use SAP Maintain Optimizer to calculate and prepare installation sofware stack for SAPEHPI procedure.
    Can we prepare this installation software stack file manually?
    Can we install EHP4 without internet connection at all?

    Hi, thank you for answer, Sunny.
    But it's not very good news
    May be I can use xml-stack file from other sap erp system which has the same version and patch level?
    Theoretically I can just do some correcting (i.e. change system attributes) in this file and then put it for SAPEHPI tool. Is it possible?

  • How to simulate server 2012+clients connetion in virtualbox without internet connection

    Hi, I am new to this forum and also not familiar with simulation in virtualbox. I want to know how to simulate server 2012+clients connection in virtualbox without internet connection. I couldn't join the client computer (windows 7 installed) to
    the domain (the  windows server 2012). I already added the DHCP , AD DS and DNS roles features in the windows server 2012. Can someone put me through?

    If you're using VirtualBox you might be better off asking this over on their forum
    https://forums.virtualbox.org/, since it's not a Microsoft product. That said I have used it myself, and I think what you need is to ensure you're using the Internal Networking option
    http://www.virtualbox.org/manual/ch06.html#network_internal and make sure that both virtual machines have their network card setup with the same name / network ID. Once that's done you
    can configure them on the same network range and they should be able to communicate.

  • Do I need to be online to use creative cloud? I want to use it in the field without internet connection.

    Do I need to be online to use creative cloud? I want to use it in the field without internet connection.

    Creative Cloud Help | Creative Cloud / Common Questions
    Do I need to be online to access my desktop apps?
    No, the desktop applications in Creative Cloud, such as Photoshop and Illustrator, are installed directly on your computer, so you don’t need an ongoing Internet connection to use them.
    An Internet connection is required the first time you install and license your apps, but you can use the apps in offline mode with a valid software license. The desktop apps will attempt to validate your software licenses every 30 days.
    Annual members can use the apps for up to 99 days in offline mode. Month-to-month members can use the software for up to 30 days in offline mode.

  • Can Tour de Flex run without internet connection

    Hi
    I have installed TourDeFlex.air, but unfortunately it requires internet connection to browse the components.
    Do you know if it is possible to run Tour de Flex without internet connection?

    From an earlier post by Nicolas Mertens:
    "here's what I got from Customer Services about this problem:
    [Help] files are located in the following location:
    C:/Program Files/Common Files/Adobe/Help/en_us/InDesign/6.0. Also
    from that location, you can launch the file 'index.html' and this
    should direct you to *the online help that you would access through
    the program itself.*"
    I found that the files are not at that location, but at C:/Program
    Files/Common Files/Adobe/Help/en_GB/InDesign/6.0 (this is in Windows
    Vista, by the way). "
    Yours would presumably be at [the German equivalent of
    ..]/de-DE/InDesign6.0, or whatever your locale is (AT, CH...)
    Noel

  • Connect time capsule via ethernet to Mac for back-up only. Is it possible without internet connection ?

    Connect time capsule via ethernet to Mac for back-up only. Is it possible without internet connection ?

    Hi Bob,
    I'm not certain the post I sent was posted correctly, as I added it as a reply to a 3-year old thread. Since this is a recently-active thread, though not specific to the issue at hand, I thought I'd post again:
    Three years ago you helped me set up a roaming wireless network in my home. It's been rock-steady and I'm forever grateful to you for the time and guidance you gave me. I'd now like to swap out my AirPort Extreme base station for a time capsule. As I understand it, I should be able to unplug the base station and replace it with the TC without problem, so long as I use all the same settings on my TC... network name, security protocol, password, etc. Given the complexity of my network, I thought I should check with you first for any advice you might have. I don't want to set up a new network or make any changes to the existing one-- with the exception of using the TC in place of the AE. I'm already using Time Machine for backups. As a refresher, my current setup has the AE as base station and 3 expresses hard-wired with Ethernet connections elsewhere in my home. I have a 4th express set up wirelessly to use with my stereo system at the front of the house. All AXs are 'n's and are set up, as per your instructions, in Bridge mode to extend the existing network. I'm running the most updated version of Mavericks on my MBPro. Any suggestions you might have will be, as always, very much appreciated! Sincerely, Phyllis Sommers

  • Create local wifi network on OS X without internet connection

    Hi,
    is there anyway to create a local wifi network without internet connection to play multiplayer games like call of duty on macbook pro ?

    Is it safe to assume that you are connecting your MBP to a wireless router already?
    If you are then all the other LAN machines should also connect to that same router even if internet access is turned off.
    LAN parties are fun and they require the computers to have certain port setups for certain games.
    It is possible, though I don't play COD (I'm a Battlefield man) and I can't help with the details of COD.
    When my son has his friends over we  use a wired hub setup and we  make the laptop guys use the wired connection - it's  more stable. I admit that we always use the internet. The last LAN party we had without the internet was a Battlefield 1942 setup with one computer hosting the local server (and that was years ago.)

Maybe you are looking for