like in "i'm going to slow my SATA drive down to IDE range"?am going to install Gentoo Linux onto an old hardware, which motherboard is having both IDE and SATA hard drives. I have two IDE and one SATA hard drives connected, and plan to do RAID on them.

label is set on a fs, and everyone use a partition for a disk, but you can just use a whole disk without one (like an usbkey). But there's no real point in having sda instead of sda1, on both label will works.midnite wrote:But it seems by-label cannot refer to /dev/sda and /dev/sdb - only /dev/sda1 is possible.
because label is set on fs, it is a fs tool that will set it and not a partition tool, for swap, you have none to my knowledge and label is set while formatting the swap file (that is not a problem as you don't care about swap content) with mkswap -L labelmidnite wrote: Moreover, for my old hardware that uses BIOS, I think I can only use MBR, but not GPT. How to change the disk labels in the MBR environment?

That's usually not a problem. GPT looks like a msdos partition table to things that are not GPT aware. If your BIOS is looking for a boot flag you can set that too (in parted, disk_set pmbr_boot on).midnite wrote:Moreover, for my old hardware that uses BIOS, I think I can only use MBR, but not GPT.
Code: Select all
mv /dev/sda1 /dev/sdz1
mount /dev/sdz1 /mnt/custom
ls /mnt/custommv wrote:There is no possibility to guarantee consistency (it might be even your BIOS which sets the order different with each booting), so you have to go with PARTUUID, UUID, or LABEL.
But all the manuals were telling us to use /dev/sda and /dev/sdb1 and so on. I heard from someone that in motherboards having both IDE and SATA, these indeterministics happens. But in normal multi-disk setups, the sequence of sda and sdb should be quite static, isn't it?frostschutz wrote:As for device name changes... it might work better if you use built-in drivers instead of modules. Or the other way around, modules might work better if you load them in a specific order, possibly with delay in between to allow the kernel to detect stuff.
But in general you should not rely on device names for anything, ever. UUID all the way.
Thanks for remind. I will think about how the setup going to be.szatox wrote:like in "i'm going to slow my SATA drive down to IDE range"?
If not using sda or sdb, I guess I will use by-id for the entire disk, and by-label for the partitions.szatox wrote:1) use labels or UUIDs. Either one will work, but labels are more human-friendly and UUIDs are less likely to cause a collision in the future. >>man tune2fs<< (or it's counterpart for other filesystems) is your friend.
Thanks NeddySeagoon. For sure I will take these settings when I do those configurations.NeddySeagoon wrote:Use root=PARTUUID on your kernel command line and UUID= in /etc/fstab.
Filesystem UUID requires the userspace mount command, which in turn requires an initrd to use UUID to mount root.
Be aware that PARTUUID can be fragile with MSDOS partition tables if it is pointed to a logical partition.
Thanks krinn. Yes I have also found a few commands to change the labels, finally. Such as e2label and ntfslabel.krinn wrote:because label is set on fs, it is a fs tool that will set it and not a partition tool, for swap, you have none to my knowledge and label is set while formatting the swap file (that is not a problem as you don't care about swap content) with mkswap -L label
for ext? fs, it also use -L label with mkfs.ext? but you have a tool if you don't want destroy your fs content, e2label device label
for other fs, i don't know, i don't use anything except ext? fs.

This idea will, sooner or later, cause you to suffer utter and complete data loss. It will confuse everything and everyone. Don't do it.midnite wrote:I found that I can simply mv sda sdz!
In practice the sd* names do not change for many people. However: you should never rely on it. Strange things can happen, e.g. if your hard disk takes longer to spin up than expected one day... or if it's detected late due to a cable problem. It doesn't take much change in timing and whoops, disk letters are the other way around.But in normal multi-disk setups, the sequence of sda and sdb should be quite static, isn't it?
So, in conclusion, no matter how the sda sdb switches, leave them alone. We should use by-id and by-label all the way. Isn't it?frostschutz wrote:This idea will, sooner or later, cause you to suffer utter and complete data loss. It will confuse everything and everyone. Don't do it.midnite wrote:I found that I can simply mv sda sdz!
You do not need custom udev rules to get static device names, you find them by default in /dev/disk/by-(uuid,label,id,...)
In practice the sd* names do not change for many people. However: you should never rely on it. Strange things can happen, e.g. if your hard disk takes longer to spin up than expected one day... or if it's detected late due to a cable problem. It doesn't take much change in timing and whoops, disk letters are the other way around.But in normal multi-disk setups, the sequence of sda and sdb should be quite static, isn't it?
That might turn out to be the solution to your problem with names.PS - btw that machine is still not setup yet. It is still booted up by the sysresccd, so all the drives were not mounted in the first place

PARTUUID is much better than UUID, certainly for (real_)root=, as the kernel decides, so it requires nothing from userland.frostschutz wrote:As for device name changes... it might work better if you use built-in drivers instead of modules. Or the other way around, modules might work better if you load them in a specific order, possibly with delay in between to allow the kernel to detect stuff.
But in general you should not rely on device names for anything, ever. UUID all the way.
It will be if you build-in the modules for the rootfs hard-disk controller to the kernel, as frostschultz mentioned.midnite wrote:But all the manuals were telling us to use /dev/sda and /dev/sdb1 and so on. I heard from someone that in motherboards having both IDE and SATA, these indeterministics happens. But in normal multi-disk setups, the sequence of sda and sdb should be quite static, isn't it?
NeddySeagoon wrote:Use root=PARTUUID on your kernel command line and UUID= in /etc/fstab.
Filesystem UUID requires the userspace mount command, which in turn requires an initrd to use UUID to mount root.
Be aware that PARTUUID can be fragile with MSDOS partition tables if it is pointed to a logical partition.
You're missing the point: that does what you need and means you don't have to worry about the rest.midnite wrote:Thanks NeddySeagoon. For sure I will take these settings when I do those configurations.

That's fine, PARTUUID is UUID too... it just had to be named differently to avoid confusion with filesystem and other content-based UUIDs.steveL wrote:PARTUUID is much better than UUID, certainly for (real_)root=, as the kernel decides, so it requires nothing from userland.
Not knocking UUID later, but if PARTUUID suffices, I'd prefer it.
Tony0945 wrote:Not true. I just finished updating that system. it's running fine with the old IDE config and eudev.krinn wrote:the deprecated ide config is not really a solve, except if you have no dev manager, as last time i saw, u(eu)dev fail to work with it enable.
Code: Select all
grep CONFIG_CHECK eudev-3.1.5.ebuild
CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET"
I have this on all my boxes:krinn wrote:Code: Select all
grep CONFIG_CHECK eudev-3.1.5.ebuild CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET"
Code: Select all
gentoo ~ # cat /etc/portage/package.mask | grep eudev
>=sys-fs/eudev-1.99
The problem was that ithe IDE and SATA drives kept switching between sda and sdb between boots. With my solution, the IDE is always hda and the sata is always sda. It was also pointed out that the problem might disappear if the drivers were compiled into the kernel rather than modularized..
And your "it works with me" is not also a proof that it "fully" work. I don't remember the symptoms of the problem, but you might have a configuration that doesn't trigger any trouble with it.
Still that's not quiet safe.
Ah I see, so you were referring to UUIDs in general; the trouble is in you're in a thread where this is context:frostschutz wrote:That's fine, PARTUUID is UUID too... it just had to be named differently to avoid confusion with filesystem and other content-based UUIDs.
(Quoting the whole thing, so the caveats are preserved, not in order to be pedantic.)NeddySeagoon wrote:Use root=PARTUUID on your kernel command line and UUID= in /etc/fstab.
Filesystem UUID requires the userspace mount command, which in turn requires an initrd to use UUID to mount root.
Be aware that PARTUUID can be fragile with MSDOS partition tables if it is pointed to a logical partition.
Perhaps, though they are unwieldy, and that does lead to a certain non-attention to the actual identifier.[1]It beats "random device names" by a long shot in either case. If you manage to make things go wrong with UUID, you only have yourself to blame.

Code: Select all
/dev/sda6: UUID="9657e667-5b60-f6a3-0391-65e6dcf662fa" TYPE="ext4" PARTUUID="0553caf4-06"I thought so! That's why I repeated the instruction to build in the kernel instead of modules. The deprecated CONFIG_IDE is only to separate hda from sda.steveL wrote:Personally I prefer building in the modules for the hard-disk controller and rootfs; that way there is nothing random about "sda"..
