FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 12-19-2010, 03:44 PM
Rick Thomas
 
Default Request for enhancement

On Dec 19, 2010, at 8:09 AM, Stephen Powell wrote:


Caution: reformatting a swap partition with mkswap will change the
uuid unless the existing one is explicitly re-specified during
formatting.


Which raises a question that has been on my mind for a while...

The Debian Installer insists on reformatting any swap partitions it
finds, even though that partition, specified by UUID, is probably in
use in the /etc/fstab for some other instantiation of Linux -- thus
breaking the other Linux, leaving it without a usable swap partition.


Would it be possible to either:

1) have the option (default) of *not* reformatting a swap partition
or
2) if reformatting is necessary or desired, have the option (default)
of preserving the UUID.

or
3) using "LABEL=" instead of "UUID=" in fstab for swap partitions, if
it turns out to be easier to preserve a LABEL than a UUID.


Rick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 25D65ECD-1CED-4B5B-9B81-F562ED14CD46@pobox.com">http://lists.debian.org/25D65ECD-1CED-4B5B-9B81-F562ED14CD46@pobox.com
 
Old 12-20-2010, 09:37 PM
Stephen Powell
 
Default Request for enhancement

On Sun, 19 Dec 2010 11:44:35 -0500 (EST), Rick Thomas wrote:
> On Dec 19, 2010, at 8:09 AM, Stephen Powell wrote:
>> Caution: reformatting a swap partition with mkswap will change the
>> uuid unless the existing one is explicitly re-specified during
>> formatting.
>
> Which raises a question that has been on my mind for a while...
>
> The Debian Installer insists on reformatting any swap partitions it
> finds, even though that partition, specified by UUID, is probably in
> use in the /etc/fstab for some other instantiation of Linux -- thus
> breaking the other Linux, leaving it without a usable swap partition.
>
> Would it be possible to either:
>
> 1) have the option (default) of *not* reformatting a swap partition
> or
> 2) if reformatting is necessary or desired, have the option (default)
> of preserving the UUID.
> or
> 3) using "LABEL=" instead of "UUID=" in fstab for swap partitions, if
> it turns out to be easier to preserve a LABEL than a UUID.

>From what I've heard, the Ubuntu installer has the same problem,
and it can ruin a functioning Debian system too. Of course, that's
not something the Debian installer team can do anything about.
That's outside of their jurisdiction. But many Ubuntu people, both
users and developers, are known to monitor Debian's lists. Let's
hope that some of the right people are listening.

--
.'`. Stephen Powell
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 545834701.1198861.1292884630008.JavaMail.root@md01 .wow.synacor.com">http://lists.debian.org/545834701.1198861.1292884630008.JavaMail.root@md01 .wow.synacor.com
 
Old 12-21-2010, 12:10 AM
Paul E Condon
 
Default Request for enhancement

On 20101220_173710, Stephen Powell wrote:
> On Sun, 19 Dec 2010 11:44:35 -0500 (EST), Rick Thomas wrote:
> > On Dec 19, 2010, at 8:09 AM, Stephen Powell wrote:
> >> Caution: reformatting a swap partition with mkswap will change the
> >> uuid unless the existing one is explicitly re-specified during
> >> formatting.
> >
> > Which raises a question that has been on my mind for a while...
> >
> > The Debian Installer insists on reformatting any swap partitions it
> > finds, even though that partition, specified by UUID, is probably in
> > use in the /etc/fstab for some other instantiation of Linux -- thus
> > breaking the other Linux, leaving it without a usable swap partition.
> >
> > Would it be possible to either:
> >
> > 1) have the option (default) of *not* reformatting a swap partition
> > or
> > 2) if reformatting is necessary or desired, have the option (default)
> > of preserving the UUID.
> > or
> > 3) using "LABEL=" instead of "UUID=" in fstab for swap partitions, if
> > it turns out to be easier to preserve a LABEL than a UUID.

I am of the opinion that the issue of multibooting under grub and udev
is in need of major rethinking. The /boot/grub/ directory is just too
cluttered to be a tight design, but --- who am I to have any right to
an opinion?

I think the facilities exist for an interested and concerned user to
write labels on all h(is|er) partitions, create a small database of
UUID-Label pairs for all partitions and a script that rewrites the
UUIDs to their prior values and rewrites /etc/fstab to use the old
UUIDs after they have been restored. This would allow the concerned
user to ride out the twists and turns of future revision of this can
of worms.

My contribution to thinking about this is that UUID is crazy overkill
as to uniqueness of tags on partitions. Much better would be an
automatic writing of locally unique labels on any partitions that are
unlabeled. (The ones that are already labeled, are already locally
unique.) The locally unique labels might be the current kernal device
assignment, e.g. sda1, sdb5, etc. i.e. very short and very
mnemonic. For swap, there seems not to be a label field, but the
database could include however many UUIDs as there are swap
partitions, and the rewrite script could match UUID with partition
based on the size of the partition. (Does it really matter is two swap
partition of the same size get their UUIDs swapped during an install
of another OS?) Properly done, this idea could remain invisible to the
developers who insist on using UUIDs.

>
> >From what I've heard, the Ubuntu installer has the same problem,
> and it can ruin a functioning Debian system too. Of course, that's
> not something the Debian installer team can do anything about.
> That's outside of their jurisdiction. But many Ubuntu people, both
> users and developers, are known to monitor Debian's lists. Let's
> hope that some of the right people are listening.

--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101221011035.GB21486@big.lan.gnu">http://lists.debian.org/20101221011035.GB21486@big.lan.gnu
 
Old 12-21-2010, 07:16 AM
Tom H
 
Default Request for enhancement

On Mon, Dec 20, 2010 at 5:37 PM, Stephen Powell <zlinuxman@wowway.com> wrote:
> On Sun, 19 Dec 2010 11:44:35 -0500 (EST), Rick Thomas wrote:
>> On Dec 19, 2010, at 8:09 AM, Stephen Powell wrote:
>>>
>>> Caution: reformatting a swap partition with mkswap will change the
>>> uuid unless the existing one is explicitly re-specified during
>>> formatting.
>>
>> Which raises a question that has been on my mind for a while...
>>
>> The Debian Installer insists on reformatting any swap partitions it
>> finds, even though that partition, specified by UUID, is probably in
>> use in the /etc/fstab for some other instantiation of Linux -- thus
>> breaking the other Linux, leaving it without a usable swap partition.
>>
>> Would it be possible to either:
>>
>> 1) have the option (default) of *not* reformatting a swap partition
>> * * * * * * * or
>> 2) if reformatting is necessary or desired, have the option (default)
>> of preserving the UUID.
>> * * * * * * * or
>> 3) using "LABEL=" instead of "UUID=" in fstab for swap partitions, if
>> it turns out to be easier to preserve a LABEL than a UUID.
>
> From what I've heard, the Ubuntu installer has the same problem,
> and it can ruin a functioning Debian system too. *Of course, that's
> not something the Debian installer team can do anything about.
> That's outside of their jurisdiction. *But many Ubuntu people, both
> users and developers, are known to monitor Debian's lists.

I used to have a netbook on which I installed multiple distributions
and I had to run "mkswap - U <uuid>"after on any new
install/re-install and edit its fstab. Both the Live CD and the
alternate CD Ubuntu installers run mkswap (the alternate is basically
the Debian installer) just like d-i.

We had a thread on d-u about this some time ago and someone said that
the expert installation mode allows you to disable mkswap from
running.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikaemeHBASEacnzoQ6w_HcabkutX9idofBmgrTy@mail .gmail.com">http://lists.debian.org/AANLkTikaemeHBASEacnzoQ6w_HcabkutX9idofBmgrTy@mail .gmail.com
 
Old 12-21-2010, 08:02 AM
Tom H
 
Default Request for enhancement

On Mon, Dec 20, 2010 at 8:10 PM, Paul E Condon
<pecondon@mesanetworks.net> wrote:
> On 20101220_173710, Stephen Powell wrote:
>> On Sun, 19 Dec 2010 11:44:35 -0500 (EST), Rick Thomas wrote:
>>>
>>> The Debian Installer insists on reformatting any swap partitions it
>>> finds, even though that partition, specified by UUID, is probably in
>>> use in the /etc/fstab for some other instantiation of Linux -- thus
>>> breaking the other Linux, leaving it without a usable swap partition.
>>>
>>> Would it be possible to either:
>>>
>>> 1) have the option (default) of *not* reformatting a swap partition
>>> or
>>> 2) if reformatting is necessary or desired, have the option (default)
>>> of preserving the UUID.
>>> or
>>> 3) using "LABEL=" instead of "UUID=" in fstab for swap partitions, if
>>> it turns out to be easier to preserve a LABEL than a UUID.
>
> I think the facilities exist for an interested and concerned user to
> write labels on all h(is|er) partitions, create a small database of
> UUID-Label pairs for all partitions and a script that rewrites the
> UUIDs to their prior values and rewrites /etc/fstab to use the old
> UUIDs after they have been restored.
>
> My contribution to thinking about this is that UUID is crazy overkill
> as to uniqueness of tags on partitions. Much better would be an
> automatic writing of locally unique labels on any partitions that are
> unlabeled. (The ones that are already labeled, are already locally
> unique.) The locally unique labels might be the current kernal device
> assignment, e.g. sda1, sdb5, etc. i.e. very short and very
> mnemonic. For swap, there seems not to be a label field, but the
> database could include however many UUIDs as there are swap
> partitions, and the rewrite script could match UUID with partition
> based on the size of the partition. (Does it really matter is two swap
> partition of the same size get their UUIDs swapped during an install
> of another OS?).

I see three problems with your proposal - other than complexity:

1. If you're multibooting, swap's shared between all the installs so,
unless there's an option to prevent mkswap from running at install
time, and since you're mounting swap through its UUID, using labels
for the other partitions isn't going to help. By the way, an install
isn't broken if swap's UUID is changed. It's just that swap's not
mounted at boot and you have to mount it post-boot - and fix the UUID
issue either by editing fstab in the old install(s) or running "mkswap
-U ..." in the new install and editing its fstab.

2. Using kernel device names as labels' fine, until you add a disk to
your box and the kernel device names change. You can then end up with
sdd1 being labeled sdb1. To add a twist, imagine someone who's in that
situation, posts to a mailing list, and confuses everyone by referring
to sdb1 both as the device and the label.

3. If you use labels to mount partitions, label them with kernel
device names, and move a disk to another box as an extra disk, you'll
end up with multiple partitions with the same labels - and boot
confusion. If you've ever used Fedora/RHEL/CentOS with their default
root label, you'll know how much fun that is.

4. If you really want persistent device names, you can use
"/dev/disk/by-id" like grub2 in its device.map (based on some
multi-boot problems that I've helped out on online, I think that
OpenSuse does this).


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTik+gBawRye3TuC5fXcUvpPpHQgpEFcd9TJH-AcP@mail.gmail.com">http://lists.debian.org/AANLkTik+gBawRye3TuC5fXcUvpPpHQgpEFcd9TJH-AcP@mail.gmail.com
 
Old 12-21-2010, 03:09 PM
Paul E Condon
 
Default Request for enhancement

On 20101221_040215, Tom H wrote:
> On Mon, Dec 20, 2010 at 8:10 PM, Paul E Condon
> <pecondon@mesanetworks.net> wrote:
> > On 20101220_173710, Stephen Powell wrote:
> >> On Sun, 19 Dec 2010 11:44:35 -0500 (EST), Rick Thomas wrote:
> >>>
> >>> The Debian Installer insists on reformatting any swap partitions it
> >>> finds, even though that partition, specified by UUID, is probably in
> >>> use in the /etc/fstab for some other instantiation of Linux -- thus
> >>> breaking the other Linux, leaving it without a usable swap partition.
> >>>
> >>> Would it be possible to either:
> >>>
> >>> 1) have the option (default) of *not* reformatting a swap partition
> >>> or
> >>> 2) if reformatting is necessary or desired, have the option (default)
> >>> of preserving the UUID.
> >>> or
> >>> 3) using "LABEL=" instead of "UUID=" in fstab for swap partitions, if
> >>> it turns out to be easier to preserve a LABEL than a UUID.
> >
> > I think the facilities exist for an interested and concerned user to
> > write labels on all h(is|er) partitions, create a small database of
> > UUID-Label pairs for all partitions and a script that rewrites the
> > UUIDs to their prior values and rewrites /etc/fstab to use the old
> > UUIDs after they have been restored.
> >
> > My contribution to thinking about this is that UUID is crazy overkill
> > as to uniqueness of tags on partitions. Much better would be an
> > automatic writing of locally unique labels on any partitions that are
> > unlabeled. (The ones that are already labeled, are already locally
> > unique.) The locally unique labels might be the current kernal device
> > assignment, e.g. sda1, sdb5, etc. i.e. very short and very
> > mnemonic. For swap, there seems not to be a label field, but the
> > database could include however many UUIDs as there are swap
> > partitions, and the rewrite script could match UUID with partition
> > based on the size of the partition. (Does it really matter is two swap
> > partition of the same size get their UUIDs swapped during an install
> > of another OS?).
>
> I see three problems with your proposal - other than complexity:

The real complexity is in the disconnect between the internals of the
Linux kernel and the rest of the real world, IMHO. It is a complexity
which we are struggling to learn to live with.

>
> 1. If you're multibooting, swap's shared between all the installs so,
> unless there's an option to prevent mkswap from running at install
> time, and since you're mounting swap through its UUID, using labels
> for the other partitions isn't going to help. By the way, an install
> isn't broken if swap's UUID is changed. It's just that swap's not
> mounted at boot and you have to mount it post-boot - and fix the UUID
> issue either by editing fstab in the old install(s) or running "mkswap
> -U ..." in the new install and editing its fstab.

If one is NOT multibooting, it hardly matters to the user how various
partitions are identified within the internal workings of the OSs (plural).
The UUID of the swap partitions IS mentioned in the /etc/fstab of the
OS that one is booting. If that UUID in the /etc/fstab is no longer
valid, the boot of that OS is, I believe, bollixed. I think there was
a time when swap partitions were not mentioned in /etc/fstab. If they
must be mentioned now, then the several different /etc/fstab(s) of the
several different OSs must be kept consistent with the current value
of UUID on the actual partition. I think something along the lines of
my proposal could be made to work at that. I might be mistaken. I think
you might be mistaken about the nature of the problem that I am trying
to address.

>
> 2. Using kernel device names as labels' fine, until you add a disk to
> your box and the kernel device names change. You can then end up with
> sdd1 being labeled sdb1. To add a twist, imagine someone who's in that
> situation, posts to a mailing list, and confuses everyone by referring
> to sdb1 both as the device and the label.

The intent is to have block devices labeled in such a way that the
user can keep track of block devices and how their UUIDs change over
time. With this information available, the user can script a re-write
of /etc/fstab to conform to the most recent rewriting of UUIDs on
disk. It is intended to allow the user a cryptic (hidden) alternative
to the naming convention that is being promoted by some. Properly
done, the advocates of UUID need never know. But it is not a full
design and implementation, and it might be tricky to do.

>
> 3. If you use labels to mount partitions, label them with kernel
> device names, and move a disk to another box as an extra disk, you'll
> end up with multiple partitions with the same labels - and boot
> confusion. If you've ever used Fedora/RHEL/CentOS with their default
> root label, you'll know how much fun that is.

The proposal is to use labels as surrogate keys in a database of historical
values of UUIDs. So that the user can keep the different OS instances in
sync with the UUIDs currently in use on the actual partitions. Actually
I have not used Fedora/RHEL/CentOS. If you say it's bad, that's likely so.
I left the RedHat world about the time of Y2K and never looked back.

>
> 4. If you really want persistent device names, you can use
> "/dev/disk/by-id" like grub2 in its device.map (based on some
> multi-boot problems that I've helped out on online, I think that
> OpenSuse does this).

For myself, I have decided to simply give up on multiboot until the
developers have figured out a way to make it work again. Maybe it does
work, and all the complaints are the result of user gross
misunderstanding. But I don't hear murmurings of progress that
encourage me to try again, soon.

Others are complaining and I thought of this idea of developing a
cryptic database in which terse mnemonic tags are used as surrogate
key values in the database and the 'data' in the database is the UUID
previously in use. Actually, I thought of the idea some time ago when
I realized that UUID was useless to me in keeping track of how I
organize my hard drives.

IMHO, the entries in "/dev/disk/by-id" are not terse and not mnemonic
in the sense of conveying information about intended use. Mnemonic
keys seem to be the way that the human mind retrieves data.

Thanks for your comments. I think this issue could benefit from more
discussion.
--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101221160944.GD21486@big.lan.gnu">http://lists.debian.org/20101221160944.GD21486@big.lan.gnu
 
Old 12-21-2010, 05:56 PM
Paul E Condon
 
Default Request for enhancement

On 20101221_031624, Tom H wrote:
> On Mon, Dec 20, 2010 at 5:37 PM, Stephen Powell <zlinuxman@wowway.com> wrote:
> > On Sun, 19 Dec 2010 11:44:35 -0500 (EST), Rick Thomas wrote:
> >> On Dec 19, 2010, at 8:09 AM, Stephen Powell wrote:
> >>>
> >>> Caution: reformatting a swap partition with mkswap will change the
> >>> uuid unless the existing one is explicitly re-specified during
> >>> formatting.
> >>
> >> Which raises a question that has been on my mind for a while...
> >>
> >> The Debian Installer insists on reformatting any swap partitions it
> >> finds, even though that partition, specified by UUID, is probably in
> >> use in the /etc/fstab for some other instantiation of Linux -- thus
> >> breaking the other Linux, leaving it without a usable swap partition.
> >>
> >> Would it be possible to either:
> >>
> >> 1) have the option (default) of *not* reformatting a swap partition
> >> * * * * * * * or
> >> 2) if reformatting is necessary or desired, have the option (default)
> >> of preserving the UUID.
> >> * * * * * * * or
> >> 3) using "LABEL=" instead of "UUID=" in fstab for swap partitions, if
> >> it turns out to be easier to preserve a LABEL than a UUID.
> >
> > From what I've heard, the Ubuntu installer has the same problem,
> > and it can ruin a functioning Debian system too. *Of course, that's
> > not something the Debian installer team can do anything about.
> > That's outside of their jurisdiction. *But many Ubuntu people, both
> > users and developers, are known to monitor Debian's lists.
>
> I used to have a netbook on which I installed multiple distributions
> and I had to run "mkswap - U <uuid>"after on any new
> install/re-install and edit its fstab. Both the Live CD and the
> alternate CD Ubuntu installers run mkswap (the alternate is basically
> the Debian installer) just like d-i.
>
> We had a thread on d-u about this some time ago and someone said that
> the expert installation mode allows you to disable mkswap from
> running.

Long ago Debian install scripts made DHCP be the default for setting
the IP address. Since then I have always used expert because I have a
personal preference for controlling what IP address are in use.

I have never noticed an option disabling mkswap during install. Of
course you can use mkswap to install your preferred UUID after the
install is complete, IF you have taken care to record your preferred
UUID (or if you are a Cylon who carries such data effortlessly in your
internal memory banks.)

Otherwise, you can mount each of the partitions that contain an
alternative OS and edit the new UUID into the older versions of
/etc/fstab. Or mount one of the older OS partitions (on /mnt), read
the prior UUID, edit it into the new /etc/fstab and use mkswap -U to
write it back onto the partition. Somehow this reminds me of the old
saying, "Real programmers write code in octal."

--
Paul E Condon
pecondon@mesanetworks.net


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20101221185623.GE21486@big.lan.gnu">http://lists.debian.org/20101221185623.GE21486@big.lan.gnu
 
Old 12-22-2010, 06:33 AM
Rick Thomas
 
Default Request for enhancement

On Dec 20, 2010, at 3:07 AM, Herbert Kaminski wrote:


Rick Thomas schrieb:

2) if reformatting is necessary or desired, have the option
(default) of preserving the UUID.


This would be an useful option for all partitions, not only for swap,
for people like me who dare to test DI in a spare partition of their
normal workstation.

cu
Herbert


Here's an easy way out...

Add an option to mkswap (and mkfs, if that seems appropriate -- right
now, I think swap is critical and the other filesystem types are
merely annoying. YMMV)
that says "assume that the filesystem is currently formatted as swap
and preserve the UUID while re-formatting it according to the other
options".


Then modify the installer partitioner code to use that option by
default when invoking mkswap.


Adding the code to mkswap should be a piece of cake. (I'm on vacation
right now. I'll have a crack at it when I get back to civilization if
other things don't have higher priority by then.) I don't know enough
about the installer partitioner code to tell whether adding an option
to invocations of mkswap is easy or hard. I'm guessing easy, but I'm
not volunteering to do it.


Rick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: BD8E0000-3BD3-4179-88E4-357B77AEB6CA@pobox.com">http://lists.debian.org/BD8E0000-3BD3-4179-88E4-357B77AEB6CA@pobox.com
 

Thread Tools




All times are GMT. The time now is 10:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org