public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Richard Farina" <zerochaos@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/
Date: Tue, 11 Aug 2015 18:37:53 +0000 (UTC)	[thread overview]
Message-ID: <1439317276.466e9c7220d6c656113457ddf5aa35c5265a6b7c.zerochaos@gentoo> (raw)

commit:     466e9c7220d6c656113457ddf5aa35c5265a6b7c
Author:     Fernando Reyes (likewhoa) <design <AT> missionaccomplish <DOT> com>
AuthorDate: Thu Jul 10 01:53:07 2014 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Tue Aug 11 18:21:16 2015 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=466e9c72

Changed to the dd command which creates the livecd.aufs image for
the aufs writable branch to make the process faster we create a
sparse file. Added a check for a block device so that we don't try
mounting the aufs device & some small comestic changes.

 defaults/initrd.scripts | 33 ++++++++++++++++++++++-----------
 defaults/linuxrc        |  3 ++-
 2 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 2e48504..5c7703b 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -376,7 +376,7 @@ create_changefs() {
 	local size
 
 	while :; do
-		read -p '<< Size of file (Press Enter for default 256 Mb): ' size
+		read -p '<< Size of file (Press Enter for default 256 MB): ' size
 
                 size=${size:-256}
 
@@ -386,13 +386,13 @@ create_changefs() {
                 elif [ 15 -ge "$size" ]; then
                         bad_msg "Please give a size of at least 16 Megabytes"
 		else
-			if dd if=/dev/zero "of=$aufs_dev_mnt$aufs_union_file" bs=1M count="$size" &>/dev/null; then
-				good_msg "Creation of $aufs_union_file, ${size}Mb on $aufs_dev successful, formatting it ext2"
+			if dd if=/dev/zero "of=$aufs_dev_mnt$aufs_union_file" bs=1 seek="$size"M count=0 &>/dev/null; then
+				good_msg "Creation of $aufs_union_file, ${size}MB on $aufs_dev successful, formatting it ext2"
 				mke2fs -F "$aufs_dev_mnt$aufs_union_file" &>/dev/null
 				break
 			else
 				rm "$aufs_dev_mnt$aufs_union_file"
-				bad_msg "Unable to create ${aufs_union_file#*/} on $aufs_dev of ${size}Mb"
+				bad_msg "Unable to create ${aufs_union_file#*/} on $aufs_dev of ${size}MB"
 				bad_msg "Ensure your disk is not full or read-only"
 
 				read -p '<< Type "a" to abort, anything else to continue : ' doabort
@@ -410,13 +410,19 @@ create_changefs() {
 setup_aufs() {
 	bootstrapCD
 
-	if [ -n "$aufs_dev" ]; then
-                good_msg "Mounting $aufs_dev to $aufs_memory for aufs support"
+        if [ -n "$aufs_dev" ]; then
+                if [ ! -b $aufs_dev ]; then
+                        bad_msg "$aufs_dev is not a valid block device"
+                        local invalidblk=1
+                        unset aufs_dev
+                else
+                        good_msg "Mounting $aufs_dev to $aufs_memory for aufs support"
 
-		if ! mount -t auto "$aufs_dev" "$aufs_dev_mnt" &>/dev/null; then
-			bad_msg "Mount of $aufs_dev failed, falling back to ramdisk based aufs"
-			unset aufs_dev
-		fi
+                        if ! mount -t auto "$aufs_dev" "$aufs_dev_mnt" &>/dev/null; then
+                                bad_msg "Mount of $aufs_dev failed, falling back to ramdisk based aufs"
+                                unset aufs_dev
+		        fi
+                fi
 
                 # Check and attempt to create the AUFS union file
 	        if [ ! -e $aufs_dev_mnt$aufs_union_file ] && [ -n "$aufs_dev" ]; then
@@ -455,7 +461,12 @@ setup_aufs() {
                         aufs_xino=$aufs_memory
                         umount "$aufs_memory" &>/dev/null
 
-                        bad_msg "Create an extfs ${aufs_union_file#*/} file on this device"
+                        if [ 1 = "$invalidblk" ]; then
+                                bad_msg "Verify that you've entered a valid device path"
+                        else
+                                bad_msg "Create an extfs ${aufs_union_file#*/} file on this device"
+                        fi
+
                         bad_msg "if you wish to have aufs data persistency on reboots"
                         bad_msg "Falling back to ramdisk based aufs"
                         good_msg "Mounting ramdisk to $aufs_memory for aufs support"

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 276f150..3098866 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -786,6 +786,7 @@ distfiles       /usr/portage/distfiles          tmpfs   defaults        0 0
 FSTAB
                 fi
 
+                # When aufs.modules= is used
                 if [ 1 = "$aufs_modules" ]; then
                         warn_msg "Adding all modules in $aufs_modules_dev/modules/"
 
@@ -804,7 +805,7 @@ FSTAB
                         cp /etc/sysconfig/keyboard "$CHROOT/etc/sysconfig/"
                 fi
 
-                # Create the diuectories for our new union mounts
+                # Create the directories for our new union mounts
                 [ ! -d $CHROOT$NEW_ROOT ] && mkdir -p "$CHROOT$NEW_ROOT"
 
                 # Check to see if we successfully mounted $aufs_dev


             reply	other threads:[~2015-08-11 18:38 UTC|newest]

Thread overview: 339+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 18:37 Richard Farina [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-23 19:12 [gentoo-commits] proj/genkernel:master commit in: defaults/ Ben Kohler
2024-05-01 18:00 Ben Kohler
2024-02-17  5:16 Robin H. Johnson
2024-02-16 19:39 Ben Kohler
2023-07-27 10:59 Sam James
2023-07-27 10:58 Sam James
2023-07-27 10:56 Sam James
2023-06-28 15:10 Ben Kohler
2022-06-21  2:54 Robin H. Johnson
2022-05-29 16:52 Robin H. Johnson
2022-05-28 20:54 Robin H. Johnson
2022-05-28 20:52 Robin H. Johnson
2022-05-28 20:52 Robin H. Johnson
2022-05-16 19:33 Andreas K. Hüttel
2022-05-16  5:45 Robin H. Johnson
2022-05-16  5:34 Robin H. Johnson
2021-11-16 17:34 Thomas Deutschmann
2021-11-15  3:35 Thomas Deutschmann
2021-09-29 20:35 Thomas Deutschmann
2021-09-08 14:00 Thomas Deutschmann
2021-07-06  0:25 Thomas Deutschmann
2021-07-06  0:25 Thomas Deutschmann
2021-03-27 16:15 Thomas Deutschmann
2021-03-27  0:00 Thomas Deutschmann
2021-03-21 22:36 Thomas Deutschmann
2021-03-21 22:36 Thomas Deutschmann
2021-03-21 22:36 Thomas Deutschmann
2021-03-21 22:36 Thomas Deutschmann
2021-03-21 22:36 Thomas Deutschmann
2021-03-21 22:36 Thomas Deutschmann
2021-03-21 22:36 Thomas Deutschmann
2021-03-21 22:36 Thomas Deutschmann
2021-03-20  0:16 Thomas Deutschmann
2021-03-20  0:16 Thomas Deutschmann
2021-03-20  0:16 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-14 20:05 Thomas Deutschmann
2021-03-08  0:37 Thomas Deutschmann
2021-02-18 23:54 Thomas Deutschmann
2021-02-18 23:12 Thomas Deutschmann
2021-02-15  6:01 Thomas Deutschmann
2021-02-15  6:01 Thomas Deutschmann
2021-02-15  6:01 Thomas Deutschmann
2020-09-02 19:57 Thomas Deutschmann
2020-09-02 13:52 Thomas Deutschmann
2020-09-02 13:52 Thomas Deutschmann
2020-08-30 21:11 Thomas Deutschmann
2020-08-28 20:18 Thomas Deutschmann
2020-08-28 20:18 Thomas Deutschmann
2020-08-28 20:18 Thomas Deutschmann
2020-08-28 20:18 Thomas Deutschmann
2020-08-28 20:18 Thomas Deutschmann
2020-08-28 20:18 Thomas Deutschmann
2020-08-26 22:54 Thomas Deutschmann
2020-08-25 17:42 Thomas Deutschmann
2020-08-25 17:42 Thomas Deutschmann
2020-08-24 20:28 Thomas Deutschmann
2020-08-23 20:16 Thomas Deutschmann
2020-08-21 18:48 Thomas Deutschmann
2020-08-19 21:31 Thomas Deutschmann
2020-08-09 20:04 Thomas Deutschmann
2020-08-09 19:51 Thomas Deutschmann
2020-08-04 21:29 Thomas Deutschmann
2020-07-23 23:57 Thomas Deutschmann
2020-07-23 23:57 Thomas Deutschmann
2020-07-23 23:57 Thomas Deutschmann
2020-07-23 23:57 Thomas Deutschmann
2020-07-23 23:57 Thomas Deutschmann
2020-07-23 23:57 Thomas Deutschmann
2020-07-23 23:57 Thomas Deutschmann
2020-07-16 15:03 Thomas Deutschmann
2020-06-23 19:14 Thomas Deutschmann
2020-06-21 22:15 Thomas Deutschmann
2020-06-12 15:02 Thomas Deutschmann
2020-04-11 20:04 Thomas Deutschmann
2020-04-11 20:04 Thomas Deutschmann
2020-04-11 20:04 Thomas Deutschmann
2020-04-09 17:37 Rick Farina
2020-03-05 15:10 Thomas Deutschmann
2020-03-04 15:41 Rick Farina
2020-02-15 21:14 Thomas Deutschmann
2020-02-14 16:35 Rick Farina
2020-02-14 16:35 Rick Farina
2020-01-05 21:18 Thomas Deutschmann
2020-01-05 21:18 Thomas Deutschmann
2020-01-03 13:37 Ben Kohler
2019-12-14 19:02 Thomas Deutschmann
2019-12-14  0:51 Thomas Deutschmann
2019-12-05 23:52 Thomas Deutschmann
2019-12-05 23:52 Thomas Deutschmann
2019-12-05 23:52 Thomas Deutschmann
2019-12-05 23:52 Thomas Deutschmann
2019-12-02 19:15 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-27 16:40 Thomas Deutschmann
2019-11-26 13:50 Thomas Deutschmann
2019-11-25 13:53 Thomas Deutschmann
2019-11-25 13:53 Thomas Deutschmann
2019-11-25 13:53 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-11-24 20:00 Thomas Deutschmann
2019-10-13 16:00 Thomas Deutschmann
2019-10-13 16:00 Thomas Deutschmann
2019-10-13 16:00 Thomas Deutschmann
2019-10-07 21:56 Thomas Deutschmann
2019-10-07 21:56 Thomas Deutschmann
2019-10-02 22:45 Thomas Deutschmann
2019-10-02 22:45 Thomas Deutschmann
2019-08-29 20:49 Thomas Deutschmann
2019-08-29 20:49 Thomas Deutschmann
2019-08-21 14:49 Thomas Deutschmann
2019-08-16 19:56 Thomas Deutschmann
2019-08-16 19:17 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-08-07 15:46 Thomas Deutschmann
2019-07-29 20:10 Thomas Deutschmann
2019-07-29 20:10 Thomas Deutschmann
2019-07-21 16:26 Thomas Deutschmann
2019-07-18 17:32 Thomas Deutschmann
2019-07-18 17:32 Thomas Deutschmann
2019-07-18 17:32 Thomas Deutschmann
2019-07-18 17:32 Thomas Deutschmann
2019-07-16 22:46 Thomas Deutschmann
2019-07-16 20:30 Thomas Deutschmann
2019-07-16 20:30 Thomas Deutschmann
2019-07-16 16:36 Thomas Deutschmann
2019-07-15 22:39 Thomas Deutschmann
2019-07-15 22:39 Thomas Deutschmann
2019-07-15 22:39 Thomas Deutschmann
2019-07-15 22:39 Thomas Deutschmann
2019-07-15 22:39 Thomas Deutschmann
2019-07-15 22:39 Thomas Deutschmann
2019-07-15 22:39 Thomas Deutschmann
2019-07-15 22:39 Thomas Deutschmann
2019-07-15 15:37 Thomas Deutschmann
2019-07-15 12:42 Thomas Deutschmann
2019-07-14 19:35 Thomas Deutschmann
2019-06-17 16:58 Ben Kohler
2019-06-05  0:03 Ben Kohler
2019-05-22 19:20 Ben Kohler
2019-03-30  1:28 Thomas Deutschmann
2019-03-30  1:28 Thomas Deutschmann
2019-03-30  1:28 Thomas Deutschmann
2019-03-29 21:26 Robin H. Johnson
2019-03-24 19:47 Thomas Deutschmann
2019-03-07 22:38 Ben Kohler
2019-03-07 22:38 Ben Kohler
2019-03-01  6:00 Robin H. Johnson
2019-03-01  6:00 Robin H. Johnson
2019-03-01  6:00 Robin H. Johnson
2019-03-01  6:00 Robin H. Johnson
2019-03-01  6:00 Robin H. Johnson
2019-03-01  6:00 Robin H. Johnson
2019-03-01  6:00 Robin H. Johnson
2019-03-01  6:00 Robin H. Johnson
2019-03-01  5:55 Robin H. Johnson
2019-02-28  6:40 Robin H. Johnson
2019-02-28  6:40 Robin H. Johnson
2019-02-28  6:40 Robin H. Johnson
2019-02-28  6:40 Robin H. Johnson
2019-02-19  7:40 Robin H. Johnson
2019-02-19  7:40 Robin H. Johnson
2018-07-25 15:11 Richard Farina
2018-04-05 22:52 Richard Farina
2017-11-15  3:08 Robin H. Johnson
2017-11-15  3:08 Robin H. Johnson
2017-11-15  3:08 Robin H. Johnson
2017-10-31 18:59 Robin H. Johnson
2017-10-31 18:59 Robin H. Johnson
2017-09-07  0:52 Robin H. Johnson
2017-09-07  0:52 Robin H. Johnson
2017-09-07  0:52 Robin H. Johnson
2017-09-07  0:52 Robin H. Johnson
2017-09-04  6:43 Robin H. Johnson
2017-09-04  5:54 Robin H. Johnson
2017-09-04  2:54 Robin H. Johnson
2017-09-04  2:51 Robin H. Johnson
2017-09-03  6:28 Robin H. Johnson
2017-07-14 18:50 Robin H. Johnson
2017-06-23 21:53 Robin H. Johnson
2017-01-08  1:57 Robin H. Johnson
2017-01-08  1:57 Robin H. Johnson
2017-01-08  0:40 Robin H. Johnson
2017-01-08  0:40 Robin H. Johnson
2017-01-07 23:50 Robin H. Johnson
2017-01-07 23:37 Robin H. Johnson
2017-01-02 22:41 Robin H. Johnson
2017-01-02 20:14 Matt Thode
2016-11-08  4:53 Richard Farina
2016-11-01 18:00 Richard Farina
2016-08-31 22:25 Robin H. Johnson
2016-07-05 19:49 Robin H. Johnson
2016-05-16  6:55 Robin H. Johnson
2016-05-16  6:55 Robin H. Johnson
2016-02-14 20:53 Robin H. Johnson
2016-02-04  2:54 Stefan Behte
2016-01-23 22:49 Robin H. Johnson
2016-01-23 21:28 Robin H. Johnson
2016-01-23 21:28 Robin H. Johnson
2016-01-23 21:28 Robin H. Johnson
2016-01-23 21:28 Robin H. Johnson
2016-01-20 19:03 Richard Yao
2016-01-05 20:05 Robin H. Johnson
2016-01-05 20:02 Richard Farina
2015-12-30  4:38 Richard Farina
2015-08-29 20:53 Richard Yao
2015-08-20 16:14 Richard Farina
2015-08-20 16:06 Richard Farina
2015-08-20  2:26 Richard Farina
2015-08-19 19:34 Richard Farina
2015-08-18  3:35 Robin H. Johnson
2015-08-11 20:55 Richard Yao
2015-08-11 20:48 Richard Yao
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2015-08-11 18:37 Richard Farina
2014-07-15  7:27 Robin H. Johnson
2014-04-14  1:16 Robin H. Johnson
2014-03-16  0:41 Richard Yao
2014-03-16  0:26 Richard Yao
2014-03-16  0:26 Richard Yao
2014-03-16  0:26 Richard Yao
2014-02-27  4:47 Richard Yao
2014-02-27  4:47 Richard Yao
2013-06-09 13:57 [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-09 13:57 ` [gentoo-commits] proj/genkernel:master " Richard Yao
2013-06-09 13:57 [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-09 13:48 ` [gentoo-commits] proj/genkernel:master " Richard Yao
2013-06-09 13:57 [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-09 13:48 ` [gentoo-commits] proj/genkernel:master " Richard Yao
2013-06-09 13:57 Richard Yao
2013-06-09 13:57 Richard Yao
2013-06-09 13:48 Richard Yao
2013-06-09 13:48 Richard Yao
2013-06-09 13:48 Richard Yao
2013-06-09 13:48 Richard Yao
2013-06-06  3:36 [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-03 23:49 ` [gentoo-commits] proj/genkernel:master " Richard Yao
2013-04-29  8:56 Fabio Erculiani
2013-04-25  6:22 Fabio Erculiani
2013-04-25  6:22 Fabio Erculiani
2013-04-25  6:22 Fabio Erculiani
2013-04-25  6:22 Fabio Erculiani
2012-11-22 22:20 Richard Yao
2012-11-11 17:04 Richard Yao
2012-11-02 17:06 Robin H. Johnson
2012-10-13 18:05 Robin H. Johnson
2012-08-28 12:13 Peter Hjalmarsson
2012-08-12 23:22 Sebastian Pipping
2012-07-27 23:05 Sebastian Pipping
2012-07-21 17:44 Richard Yao
2012-07-20  3:02 Richard Yao
2012-07-20  0:39 Richard Yao
2012-07-19 20:41 Richard Yao
2012-07-19 20:12 Richard Yao
2012-07-17 20:25 Richard Yao
2012-07-17 20:20 Richard Yao
2012-07-17 20:06 Richard Yao
2012-07-17 20:06 Richard Yao
2012-07-17 20:03 Richard Yao
2012-07-17 20:03 Richard Yao
2012-06-11 17:35 Sebastian Pipping
2012-06-11 17:35 Sebastian Pipping
2012-05-02  2:51 Robin H. Johnson
2012-05-01 19:44 Robin H. Johnson
2012-05-01 19:44 Robin H. Johnson
2012-05-01 19:44 Robin H. Johnson
2012-04-12  4:21 Sebastian Pipping
2012-04-12  4:21 Sebastian Pipping
2012-04-12  4:21 Sebastian Pipping
2012-04-12  4:21 Sebastian Pipping
2012-03-17  1:27 Sebastian Pipping
2012-03-17  1:27 Sebastian Pipping
2012-03-12 19:39 Robin H. Johnson
2012-02-03 14:16 Sebastian Pipping
2012-01-08  2:29 Robin H. Johnson
2012-01-06  4:29 Robin H. Johnson
2011-09-22 22:44 Robin H. Johnson
2011-09-22  7:45 Robin H. Johnson
2011-06-08 15:52 Peter Hjalmarsson
2011-05-31 18:50 Sebastian Pipping
2011-05-12 14:40 Amadeusz Żołnowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439317276.466e9c7220d6c656113457ddf5aa35c5265a6b7c.zerochaos@gentoo \
    --to=zerochaos@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox