You are not logged in.
Hi!
I needed to install an Arch Linux environment on a Debian server, so I searched the wiki and found this page:
http://wiki.archlinux.org/index.php/Archbootstrap
Unfortunately, the script is outdated. So I wrote a new one:
http://tokland.googlecode.com/svn/trunk … otstrap.sh
(tested only on Debian Lenny)
$ sudo bash arch-bootstrap.sh myarch i686
Now, my questions:
1) is there another script that performs this task better?
2) if not, can you please give some feedback so as to update the wiki with (a -hopefully- more polished version of) this script?
Last edited by tokland (2010-02-09 21:27:31)
Offline
You can use pacman to install Arch from an existing Linux distro:
http://wiki.archlinux.org/index.php/Ins … ting_Linux
EDIT:
The script works well in Ubuntu Lucid Lynx, but it should download the packages in /tmp and/or delete them after the install.
Last edited by sisco311 (2010-02-10 21:28:46)
don't drink unwashed fruit juice.
i never make predictions, especially about the future.
Offline
You can use pacman to install Arch from an existing Linux distro:
http://wiki.archlinux.org/index.php/Ins … ting_Linux
I am aware of this statically compiled pacman, but I have some concerns... will it always be there? why other mirrors do not include this package?
Last edited by tokland (2010-02-22 23:05:19)
Offline
sisco311 wrote:You can use pacman to install Arch from an existing Linux distro:
http://wiki.archlinux.org/index.php/Ins … ting_LinuxI am aware of this statically compiled pacman, but I have some concerns... will be always be there? why other mirrors do not include this file?
If you install pacman, pacman-mirror & libfetch it should work without pacman-static, at least it worked for me in Ubuntu Karmic & Lucid.
Of course, it's much easier to use your script, great job. I will use it (with some customizations) in the future.
Last edited by sisco311 (2010-02-10 21:53:39)
don't drink unwashed fruit juice.
i never make predictions, especially about the future.
Offline
If you install pacman, pacman-mirror & libfetch it should work without pacman-static, at least it worked for me in Ubuntu Karmic & Lucid.
Really? I tried to narrow down the package list, but pacman wouldn't run if any of them was removed.
I'll update the wiki with the script. You can reports bugs/suggestions here:
Offline
Hi,
I'm working on a script.
It's working with pacman-static.
pacman, in version 3.3.0, introduce xz archive format support and now, some packages use this format (mkinitcpio-0.6.3-1-any.pkg.tar.xz)
So, my script is endding with pacman-static error (unrecognized archive format) !
Where can I find the 3.3.0 (or more) pacman-static ?
Here's the script (it's a first step...) :
#!/bin/bash
# install an Arch in the specified location (debbootstrap like)
# work over pacman-static
# must run on GNU/Linux systems
# http://wiki.archlinux.org/index.php/Install_from_Existing_Linux
# http://wiki.archlinux.fr/install/chroot?DokuWiki=153b0c6847435682de50a6061e6f75a4
[ "${1}" ] || { echo "usage: $( basename $0 ) chrootdir [packages]" >/dev/stderr && exit 1; }
B='\033[29;1m'
b='\033[0m'
# load variables defined in configuration file
echo -e "${B}load configuration file...${b}"
. /usr/local/etc/$( basename $0 ).conf || exit $?
# test packages cache
echo -e "${B}test packages cache...${b}"
[ "${abs_cache}" ] || abs_cache=/var/cache/pacman/pkg
[ -d "${abs_cache}" ] || { mkdir -vp ${abs_cache} || exit $?; }
touch ${abs_cache}/$( basename $0 ) && rm ${abs_cache}/$( basename $0 ) || exit $?
# make minimal chroot for pacman
echo -e "${B}make minimal chroot...${b}"
abs_chroot=${1}
mkdir -v ${abs_chroot} || exit $?
mkdir -vp ${abs_chroot}/etc/pacman.d
mkdir -vm 1777 ${abs_chroot}/tmp
mkdir -vp ${abs_chroot}/usr/bin
mkdir -vp ${abs_chroot}/var/lib/pacman
# install pacman.static in chroot
abs_static_package=$( find ${abs_cache} | grep pacman-static )
if [ ! "${abs_static_package}" ]
then
# download it
echo -e "${B}download pacman...${b}"
[ "${abs_static_host}" ] || abs_static_host="http://repo.archlinux.fr/i686"
abs_static_package=$( curl -sSL ${abs_static_host} | egrep -io 'href="pacman-static[^"]+\.pkg\.tar\.gz"' | awk -F '"' '{print $2}' )
[ "${abs_static_package}" ] && abs_static_package=${abs_cache}/${abs_static_package} || exit $?
curl --progress-bar ${abs_static_host}/${abs_static_package} > ${abs_static_package} || exit $?
fi
echo -e "${B}install pacman...${b}"
mkdir -p ${abs_chroot}/tmp/pacman
tar vxzf ${abs_static_package} -C ${abs_chroot}/tmp/pacman || exit $?
cp -v ${abs_chroot}/tmp/pacman/usr/bin/pacman.static ${abs_chroot}/usr/bin/
rm -vrf ${abs_chroot}/tmp/pacman
# install pacman configuration in chroot
echo -e "${B}configure pacman...${b}"
[ "${abs_repository}" ] || abs_repository='http://mirrors.kernel.org/archlinux/$repo/os/i686'
abs_pacman_conf=${abs_chroot}/tmp/pacman.conf
echo "
[core]
Server = ${abs_repository}
[extra]
Server = ${abs_repository}
[community]
Server = ${abs_repository}
" > ${abs_pacman_conf}
# install the core
echo -e "${B}install the core...${b}"
${abs_chroot}/usr/bin/pacman.static \
--sync \
--refresh \
--root ${abs_chroot} \
--cachedir ${abs_cache} \
--config ${abs_pacman_conf} \
--logfile /dev/null \
--verbose \
--noprogressbar \
base || exit $?
Offline
Lacsap - please use forum code tags when posting scripts. As you're new here, I'll fix it for you this time.
Offline
Hi,
Thanks for changes and ok for next time.
Offline
In the script above replace
[ "${abs_static_package}" ] && abs_static_package=${abs_cache}/${abs_static_package} || exit $?
curl --progress-bar ${abs_static_host}/${abs_static_package} > ${abs_static_package} || exit $?
by
[ "${abs_static_package}" ] || exit $?
curl --progress-bar ${abs_static_host}/${abs_static_package} > ${abs_cache}/${abs_static_package} || exit $?
abs_static_package=${abs_cache}/${abs_static_package}
Offline
The script works well in Ubuntu Lucid Lynx, but it should download the packages in /tmp and/or delete them after the install
Last version of the script downloads packages to a directory (arch-bootstrap-packages/). I prefer not to delete the files so you can move the script along with the .tar.gz to another machine and still run it off-line (that's why the optional argument CORE_OS_INDEX exists).
In the script above replace [...]
Lacsap, I think the best option is that you:
1) Upload your script somewhere.
2) Update the wiki with a link to your code.
3) Delete my code from the wiki page, just keeping the description and links.
That way we can keep a clean page in the wiki.
Offline
The script called [wiki]Genesis[/wiki] is in the wiki.
Why delete your code ?
Offline
The script called [wiki]Genesis[/wiki] is in the wiki.
Why delete your code ?
Well, I didn't mean to delete all my work but to remove the code box, keeping just the description and the link (and adding also yours). Maintaining code in a wiki is cumbersome, it's better to link to a repository.
It seemed logical to share wiki page since our scripts have the same goal.
Offline
Copy pasting a script from wiki is absurd; why don;t try it yourself
Please post it to the AUR as a PKGBUILD; so that the user's of ArchLinux or other distributions may get the script and, or example config from Files
Balwinder S Dheeman
http://werc.homelinux.net/
Offline
Yes it is...
The code is now versionned here http://bitbucket.org/patatetom/genesis/
Offline
Hi,
i wrote this little script to get pacman on debian. maybe it helps
talk & update there:
http://bbs.archlinux.org/viewtopic.php? … 36#p734336
Last edited by Lucky (2010-06-01 16:45:56)
Offline
once you have a static pacman [and maybe mkinitcpio, not sure] you could just run aif on the debian or whatever system. as long as it has the other dependencies (grub1, bash, grep, coreutils etc) but that should be no problem. aif is just a script. you can do an interactive or automatic installation or whatever, just make sure to pick the correct blockdevice(s)
there's also the mkarchroot script (in the package devtools, I think). I'm not sure which deps it has but I would guess it's a similar story as aif.
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline