[arch-dev-public] Bootstrap images for installing Arch from another system
So, I heard a few people struggled installing Arch from another distro or from a root server rescue system recently. The requirements for pacman and friends are numerous and most systems don't have recent enough libraries to easily meet them. Setting up Arch on a root server should be as easy as this: * Boot rescue system, make sure you have Linux 2.6.32 or later * Download tarball from Arch, extract to /tmp/root.x86_64/ * Set up partitions and such, mount to /tmp/root.x86_64/mnt/ * chroot /tmp/root.x86_64/ (well, also some bind-mounts) * pacman-key --populate archlinux * pacstrap /mnt base and follow the installation guide I'd like to generate such tarballs regularly (monthly like our ISOs?) and put them on our mirrors, unless there are objections. I took the liberty of writing a small script: https://paste.xinu.at/ixbqt/ These are the resulting files: total 143M -rw-r--r-- 1 root root 71M 22. Jun 17:13 archlinux-bootstrap-2013.06.22-i686.tar.gz -rw-r--r-- 1 root root 73M 22. Jun 17:15 archlinux-bootstrap-2013.06.22-x86_64.tar.gz Note that they are only gzipped, because we can rely on tar and gzip being widely available. Any comments?
On 06/22/2013 12:33 PM, Thomas Bächler wrote:
So, I heard a few people struggled installing Arch from another distro or from a root server rescue system recently. The requirements for pacman and friends are numerous and most systems don't have recent enough libraries to easily meet them.
Setting up Arch on a root server should be as easy as this: * Boot rescue system, make sure you have Linux 2.6.32 or later * Download tarball from Arch, extract to /tmp/root.x86_64/ * Set up partitions and such, mount to /tmp/root.x86_64/mnt/ * chroot /tmp/root.x86_64/ (well, also some bind-mounts) * pacman-key --populate archlinux * pacstrap /mnt base and follow the installation guide
I'd like to generate such tarballs regularly (monthly like our ISOs?) and put them on our mirrors, unless there are objections.
I took the liberty of writing a small script: https://paste.xinu.at/ixbqt/
These are the resulting files:
total 143M -rw-r--r-- 1 root root 71M 22. Jun 17:13 archlinux-bootstrap-2013.06.22-i686.tar.gz -rw-r--r-- 1 root root 73M 22. Jun 17:15 archlinux-bootstrap-2013.06.22-x86_64.tar.gz
Note that they are only gzipped, because we can rely on tar and gzip being widely available.
Any comments?
Good, I suggest to use "Architecture = auto" and use "setarch ${arch} pacstrap...". In this way, scriptlets will be executed in the right architecture ;) Have a nice day. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Am 22.06.2013 18:00, schrieb Gerardo Exequiel Pozzi:
On 06/22/2013 12:33 PM, Thomas Bächler wrote:
So, I heard a few people struggled installing Arch from another distro or from a root server rescue system recently. The requirements for pacman and friends are numerous and most systems don't have recent enough libraries to easily meet them.
Setting up Arch on a root server should be as easy as this: * Boot rescue system, make sure you have Linux 2.6.32 or later * Download tarball from Arch, extract to /tmp/root.x86_64/ * Set up partitions and such, mount to /tmp/root.x86_64/mnt/ * chroot /tmp/root.x86_64/ (well, also some bind-mounts) * pacman-key --populate archlinux * pacstrap /mnt base and follow the installation guide
I'd like to generate such tarballs regularly (monthly like our ISOs?) and put them on our mirrors, unless there are objections.
I took the liberty of writing a small script: https://paste.xinu.at/ixbqt/
These are the resulting files:
total 143M -rw-r--r-- 1 root root 71M 22. Jun 17:13 archlinux-bootstrap-2013.06.22-i686.tar.gz -rw-r--r-- 1 root root 73M 22. Jun 17:15 archlinux-bootstrap-2013.06.22-x86_64.tar.gz
Note that they are only gzipped, because we can rely on tar and gzip being widely available.
Any comments?
Good,
I suggest to use "Architecture = auto" and use "setarch ${arch} pacstrap...". In this way, scriptlets will be executed in the right architecture ;)
Seem reasonable - are there any known failures with the wrong architecture set?
On 06/22/2013 01:02 PM, Thomas Bächler wrote:
Am 22.06.2013 18:00, schrieb Gerardo Exequiel Pozzi:
On 06/22/2013 12:33 PM, Thomas Bächler wrote:
So, I heard a few people struggled installing Arch from another distro or from a root server rescue system recently. The requirements for pacman and friends are numerous and most systems don't have recent enough libraries to easily meet them.
Setting up Arch on a root server should be as easy as this: * Boot rescue system, make sure you have Linux 2.6.32 or later * Download tarball from Arch, extract to /tmp/root.x86_64/ * Set up partitions and such, mount to /tmp/root.x86_64/mnt/ * chroot /tmp/root.x86_64/ (well, also some bind-mounts) * pacman-key --populate archlinux * pacstrap /mnt base and follow the installation guide
I'd like to generate such tarballs regularly (monthly like our ISOs?) and put them on our mirrors, unless there are objections.
I took the liberty of writing a small script: https://paste.xinu.at/ixbqt/
These are the resulting files:
total 143M -rw-r--r-- 1 root root 71M 22. Jun 17:13 archlinux-bootstrap-2013.06.22-i686.tar.gz -rw-r--r-- 1 root root 73M 22. Jun 17:15 archlinux-bootstrap-2013.06.22-x86_64.tar.gz
Note that they are only gzipped, because we can rely on tar and gzip being widely available.
Any comments?
Good,
I suggest to use "Architecture = auto" and use "setarch ${arch} pacstrap...". In this way, scriptlets will be executed in the right architecture ;)
Seem reasonable - are there any known failures with the wrong architecture set?
No, just in case ;) -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Am 22.06.2013 17:33, schrieb Thomas Bächler:
Setting up Arch on a root server should be as easy as this: * Boot rescue system, make sure you have Linux 2.6.32 or later * Download tarball from Arch, extract to /tmp/root.x86_64/ * Set up partitions and such, mount to /tmp/root.x86_64/mnt/ * chroot /tmp/root.x86_64/ (well, also some bind-mounts) * pacman-key --populate archlinux * pacstrap /mnt base and follow the installation guide
I'd like to generate such tarballs regularly (monthly like our ISOs?) and put them on our mirrors, unless there are objections.
Good idea. I had something like this in mind for some time; I did not think of putting only pacstrap and deps into the tar though. I wonder if you could use arch-chroot isntead of just chroot here. You can also use the pacman.conf from the releng scripts. And to be safe you should prefix pacstrap with a setarch call. I'd say we include this script into the releng scripts (either archiso or create a nwe package; atm I use some additional script for releasing an ISO image) and upload such a tar at the same time as the ISO image. Greetings, Pierre -- Pierre Schmitz, https://pierre-schmitz.com
Am 22.06.2013 20:10, schrieb Pierre Schmitz:
Am 22.06.2013 17:33, schrieb Thomas Bächler:
Setting up Arch on a root server should be as easy as this: * Boot rescue system, make sure you have Linux 2.6.32 or later * Download tarball from Arch, extract to /tmp/root.x86_64/ * Set up partitions and such, mount to /tmp/root.x86_64/mnt/ * chroot /tmp/root.x86_64/ (well, also some bind-mounts) * pacman-key --populate archlinux * pacstrap /mnt base and follow the installation guide
I'd like to generate such tarballs regularly (monthly like our ISOs?) and put them on our mirrors, unless there are objections.
Good idea. I had something like this in mind for some time; I did not think of putting only pacstrap and deps into the tar though.
I think I tested this once and it is sufficient. As a plus, it has all dependencies so you can use pacman to install more packages into the chroot.
I wonder if you could use arch-chroot isntead of just chroot here.
It requires bash 4 - if that's not installed on the host, arch-chroot will not work. I would rather provide instructions involving manual bind-mounting and chroot.
You can also use the pacman.conf from the releng scripts.
I pretty much used the default pacman.conf from our packages (also enabled Color, but that didn't do anything). Is the releng one different?
And to be safe you should prefix pacstrap with a setarch call.
Already done as per Gerardo's suggestion: https://paste.xinu.at/lNIrq/
I'd say we include this script into the releng scripts (either archiso or create a nwe package; atm I use some additional script for releasing an ISO image) and upload such a tar at the same time as the ISO image.
I was thinking about including this into arch-install-scripts, but I am unsure if it really fits in there.
On Jun 22, 2013 2:49 PM, "Thomas Bächler" <thomas@archlinux.org> wrote:
Am 22.06.2013 20:10, schrieb Pierre Schmitz:
Am 22.06.2013 17:33, schrieb Thomas Bächler:
Setting up Arch on a root server should be as easy as this: * Boot rescue system, make sure you have Linux 2.6.32 or later * Download tarball from Arch, extract to /tmp/root.x86_64/ * Set up partitions and such, mount to /tmp/root.x86_64/mnt/ * chroot /tmp/root.x86_64/ (well, also some bind-mounts) * pacman-key --populate archlinux * pacstrap /mnt base and follow the installation guide
I'd like to generate such tarballs regularly (monthly like our ISOs?) and put them on our mirrors, unless there are objections.
Good idea. I had something like this in mind for some time; I did not think of putting only pacstrap and deps into the tar though.
I think I tested this once and it is sufficient. As a plus, it has all dependencies so you can use pacman to install more packages into the
chroot.
I wonder if you could use arch-chroot isntead of just chroot here.
It requires bash 4 - if that's not installed on the host, arch-chroot will not work. I would rather provide instructions involving manual bind-mounting and chroot.
If you think its worthwhile to make the install scripts bash 3 compat I can look into doing this.
You can also use the pacman.conf from the releng scripts.
I pretty much used the default pacman.conf from our packages (also enabled Color, but that didn't do anything). Is the releng one different?
And to be safe you should prefix pacstrap with a setarch call.
Already done as per Gerardo's suggestion: https://paste.xinu.at/lNIrq/
I'd say we include this script into the releng scripts (either archiso or create a nwe package; atm I use some additional script for releasing an ISO image) and upload such a tar at the same time as the ISO image.
I was thinking about including this into arch-install-scripts, but I am unsure if it really fits in there.
Am 22.06.2013 20:55, schrieb Dave Reisner:
I wonder if you could use arch-chroot isntead of just chroot here.
It requires bash 4 - if that's not installed on the host, arch-chroot will not work. I would rather provide instructions involving manual bind-mounting and chroot.
If you think its worthwhile to make the install scripts bash 3 compat I can look into doing this.
Is it worthwhile? All we want is run arch-chroot to get into our bootstrap environment cleanly, so that is the only tool that would need adjustment. If we want to ensure compatibility here, I would make it #!/bin/sh compatible so it'll work everywhere. It would also need to deal with missing /run gracefully.
Am 22.06.2013 20:49, schrieb Thomas Bächler:
I wonder if you could use arch-chroot isntead of just chroot here.
It requires bash 4 - if that's not installed on the host, arch-chroot will not work. I would rather provide instructions involving manual bind-mounting and chroot.
Fair enough. It should not be too hard to make it work with bash 3 though. But maybe this is a good time to think about our minimum requirements. E.g. Debian 6 (oldstable) already has Bash 4 and it seems our glibc requires at least Linux 2.6.32. (it seems Debian 5 had 2.6.26 so that wont work anyway)
You can also use the pacman.conf from the releng scripts.
I pretty much used the default pacman.conf from our packages (also enabled Color, but that didn't do anything). Is the releng one different?
Not really; this would just reduce duplication and makes sure these tars and the iso iamges allways match.
I'd say we include this script into the releng scripts (either archiso or create a nwe package; atm I use some additional script for releasing an ISO image) and upload such a tar at the same time as the ISO image.
I was thinking about including this into arch-install-scripts, but I am unsure if it really fits in there.
Yes, seems difficult. As I said, I also have other scripts like creating torrents etc. that are used for a realease. Maybe we can create a releng repo/package for these. -- Pierre Schmitz, https://pierre-schmitz.com
Am 22.06.2013 21:19, schrieb Pierre Schmitz:
I'd say we include this script into the releng scripts (either archiso or create a nwe package; atm I use some additional script for releasing an ISO image) and upload such a tar at the same time as the ISO image.
I was thinking about including this into arch-install-scripts, but I am unsure if it really fits in there.
Yes, seems difficult. As I said, I also have other scripts like creating torrents etc. that are used for a realease. Maybe we can create a releng repo/package for these.
Regardless of where the scripts end up, should we publish these images with the July ISO? I can write a short README for it.
On 28.06.2013 20:02, Thomas Bächler wrote:
Regardless of where the scripts end up, should we publish these images with the July ISO? I can write a short README for it.
Sure, can't hurt.
Am 28.06.2013 20:02, schrieb Thomas Bächler:
Am 22.06.2013 21:19, schrieb Pierre Schmitz:
I'd say we include this script into the releng scripts (either archiso or create a nwe package; atm I use some additional script for releasing an ISO image) and upload such a tar at the same time as the ISO image.
I was thinking about including this into arch-install-scripts, but I am unsure if it really fits in there.
Yes, seems difficult. As I said, I also have other scripts like creating torrents etc. that are used for a realease. Maybe we can create a releng repo/package for these.
Regardless of where the scripts end up, should we publish these images with the July ISO? I can write a short README for it.
Script is here for the moment: https://github.com/brain0/genbootstrap
participants (5)
-
Dave Reisner
-
Florian Pritz
-
Gerardo Exequiel Pozzi
-
Pierre Schmitz
-
Thomas Bächler