From 93139095bd5aac1b05b4d11b979db73718cbf1db Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 29 Dec 2008 19:01:03 +0100 Subject: ext4 support --- src/core/libs/lib-blockdevices-filesystems.sh | 2 ++ src/core/libs/lib-ui-interactive.sh | 3 +++ 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index fad1171..5fa0815 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -649,6 +649,7 @@ process_filesystem () reiserfs) yes | mkreiserfs $part $opts >$LOG 2>&1; ret=$? ;; ext2) mke2fs "$part" $opts >$LOG 2>&1; ret=$? ;; ext3) mke2fs -j $part $opts >$LOG 2>&1; ret=$? ;; + ext4) mkfs.ext4 $part $opts >$LOG 2>&1; ret=$? ;; vfat) mkfs.vfat $part $opts >$LOG 2>&1; ret=$? ;; swap) mkswap $part $opts >$LOG 2>&1; ret=$? ;; dm_crypt) [ -z "$fs_params" ] && fs_params='-c aes-xts-plain -y -s 512'; @@ -721,6 +722,7 @@ get_filesystem_program () [ $1 = swap ] && echo mkswap && return 0 [ $1 = ext2 ] && echo mkfs.ext2 && return 0 [ $1 = ext3 ] && echo mkfs.ext3 && return 0 + [ $1 = ext4 ] && echo mkfs.ext4 && return 0 [ $1 = reiserfs ] && echo mkreiserfs && return 0 [ $1 = xfs ] && echo mkfs.xfs && return 0 [ $1 = jfs ] && echo mkfs.jfs && return 0 diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index f7f4ecb..c4d9bf9 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -117,6 +117,7 @@ interactive_autoprepare() FSOPTS= which `get_filesystem_program ext2` &>/dev/null && FSOPTS="$FSOPTS ext2 Ext2" which `get_filesystem_program ext3` &>/dev/null && FSOPTS="$FSOPTS ext3 Ext3" + which `get_filesystem_program ext4` &>/dev/null && FSOPTS="$FSOPTS ext4 Ext4" which `get_filesystem_program reiserfs` &>/dev/null && FSOPTS="$FSOPTS reiserfs Reiser3" which `get_filesystem_program xfs` &>/dev/null && FSOPTS="$FSOPTS xfs XFS" which `get_filesystem_program jfs` &>/dev/null && FSOPTS="$FSOPTS jfs JFS" @@ -266,6 +267,7 @@ interactive_filesystem () # swap raw/lvm-lv/dm_crypt no no no no no no # ext 2 raw/lvm-lv/dm_crypt optional optional no no optional no # ext 3 raw/lvm-lv/dm_crypt optional optional no no optional no + # ext 4 raw/lvm-lv/dm_crypt optional optional no no optional no # reiserFS raw/lvm-lv/dm_crypt optional optional no no optional no # xfs raw/lvm-lv/dm_crypt optional optional no no optional no # jfs raw/lvm-lv/dm_crypt optional optional no no optional no @@ -281,6 +283,7 @@ interactive_filesystem () [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program swap` &>/dev/null && FSOPTS="$FSOPTS swap Swap" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program ext2` &>/dev/null && FSOPTS="$FSOPTS ext2 Ext2" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program ext3` &>/dev/null && FSOPTS="$FSOPTS ext3 Ext3" + [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program ext4` &>/dev/null && FSOPTS="$FSOPTS ext4 Ext4" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program reiserfs` &>/dev/null && FSOPTS="$FSOPTS reiserfs Reiser3" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program xfs` &>/dev/null && FSOPTS="$FSOPTS xfs XFS" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which `get_filesystem_program jfs` &>/dev/null && FSOPTS="$FSOPTS jfs JFS" -- cgit v1.2.3-54-g00ecf From d9ffd2d3beccc4d768bdcaf7634a7de3f505186b Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 24 Jan 2009 20:02:52 +0100 Subject: bugfix for broken pacman db because we sync for target, not for runtime --- src/core/libs/lib-ui-interactive.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index c4d9bf9..70ef739 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -579,7 +579,7 @@ interactive_select_packages() { # show group listing for group selection, base is ON by default, all others are OFF local _catlist="base ^ ON" - for i in $($PACMAN -Sg | sed "s/^base$/ /g"); do + for i in $($PACMAN_TARGET -Sg | sed "s/^base$/ /g"); do _catlist="${_catlist} ${i} - OFF" done @@ -588,10 +588,10 @@ interactive_select_packages() { # assemble a list of packages with groups, marking pre-selected ones # - local _pkgtmp="$($PACMAN -Sl core | awk '{print $2}')" # all packages in core repository + local _pkgtmp="$($PACMAN_TARGET -Sl core | awk '{print $2}')" # all packages in core repository local _pkglist='' - $PACMAN -Si $_pkgtmp | awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }' > $ANSWER + $PACMAN_TARGET -Si $_pkgtmp | awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }' > $ANSWER while read pkgname pkgcat; do # check if this package is in a selected group # slightly ugly but sorting later requires newlines in the variable -- cgit v1.2.3-54-g00ecf From f9126402b343aea8f2766bc16c10577b833b6703 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 24 Jan 2009 20:08:15 +0100 Subject: tell user where to find the readme --- src/aif.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/aif.sh b/src/aif.sh index 9bdea2d..534a899 100755 --- a/src/aif.sh +++ b/src/aif.sh @@ -18,7 +18,8 @@ usage () -l Explicitly enable logging to file (optional) -h Help: show usage (optional)\n If the procedurename starts with 'http://' it will be wget'ed. Otherwise it's assumed to be a procedure in the VFS tree -If the procedurename is prefixed with '/' it will be loaded from user module . See README\n +If the procedurename is prefixed with '/' it will be loaded from user module .\n +For more info, see the README which you can find in /home/arch/aif/docs\n Available procedures on the filesystem: `find /home/arch/aif/core/procedures -type f`\n `find /home/arch/aif/user/*/procedures -type f 2>/dev/null`" -- cgit v1.2.3-54-g00ecf From ba0e266b9d26ac1ab0e1afb050df9dfeb9b7500f Mon Sep 17 00:00:00 2001 From: Gerhard Brauer Date: Thu, 4 Jun 2009 17:14:23 +0200 Subject: Fix xfs freezing during grub installation Since kernel 2.6.29 xfs_freeze could also freeze non-xfs partitions. This leeds to the problem that in the process of grub installation all our TARGET partitions ($target/ and $target/boot) get freezed - regardless which filesystem they have. The result is a stuck grub install. Better way is: freeze above TARGETS only if they realy have an xfs FS. --- src/core/libs/lib-ui-interactive.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 8beb6fb..2b57346 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -807,10 +807,12 @@ EOF cp -a $var_TARGET_DIR/usr/lib/grub/i386-pc/* $var_TARGET_DIR/boot/grub/ sync # freeze xfs filesystems to enable grub installation on xfs filesystems - if [ -x /usr/sbin/xfs_freeze ]; then - /usr/sbin/xfs_freeze -f $var_TARGET_DIR/boot > /dev/null 2>&1 - /usr/sbin/xfs_freeze -f $var_TARGET_DIR/ > /dev/null 2>&1 - fi + for xfsdev in $(blkid -t TYPE=xfs -o device); do + mnt=$(mount | grep $xfsdev | cut -d' ' -f 3) + if [ $mnt = "$var_TARGET_DIR/boot" -o $mnt = "$var_TARGET_DIR/" + /usr/sbin/xfs_freeze -f $mnt > /dev/null 2>&1 + fi + done # look for a separately-mounted /boot partition bootpart=$(mount | grep $var_TARGET_DIR/boot | cut -d' ' -f 1) if [ "$bootpart" = "" ]; then @@ -843,10 +845,12 @@ quit EOF cat /tmp/grub.log >$LOG # unfreeze xfs filesystems - if [ -x /usr/sbin/xfs_freeze ]; then - /usr/sbin/xfs_freeze -u $var_TARGET_DIR/boot > /dev/null 2>&1 - /usr/sbin/xfs_freeze -u $var_TARGET_DIR/ > /dev/null 2>&1 - fi + for xfsdev in $(blkid -t TYPE=xfs -o device); do + mnt=$(mount | grep $xfsdev | cut -d' ' -f 3) + if [ $mnt = "$var_TARGET_DIR/boot" -o $mnt = "$var_TARGET_DIR/" + /usr/sbin/xfs_freeze -u $mnt > /dev/null 2>&1 + fi + done if grep "Error [0-9]*: " /tmp/grub.log >/dev/null; then notify "Error installing GRUB. (see $LOG for output)" -- cgit v1.2.3-54-g00ecf From 18901d93175fa5949532d80d64fd510a548582f1 Mon Sep 17 00:00:00 2001 From: Matthias Dienstbier Date: Sat, 20 Jun 2009 23:13:50 +0200 Subject: fix syntax error introduced by Xfs freeze patch --- src/core/libs/lib-ui-interactive.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 2b57346..ca885c0 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -809,7 +809,7 @@ EOF # freeze xfs filesystems to enable grub installation on xfs filesystems for xfsdev in $(blkid -t TYPE=xfs -o device); do mnt=$(mount | grep $xfsdev | cut -d' ' -f 3) - if [ $mnt = "$var_TARGET_DIR/boot" -o $mnt = "$var_TARGET_DIR/" + if [ $mnt = "$var_TARGET_DIR/boot" -o $mnt = "$var_TARGET_DIR/" ]; then /usr/sbin/xfs_freeze -f $mnt > /dev/null 2>&1 fi done @@ -847,7 +847,7 @@ EOF # unfreeze xfs filesystems for xfsdev in $(blkid -t TYPE=xfs -o device); do mnt=$(mount | grep $xfsdev | cut -d' ' -f 3) - if [ $mnt = "$var_TARGET_DIR/boot" -o $mnt = "$var_TARGET_DIR/" + if [ $mnt = "$var_TARGET_DIR/boot" -o $mnt = "$var_TARGET_DIR/" ]; then /usr/sbin/xfs_freeze -u $mnt > /dev/null 2>&1 fi done -- cgit v1.2.3-54-g00ecf