Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've surprisely recognized that it's possible to write a filesystem on a hard disk without any valid partition. Well, the general advantages of partitions are clearly. But what are possible disadvantages or limitaions if you don't use a partition (e.g. if you want to use the complete space as one volume for data mining or so)?
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672
Rep:
I'd have thought that the disk actually had one partition, i.e. the whole thing. You can't usually format a drive until you've labled it, that is, written the partition data to it. If you buy a disk it probably has a partition file already on it.
Sometimes, yes. But my new hard disk drives haven't any partitions from scratch. Further I don't believe that you can equate a blank drive with a "full size partition".
External drives are usually already partitioned/formatted from the factory but internal drives are not. Many embedded systems record raw data directly to a disk or maybe to a partition without a file system. I have several Imation flash drives that are not partitioned. Neither windows or linux has any problems with reading or writing to them.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
i would add that there are still some drives that are accessed in raw mode
those would be floppies (1.44 megs isn't really big enough to split into partitions\,though i believe you CAN partition a floppy in linux) and optical disks such as cd/dvd/blu-ray disks
any larger storage mediums though use partitions
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672
Rep:
Hmmm... Disks, including floppies are block devices. The last floppies I bought were DOS preformatted. You need to have a partition, which may be the whole drive, before you can format the drive and create a file system on the partition. Flash drives under 4Gb are usually preformatted as FAT32 devices.
I have to admit that most of my experience has been with Sun systems where the Solaris Format command allows the geometry of the disk to be re-defined but you can not format the drive until it has had the partition lable written to it.
I remember formatting a R/W CD once which meant we had a CD that acted as it it were a 680Mb floppy. If you buy a new disk for internal use, it'll be preformatted, probably NTFS. I don't believe you can write data to a disk with an undefined file system!
"There are large differences in how disk errors are processed by various kernels. Operating systems such as FreeBSD, NetBSD, OpenBSD, Solaris, as well as different Linux kernels (i.e. hda vs. sda (<2.6.20)) behave differently. Also, Linux lacks "raw" disk devices like *BSD has, which makes it less desirable for low-level data recovery. Non-raw devices read larger blocks than requested, obscuring the actual location where the error occurred. You may wish to use "dmesg |tail -n8" to see the error messages on the console."
I'd bet you can't provide me any good reason to use a raw hard drive in any normal linux situation. As I pointed out before other OS's and other hardware are not part of this situation. If using raw hard drives were to be of any good use I think we would have seen all sorts of Distro's showing us how to use them. My guess is 99% of advanced users have only limited uses for a raw hard drive. Everyone else uses then like normal partitioned and formatted drives.
Sure one could make a claim that swap space on a raw drive is faster, I agree. Sure one might even make a claim about more usable space and that would be true as it is in other OS's. I might even agree with some raid arrays having a use.
I still think the average use is a partition and a properly selected format.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672
Rep:
Quote:
On Linux raw devices are deprecated and scheduled for removal, because the O_DIRECT flag can be used instead.[1] Instead of accessing a special raw device file, the application simply can (and should!) access a file with the O_DIRECT flag enabled, and caching will be disabled. Since there is still a userbase for raw devices and applications without support for O_DIRECT still exist, it has been a controversial subject on the Linux kernel mailing list.Raw devices are character devices (major number 162). The first minor number (i.e. 0) is reserved as a control interface and is usually found at /dev/rawctl. A utility called raw (see man raw) can be used to bind a raw device to an existing block device. These "existing block devices" may be disks or CDROMs/DVDs whose underlying interface can be anything supported by Linux (e.g. IDE/ATA or SCSI)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.