Re: Request for enhancement [Re: Question about /etc/fstab in Squeeze]
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-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/bd8e-3bd3-4179-88e4-357b77aeb...@pobox.com
Re: Request for enhancement [Re: Question about /etc/fstab in Squeeze]
On 20101221_031624, Tom H wrote: > On Mon, Dec 20, 2010 at 5:37 PM, 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. > > > > 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 "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 pecon...@mesanetworks.net -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101221185623.ge21...@big.lan.gnu
Re: Request for enhancement [Re: Question about /etc/fstab in Squeeze]
On 20101221_040215, Tom H wrote: > On Mon, Dec 20, 2010 at 8:10 PM, Paul E Condon > 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 UUID
Re: Request for enhancement [Re: Question about /etc/fstab in Squeeze]
On Mon, Dec 20, 2010 at 8:10 PM, Paul E Condon 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-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktik+gbawrye3tuc5fxcuvppphqgpefcd9tjh-...@mail.gmail.com
Re: Request for enhancement [Re: Question about /etc/fstab in Squeeze]
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 pecon...@mesanetworks.net -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101221011035.gb21...@big.lan.gnu
Re: Request for enhancement [Re: Question about /etc/fstab in Squeeze]
On Mon, Dec 20, 2010 at 5:37 PM, 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. > > 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 "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-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktikaemehbaseacnzoq6w_hcabkutx9idofbmg...@mail.gmail.com
Re: Request for enhancement [Re: Question about /etc/fstab in Squeeze]
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-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/545834701.1198861.1292884630008.javamail.r...@md01.wow.synacor.com
Re: Request for enhancement [Re: Question about /etc/fstab in Squeeze]
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 -- -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d0f390e.2020...@gmx.de