summaryrefslogtreecommitdiffstats
path: root/install/autodetect
AgeCommit message (Collapse)AuthorFilesLines
2012-02-27install/autodetect: avoid adding empty rootfstypeDave Reisner1-5/+5
Make the logic similar to how we treat usrfstype. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-22use --tab-file flag for findmnt -sDave Reisner1-1/+1
Behavior changed in util-linux commit 2f1ac44b4b. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-22autodetect: resolve guessed filesystem modulesDave Reisner1-2/+8
Trading out modinfo for modprobe allows us to detect filesystems like ext2 and ext3 which might be aliased to ext4 in the case of Kconfig CONFIG_EXT4_USE_FOR_EXT23 being enabled. Maybe this catches other insane corner cases, too. Since we now treat this as possible aliases, we also need to be mindful of the fact that it could resolve to multiple module names. Assign the output as an array to respect this. Fixes FS#28569. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-11autodetect: refactor raid device detectionDave Reisner1-6/+22
FS#10061 still isn't dead, its just resting: https://bbs.archlinux.org/viewtopic.php?pid=1056003 An strace from a helpful user shows that our mdadm call is trying to open a block device and the call never returns: open("/dev/sdb", O_RDONLY|O_DIRECT|O_LARGEFILE Fix this by only scanning explicitly the block devices we're interested in, found via sysfs. This is an all around win for everyone, especially users who have mdadm installed without any need for it. This changes some of our assumptions about the environment: - the mdadm binary exists when we find md devices in /sys - the user running mkinitcpio isn't any specific UID or part of any particular group, but merely has read access to the block devices we're about to scan. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-28autodetect: remove hack to exclude {ata,ide}-genericDave Reisner1-1/+1
In particular, skipping ata-generic causes some macbooks to not boot. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-13autodetect: try to find /usr partition fstypeDave Reisner1-2/+11
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-05autodetect: check for rootfs module existanceDave Reisner1-1/+6
Avoiding adding a filesystem module to the whitelist when it doesn't actually exist as a module (in case its compiled in staticly). Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-05mkinitcpio: remove hardcoded pathsDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-15autodetect: store rootfstype for use by other hooksDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-16mkinitcpio: avoid stomping on TMPDIR from the environmentDave Reisner1-1/+1
cc36db45 was a bit too strict about localizing variables and blew out TMPDIR, which might be a legit variable sourced from the calling environment. Restore this behavior with a bit of refactoring, and additionally add in a check to make sure the temporary directory is writeable before proceeding. Fixes FS#26373. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-09autodetect: add verbose feedback on autodetect successDave Reisner1-0/+4
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-05autodetect: check for /sys/devices before autodetectingDave Reisner1-2/+2
Oops. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-26install/autodetect: refactor and simplify hookDave Reisner1-63/+28
Bashify and refactor to cut back on unnecessary churn. Since our {all,checked}_modules functions always return clean module names, we can add these directly to the autodetect file instead of aggregating them during the autodetect hook and then cleansing one at a time. There's a small speed increase here for the simplest code path. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-19overhaul output, introducing colorDave Reisner1-2/+2
Output style and coloring is borrowed from makepkg with minor adjustments. Most instances where we encounter fatal errors are replaced with a 'die' function to wrap this up neatly. In addition, we introduce the -n flag, for no-color. As a side effect, we need to source the functions file earlier so we have the output functions available earlier. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-16mkinitcpio: deprecate install() in install hooksDave Reisner1-1/+1
This is an unfortunate name clash with a common utility and should be avoided. Rename the install function to 'build' and warn the user when we discover a hook using an 'install' function. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-03-27Simplify root file system detectionThomas Bächler1-2/+1
Instead of calling blkid, get the file system type directly from findmnt. Fixes FS#23100.
2011-01-31Use new helper functions instead of system commandsDan McGee1-2/+1
Replace all of the repeated calls to dirname and basename with our new replacments. Also replace the 'grep ... /dev/null' idiom with calls to 'grep -q', which does exactly what we want. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-25Support .ko.gz kernel modules, in addition to .koThomas Bächler1-2/+3
We used to expect only .ko as a kernel module name. Also accept .ko.gz, so we can reduce the installed size of the kernel26 package.
2011-01-12If filesystem autodetection fails, use all_modules instead of checked_modulesThomas Bächler1-1/+8
2011-01-12autodetect: only probe the root deviceThomas Bächler1-4/+7
2010-06-19Implement explicit module dependsJan Steffens1-13/+2
Needed to get libcrc32c and therefore btrfs to work. Also remove the equivalent section in autodetect, which wasn't working anyway.
2010-06-19Fix autodetect bitrotJan Steffens1-6/+3
This error went unnoticed after auto_modules was switched over to resolve-modalias. As a result, ata_generic and ide-generic weren't filtered anymore.
2010-05-08Change how autodetect hook lookup for filesystemsGerardo Exequiel Pozzi1-1/+1
In this way, remove eval hacks and enviroments vars, just use blkid syntax. I guess in this way will fix/hide "command not found" when fstype is not property setup in fs, reported by some users. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-11Fix file system autodetection of filesystems when the running kernel and the ↵Thomas Bächler1-1/+1
target kernel don't match. We need --set-version when resolving filesystem aliases, thanks Tobias.
2010-02-07Allow a filesystem name to be an alias instead of a kernel moduleThomas Bächler1-4/+7
This fixes future bugs in 2.6.33 when the ext4 driver is used for ext3 and ext2, and you want to mount ext2/3 as your root filesystem
2010-01-10Remove klibc-isms from autodetect: Use blkid for filesystem detectionThomas Bächler1-4/+1
2009-11-27fixed autodetection of raid module on mdadm>=3.0.xTobias Powalowski1-1/+1
2009-06-07Fix #12374Thomas Bächler1-1/+1
2008-12-30Revert fstype -> blkid change0.5.20Aaron Griffin1-1/+1
blkid is part of e2fsprogs, not udev, so it's not as ubiquitous. Additionally, we need to use the same detection at installtime as we do at runtime. Thomas has patched klibc's fstype to work with ext4, so we should continue to use it Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-29Add ext4 to filesystem autodetectionAaron Griffin1-0/+1
Original-work-by: Gerhard Brauer <gerhard.brauer@web.de> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-12-29Use udev's blkid instead of klibc-extra's fstypeAaron Griffin1-1/+1
This is better and more updated with regards to figuring out the fs type of a given block device Original-work-by: Gerhard Brauer <gerhard.brauer@web.de> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-04-13Don't add the 'generic' ide or pata modules when autodetection is enabledThomas Bächler1-1/+2
2008-03-16Fix various coding style issuesThomas Bächler1-5/+5
2008-03-15Fix syntax error introduced in one of the last commitsThomas Bächler1-1/+1
2008-03-15Use a temporary directory instead of several files. trap cleanupThomas Bächler1-3/+3
2007-10-31Fix problems with /sbin and /usr/sbin not being in the path,Thomas Bächler1-1/+1
fixes Archlinux #8448
2007-08-11Coding style change, use -n and -z for variable testsAaron Griffin1-1/+1
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@209 880c04e9-e011-0410-abf7-b926e227c9cd
2007-01-11fixed raid autodetection for newer kernelsThomas Bächler1-5/+11
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@191 880c04e9-e011-0410-abf7-b926e227c9cd
2006-10-23- Fixed autodetectionThomas Bächler1-1/+1
- Minor changes to presets - Removed ata, made sata 2.6.19-ready and added pata git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@179 880c04e9-e011-0410-abf7-b926e227c9cd
2006-10-15added /ata for autodetectionThomas Bächler1-1/+1
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@176 880c04e9-e011-0410-abf7-b926e227c9cd
2006-10-15fixed autodetectionThomas Bächler1-10/+10
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@175 880c04e9-e011-0410-abf7-b926e227c9cd
2006-10-15Added disk group check for filesystem detectionAaron Griffin1-10/+9
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@174 880c04e9-e011-0410-abf7-b926e227c9cd
2006-09-30Changed block device scanning to really work this timeAaron Griffin1-18/+15
It seems I was a bit of an idiot before... using sysfs and all that Fixed it to use "find /dev -type b" git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@170 880c04e9-e011-0410-abf7-b926e227c9cd
2006-08-20Cleaned up extra grep calls (real minor change)Aaron Griffin1-1/+1
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@163 880c04e9-e011-0410-abf7-b926e227c9cd
2006-08-20'upgpkg: fixed autodetection for filesystems now, that it works for ↵Tobias Powalowski1-9/+22
everything :)' git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@162 880c04e9-e011-0410-abf7-b926e227c9cd
2006-08-20'upgpkg: fixed dm and md detection in autodetect script'Tobias Powalowski1-1/+2
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@161 880c04e9-e011-0410-abf7-b926e227c9cd
2006-08-08Init fixes for the silly "." issue.Aaron Griffin1-2/+11
Added new and improved filesystem detection... git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@151 880c04e9-e011-0410-abf7-b926e227c9cd
2006-07-24'added new tarball + fixed nls_cp437 module for vfat module'Tobias Powalowski1-1/+1
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@133 880c04e9-e011-0410-abf7-b926e227c9cd
2006-06-06New error conditions: fail on missing hook or missing moduleAaron Griffin1-6/+7
Filesystem hook changes (parseblock handling) Init changes to allow /arch.cmd command line parsing Misc install script cleanups git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@123 880c04e9-e011-0410-abf7-b926e227c9cd
2006-05-08mdadm formatting + style cleanup (minor)Aaron Griffin1-5/+9
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@84 880c04e9-e011-0410-abf7-b926e227c9cd