Commit Graph

177 Commits

Author SHA1 Message Date
Dave Reisner
5897694194 genfstab: always upcase the requested tag
lowercase tags do not exist, so case shouldn't be a user-facing concern.
2012-11-11 23:45:49 -05:00
Dave Reisner
73016da72f genfstab: avoid re-printing kernel name
Without a specified tag, the devnode should not be printed.
2012-11-11 23:43:51 -05:00
Dave Reisner
e62b6bb560 genfstab: remove dead code
This shouldn't have been added with the previous patch.
2012-11-11 17:31:26 -05:00
Dave Reisner
1f03775f4f genfstab: allow identification by arbitrary tag
Add a -t option which accepts an arbitrary tag to lookup for source
device identification. If the lookup fails, fallback on the kernel
naming. With this change, -L and -U become synonyms for -t LABEL and
-t UUID, respectively.
2012-11-11 17:27:41 -05:00
Dave Reisner
3a7eb157d1 genfstab: provide DM names for swap
We're kind enough to provide DM names for non-swap devices, but simply
use the /dev/dm-X nodes for swap, since that's what /proc/swaps provides
us with. Resolve the DM name out of sysfs and use this instead.

Fixes FS#32609.
2012-11-11 17:04:14 -05:00
Dave Reisner
65b689bda9 genfstab: specify proper grammar in usage
bash getopts stops parsing options at the first non-option argument.
Rather than import some overblown option parser such as the one used in
makepkg or mkinitcpio, just correct the usage.

FS#31862.
2012-10-09 12:06:48 -04:00
Dave Reisner
298e04aabc prepare v8 2012-10-04 10:32:01 -04:00
Dave Reisner
ea41f437d2 pacstrap: add -C option for using an alternate config
I grappled with the inability of pacstrap to do this while trying to
setup an i686 chroot for myself based on a pacman config from devtools,
rather than my own config which bombs on a "missing" multilib repo.
2012-10-03 22:55:49 -04:00
Dave Reisner
4f3ef5bfa7 genfstab: ignore suspected bind mounts from the host 2012-10-03 22:46:39 -04:00
Dave Reisner
108735a148 genfstab: use findmnt FSROOT column
I added this for util-linux 2.22 so I could avoid parsing out the
subvolume from the target. Might as well make use of it.
2012-10-02 22:17:16 -04:00
Dave Reisner
e5790dd5e9 genfstab: fix invalid paths when run against / 2012-10-02 22:17:16 -04:00
Dave Reisner
dc2c7623e4 pacstrap: ignore ENOENT on already existing API dirs 2012-09-24 09:50:30 -04:00
Dave Reisner
7420e07285 prepare v7 release 2012-09-18 08:44:08 -04:00
Dave Reisner
b5880a3c72 Merge pull request #12 from techryda/patch-1
Create /var/log in $newroot
2012-09-17 18:30:43 -07:00
techryda
367e1fe12b Create /var/log in $newroot
Allows pacman.log to be created
2012-09-17 06:56:40 -06:00
Dave Reisner
3f4a9149a1 pacstrap: add options to inhibit copying settings
Add -G and -M which tells pacstrap to avoid copying pacman's gnupg.d
directory and mirrorlist, respectively, to the new root.
2012-09-15 11:46:48 -04:00
Dave Reisner
cc53a33bfd pacstrap: enforce permissions on root directories 2012-09-15 11:37:04 -04:00
Dave Reisner
debff1be89 arch-chroot: explain default behavior in usage 2012-09-08 15:29:38 -04:00
Dave Reisner
890ab2d2a3 use automake style AM_V_GEN rule for building 2012-09-07 16:32:39 -04:00
Dave Reisner
9888ce06e1 prepare v6 release 2012-09-06 09:56:51 -04:00
Dave Reisner
e16d57b2c2 arch-chroot: shift off first arg as chrootdir 2012-09-06 09:40:34 -04:00
Dave Reisner
09772d0f38 genfstab: use a more innocuous name than 'source' 2012-08-08 23:15:57 -04:00
Dave Reisner
c8b3d5e8d8 genfstab: handle btrfs subvolumes correctly 2012-08-08 23:12:27 -04:00
Dave Reisner
4c6dd31924 prepare v5 2012-08-03 19:59:27 -04:00
Pierre Schmitz
d571cb4ec4 arch-chroot: Default to /bin/bash as shell
By default chroot uses SHELL as default shell on the target if not specified otherwise.
As our install iso uses zsh this might fail if zsh is not installed on the target.

[dave: changed shell to /bin/sh]
2012-08-03 19:48:08 -04:00
Dave Reisner
71a4471d25 Revert "arch-chroot: default to /bin/sh when no command given"
This doesn't actually work since we don't shift off the chroot
directory.

This reverts commit 67c4b0fd24.
2012-08-03 19:47:26 -04:00
Dave Reisner
40fcfbf1a9 prepare v4 2012-08-03 19:11:31 -04:00
Dave Reisner
67c4b0fd24 arch-chroot: default to /bin/sh when no command given
chroot(1) will default to ${SHELL:-/bin/sh} which might not work, given
SHELL being /bin/zsh instead. Immediately default to /bin/sh, which will
exist in any sane chroot.
2012-08-03 19:07:03 -04:00
Daniel Wallace
d195e48981 allow turning off --noconfirm
use -i (interactive) to allow for choosing packages from groups

[dave: alter option description]
2012-08-03 08:43:01 -04:00
Dave Reisner
93b3298147 prepare v3
What happened to v2? I HAVE NO IDEA.
2012-07-24 20:43:48 -04:00
Daniel Wallace
38e446d995 Add zsh completion for all scripts 2012-07-22 23:28:59 -04:00
Dave Reisner
2dda000a86 genfstab: avoid mangling root parameter 2012-07-22 20:16:09 -04:00
Dave Reisner
b7c75786b0 genfstab: avoid reference to uninitialized var
Rename this, too, so it doesn't share a name with a reserved word.

Fixes FS#30808
2012-07-22 20:11:54 -04:00
Dave Reisner
ced04ef0f9 pacstrap: create package cache along with DBPath
pacman creates this for us, but seems to have problems writing to it.

Hackily addresses FS#30807
2012-07-22 20:10:47 -04:00
Dave Reisner
05b36e029c arch-chroot: umount /etc/resolv.conf as part of trap 2012-07-15 10:09:49 -04:00
Dave Reisner
f83a267672 make the 'all' target a dependency of 'install' 2012-07-15 10:07:39 -04:00
Dave Reisner
1d9c98c5ee enforce user-specified root directory
Remove the -r option, forcing the user to explicitly pass a root
directory. This removes some confusion wherein we set defaults, but
wouldn't allow all the defaults to be accepted.

This also adds some mild documentation to the help output for genfstab
and pacstrap.
2012-07-15 10:07:11 -04:00
Dave Reisner
de68d4cc02 reverse default and set values for hostcache option 2012-07-14 09:33:46 -04:00
Dave Reisner
694742e484 prepare v1 release 2012-07-14 08:07:00 -04:00
Dave Reisner
f8e7c4e29d direct error output to stderr 2012-06-25 22:33:38 -04:00
Dave Reisner
0537563148 use blkid for uuid/label instead of lsblk
This works around something that seems might be a bug in lsblk where-in
detection of UUIDs fails for certain devices when invoked as non-root.
2012-06-22 20:28:37 -04:00
Dave Reisner
80ed096ccf arch-chroot: Only conditionally use a bind mount on chroot
This mainly fixes the case where there's devices mounted under the
chroot directory. Creating a bind mount on top of this will obscure
these other mounts.
2012-06-22 19:04:46 -04:00
Tom Gundersen
7d8ef4c747 pacstrap: store cache on target system by default
However, add a '-c' switch to use the host cache instead. The default is
useful for when installing a system from an install media (which has
possibly constrained storage), but the '-c' switch is useful when
e.g. creating build-chroots.

I considered doing this the other way around ('-c' being the default).
However, I think it makes sense to default to the expected behavior for
install both because a new user is less likely to know that they need to
add a switch, and because the errormessage they'd get when they run out
of space/memory is nonsensical and would cause lots of annoying
questions.

[dave: use proper array addition, nuke readlink, use arithmetic flag]

Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-06-22 18:55:04 -04:00
Tom Gundersen
e032c0305e pacstrap: copy the mirrorlist from the host to the new root
This would overwrite an existing mirrorlist, but the one at the host
is known to be good at this point, so the loss is minimal.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-06-22 18:55:04 -04:00
Tom Gundersen
c5c20fd966 pacstrap: don't copy over keyring if it exist already
We want to be able to call pacstrap with the target being an existing
install (in case it has been severely broken), and hence we might want
to preserve the existing keyring.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-06-22 18:55:04 -04:00
Dave Reisner
074a12023f Merge pull request #3 from pierres/master
$newroot might be a relative path, so remove the leading slash.
2012-06-22 06:39:32 -07:00
Pierre Schmitz
b0af617480 pacstrap: Fix creation of default directories
$newroot might be a relative path, so remove the leading slash.

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-22 15:33:11 +02:00
Dave Reisner
f4a7a8313a fix xtrace output on api mount 2012-06-20 10:26:50 -04:00
Dave Reisner
49e855638e use intermediate var for chrootdir
the trap won't necessarily have the same positional parameters.
2012-06-20 10:25:18 -04:00
Dave Reisner
542e888b48 pacstrap/arch-chroot: require root privileges to run
Suggested by Pierre. This makes sense since somewhere along the line,
pacman or mount are going to complain.
2012-06-19 08:13:52 -04:00