Re: UUID - autmatically entries?
Hi,
2011/5/22 Miguel Figueiredo <elmig@debianpt.org>:
> On Sunday 22 May 2011 07:49:57 Rick Thomas wrote:
>> On May 21, 2011, at 11:09 PM, Ron Johnson wrote:
>> > Since like many others you find UUIDs a huge jumbled pile of human
>> > meaninglessness, then by all means create labels for all your fixed
>> > devices, and modify your /etc/fstab accordingly. Many of us have
>> > done so.
>> Wouldn't it be nice if the Debian installer would offer (at some
>> appropriate priority) the option to create labels and use them when
>> partitioning disks?
> Actually there are at least 2 wishlist bugs on the d-i with such request
> (#488322 and #488321).
Attaching patches for inline review....
If none complains, I'd like to enable UUID based support on d-i.
>From 35a101a2cfe554631b4b80c8cdf9dc9b3817edee Mon Sep 17 00:00:00 2001
From: Guido Guenther <agx@sigxcpu.org>
Date: Fri, 27 Jun 2008 22:41:48 +0200
Subject: [PATCH] add support for labeled mounts
---
.../partman-target/finish.d/fstab_hd_entries | 10 +++++++++-
.../partman-target/finish.d/mount_partitions | 3 ++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/packages/partman/partman-target/finish.d/fstab_hd_entries
b/packages/partman/partman-target/finish.d/fstab_hd_entries
index 9c1429d..4b9d260 100755
--- a/packages/partman/partman-target/finish.d/fstab_hd_entries
+++ b/packages/partman/partman-target/finish.d/fstab_hd_entries
@@ -7,7 +7,8 @@ fstab=$(
[ -x "$i" ] || continue
$i
done |
- while read fs mp type options dump pass; do
+ while read fs mp type options dump pass label; do
+ [ -z "$label" ] || fs=$label
echo $mp $fs $type $options $dump $pass
done |
sort |
@@ -16,8 +17,11 @@ fstab=$(
(/*)
printf "%-15s %-15s %-7s %-15s %-7s %s\n"
"$(mapdevfs $fs)" "${mp}" "$type" "$options" "$dump" "$pass"
;;
+ (LABEL=*)
+ printf "%-15s %-15s %-7s %-15s %-7s %s\n"
"$fs" "${mp}" "$type" "$options" "$dump" "$pass"
+ ;;
esac
done
)
echo "$fstab" >>/target/etc/fstab
diff --git a/packages/partman/partman-target/finish.d/mount_partitions
b/packages/partman/partman-target/finish.d/mount_partitions
index 9c8499e..58b8cb2 100755
--- a/packages/partman/partman-target/finish.d/mount_partitions
+++ b/packages/partman/partman-target/finish.d/mount_partitions
@@ -7,7 +7,8 @@ fstab=$(
[ -x "$i" ] || continue
$i
done |
- while read fs mp type options dump pass; do
+ while read fs mp type options dump pass label; do
+ # dont try labeled mounts since busybox cant handle this
echo $mp $fs $type $options $dump $pass
done |
sort |
--
1.5.6
>From b40d74b1645aaaa607d9db65104d7e6a4bbf331a Mon Sep 17 00:00:00 2001
From: Guido Guenther <agx@sigxcpu.org>
Date: Fri, 27 Jun 2008 22:42:32 +0200
Subject: [PATCH] allow for labeled mounts
---
packages/partman/partman-ext3/fstab.d/ext3 | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/packages/partman/partman-ext3/fstab.d/ext3
b/packages/partman/partman-ext3/fstab.d/ext3
index 2a064ee..b0d4d36 100755
--- a/packages/partman/partman-ext3/fstab.d/ext3
+++ b/packages/partman/partman-ext3/fstab.d/ext3
@@ -10,6 +10,10 @@ for dev in $DEVICES/*; do
[ $fs != free ] || continue
[ -f "$id/method" ] || continue
[ -f "$id/acting_filesystem" ] || continue
+ if [ -f "$id/labeled_mount" -a -s "$id/label" ]; then
+ label="LABEL="$(cat $id/label | \
+ sed 's/\(................\).*/\1/g')
+ fi
method=$(cat $id/method)
filesystem=$(cat $id/acting_filesystem)
case "$filesystem" in
@@ -31,7 +35,7 @@ for dev in $DEVICES/*; do
else
pass=2
fi
- echo "$path" "$mountpoint" ext3 $options 0 $pass
+ echo "$path" "$mountpoint" ext3 $options 0 $pass $label
;;
esac
done
--
1.5.6
--
Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.
<free spam>
-- Would you like to make a donation for Debian Conference?
** http://debconf11.debconf.org/payments.xhtml **
</free spam>
Reply to: