From: VWWall on
Marcel Bruinsma wrote:
> Am Donnerstag, 29. Oktober 2009 06:51, VWWall a écrit :
>
>> Marcel Bruinsma wrote:
>>> Am Mittwoch, 28. Oktober 2009 20:11, VWWall a écrit :
>>>
>>>> Strangely enough, openSUSE already has /dev/disk/by-label,
>>>> which shows *all* partitions that have been given labels.
>>> Actually, only file system labels are in /dev/disk/by-label,
>>> not the partition labels assigned upon creation with
>>> parted. Partitions used as swap or raid member do
>>> not show.
>>>
>> Those assigned partition numbers are shown at the end
>> of entries in /dev/disk/by-id and also in /dev/disk/by-path.
>
> Yes, but partitions also have a label, if you create them with the
> parted command mkpart, e.g. 'mkpart SuSE_root 64 16777279'.
> These labels (e.g. SuSE_root) are stored in the partition table
> inside the disk label, not on the partition itself.
>
I don't know what you mean by "inside the disk label".

>> I used /sbin/e2label to label partition sda11 as "PCLOS_root".
>> It shows in /dev/disk/by-label as such.
>
> That is the label of the file system created on partition sda11,
> which is stored in the super block of that file system (for ext
> file systems at least, other file system types might store it in
> a different location of the file system).
>
You can see the partition label, (Filesystem volume name:) and UUID by
using: tune2fs -l /dev/sdax

My point is that information about a partition's label is easily
available to the system. Why not use it "My Computer", "System
Storage", or whatever and allow the user to mount/unmount easily
identified partitions? If no label use the partition number.

With "My Computer" in open SUSE, you have to right click "Properties" to
find info about the partition, other than its truncated size.
The one partition I added to fstab, (sda11), shows its "label" in the
General tab of Properties, but the "Windows" partition shows only "30G
Media" there, as do the mounted SUSE partitions. You must use other
Tabs to find even their mount points.

--
Virg Wall
From: VWWall on
Shmuel (Seymour J.) Metz wrote:
> In <slrnhege5q.ejo.houghi(a)penne.houghi>, on 10/28/2009
> at 01:27 PM, houghi <houghi(a)houghi.org.invalid> said:
>
>> "My Computer" is a Window-ism that is not needed when you are looking at
>> partitions.
>
> I don't have a windoze system to test with. Does the 'doze "My Computer"
> show all partitions and logical drives, or only some of them? Does it show
> the drive and partition labels?
>
The equivalent of "My Computer" in Windows is Windows Explorer. It
normally shows only partitions formatted as FAT, FAT32, (vfat), or NTFS.
You can add a third party application which will show ext2 and ext3
partitions. There is even the ability to assign them "Drive Letters"
ala Windows.

http://www.chrysocome.net/explore2fs

This does not recognize Linux file permissions, so anyone is "super
root", with r/w access to any file. Given the difference in the way
Windows treats newlines in .txt files vs UNIX, one can easily get into
trouble. Most config files don't care. I've sometimes cheated and made
a bunch of config changes in several Linux distros using explore2fs.

There is another application called ext2fs which "installs a pure kernel
mode file system driver" for Windows.

http://www.fs-driver.org/

See: http://e2fsprogs.sourceforge.net/ext2.html

> FWIW, the OS/2 Warp Drives object only shows drive labels if you select
> Properties for the drive object, even in a Details view. I have no idea if
> that is consistent with windoze behavior. I normally use LVM or the label
> command if I want to know what a drive label is.
>
blkid will show you all of them plus UUID's!, partition numbers and file
type!

--
Virg Wall
From: Marcel Bruinsma on
Am Donnerstag, 29. Oktober 2009 21:09, VWWall a écrit :

> Marcel Bruinsma wrote:
>
>> Yes, but partitions also have a label, if you create them with the
>> parted command mkpart, e.g. 'mkpart SuSE_root 64 16777279'.
>> These labels (e.g. SuSE_root) are stored in the partition table
>> inside the disk label, not on the partition itself.
>>
> I don't know what you mean by "inside the disk label".

Sorry, "disk label" (aka "disk pack label") is typical unix terminology.
This is a data structure that contains information about the disk.
There are many different types, but in general any disk label
contains at least a magic number (to identify the type of the label),
some sort of checksum (to verify the integrity of the information),
the number of partitions (disk slices) on the disk, and the crucial
partition table. Type dependant information is for example the
name of the disk (bsd disk label), the maximum number of entries
in the partition table (gpt disk label), the geometry of the disk,
a system dependant identifier, location of a backup copy, etc.
The disk label is often (but not necessarily) located in the first
block(s) of a disk (i.e. starting at LBA0). If a backup is available,
it's typically located near the end of the disk.

The partition table contains an entry for each created partition,
which must at least describe the start and end (or size) of the
partition. Other information included in a partition table entry
can describe the intended use of a partition (e.g. ext3, ufs, ffs,
xfs, zfs for a file system; swap for a swap area; raid for a member
of a raid array; lvm for a pv of a volume group; or raw, database,
or even unused), specify a partition identifier (e.g. UUID, GUID),
or specify the label (name) of the partition.

The name of a partition in the partition table is a separate entity,
indepentent of the name of a file system (mke2fs, tune2fs) or a
swap area (mkswap). Those latter names are stored somewhere
on the partition, e.g. in a super block that is part of the file system.

An unused partition, for example, can have a partition name in
the partition table. Being unused, there won't be a file system (or
swap area) name.

--
printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \
156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\)
# Live every life as if it were your last! #
From: VWWall on
Marcel Bruinsma wrote:
> Am Donnerstag, 29. Oktober 2009 21:09, VWWall a écrit :
>
>> Marcel Bruinsma wrote:
>>
>>> Yes, but partitions also have a label, if you create them with the
>>> parted command mkpart, e.g. 'mkpart SuSE_root 64 16777279'.
>>> These labels (e.g. SuSE_root) are stored in the partition table
>>> inside the disk label, not on the partition itself.
>>>
>> I don't know what you mean by "inside the disk label".
>
> Sorry, "disk label" (aka "disk pack label") is typical unix terminology.
> This is a data structure that contains information about the disk.
> There are many different types, but in general any disk label
> contains at least a magic number (to identify the type of the label),
> some sort of checksum (to verify the integrity of the information),
> the number of partitions (disk slices) on the disk, and the crucial
> partition table. Type dependant information is for example the
> name of the disk (bsd disk label), the maximum number of entries
> in the partition table (gpt disk label), the geometry of the disk,
> a system dependant identifier, location of a backup copy, etc.
> The disk label is often (but not necessarily) located in the first
> block(s) of a disk (i.e. starting at LBA0). If a backup is available,
> it's typically located near the end of the disk.
>
Thanks for the great explanation. I got into computing through CP/M and
DOS, so don't know too much about UNIX.

> The partition table contains an entry for each created partition,
> which must at least describe the start and end (or size) of the
> partition. Other information included in a partition table entry
> can describe the intended use of a partition (e.g. ext3, ufs, ffs,
> xfs, zfs for a file system; swap for a swap area; raid for a member
> of a raid array; lvm for a pv of a volume group; or raw, database,
> or even unused), specify a partition identifier (e.g. UUID, GUID),
> or specify the label (name) of the partition.
>
This is like the boot record partition table used in DOS. Linux leaves
this un-touched in writing GRUB to the MBR.

> The name of a partition in the partition table is a separate entity,
> indepentent of the name of a file system (mke2fs, tune2fs) or a
> swap area (mkswap). Those latter names are stored somewhere
> on the partition, e.g. in a super block that is part of the file system.
>
Early DOS boot records had a "disk_label" near the beginning. This is
now in the file allocation table, (FAT), in FAT32.

> An unused partition, for example, can have a partition name in
> the partition table. Being unused, there won't be a file system (or
> swap area) name.
>
I found I can see all this with: dump2fs For example:

[root(a)localhost vwall]# dumpe2fs /dev/hdb8
dumpe2fs 1.41.9 (22-Aug-2009)
Filesystem volume name: hdb8_BOOT
Last mounted on: <not available>
Filesystem UUID: c0fa6d82-d1fd-4fcc-9337-bb5d9a6d75f7
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: resize_inode dir_index filetype sparse_super
Filesystem flags: signed_directory_hash
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux

For this partition, I had named it hdb8_BOOT using e2label.

Thanks again for clarifying some of the nomenclature!

--
Virg Wall
From: Shmuel Metz on


In <slrnhege5q.ejo.houghi(a)penne.houghi>, on 10/28/2009
at 01:27 PM, houghi <houghi(a)houghi.org.invalid> said:

>What I do when I am done with YaST is edit fstab so that the order is in
>an order I like. It will change lines, not delete them and add at the end
>afterwards.

I don't recall the details, but I've had cases where I edited a
configuration file manually and Yast later overwrote my changes. I've
found it to be safer to just use Yast across the board, and only edit
those files that Yast doesn't handle.

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap(a)library.lspace.org