Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: jonathanbrickman0000 on November 26, 2010, 11:03:31 PM
-
Is there a straightforward built-in, for updating /mnt and /etc/fstab when USB and other removable drives are inserted?
J.E.B.
-
There is rebuildfstab, but I doubt it would be required to be manually run when USB storage gets attached.
-
And for some reason, rebuildfstab isn't doing any of it -- my USB stick registers in 'blkid' as /dev/sdb, but rebuildfstab doesn't put a line in /etc/fstab for it, and it also doesn't create a /mnt item either. I made sure 'filesystems', fuse, ntfs-3g, and dosfstools were installed, just in case.
J.E.B.
-
Can you post relevant part of 'fdisk -l' ?
dosfstools are not strictly required in order to mount, but you could use mtools to manipulate a vfat partition without any need to mount.
-
Only partitions will be recognized, not baredrives.
You should be using a partitioned USB drive.
-
Only partitions will be recognized, not baredrives.
You should be using a partitioned USB drive.
No, I should not be using a partitioned USB drive. My users will be inserting USB flash drives right out of packages, and many of them come unpartitioned, and Windows Server 2008 does not, by default, partition them either.
J.E.B.
-
Only partitions will be recognized, not baredrives.
You should be using a partitioned USB drive.
No, I should not be using a partitioned USB drive.
Says who? Can you post any references to support such a claim?
What exactly do you mean by:
Windows Server 2008 does not, by default, partition them either.
Partitioning storage devices is in the responsibility and according to choice of users, I can not think of how an OS would have a default of partitioning or not.
-
This post says it all:
http://forum.tinycorelinux.net/index.php?topic=6663.msg34904#msg34904
Searching the forum for existing posts before opening threads can be helpful ;)
-
Actually, I had seen that thread, and it was not helpful. Posts were correct -- USB sticks very often come from the factory without partitions, including the one I bought yesterday for testing -- but the thread does not give a way to easily prepare the OS to mount such devices, which exist by the millions, which my users and others need to use immediately without wiping everything on them, partitioning, reformatting, and recopying.
I am happy that the blkid command works to show that the filesystem exists. Obviously a fairly straightforward path exists for the needed scripting.
What is the process to submit a replacement 'rebuildfstab' ?
J.E.B.
-
Hard drives come from the factory without partitions too.
Not showing unpartitioned USB drives was an intentional decision, not an oversight.
-
Intentional decision by whom? Who decided to ignore the needs of the vast majority of users of USB sticks? And why?
People do not use hard drives without partitions. People do use USB sticks without partitions, and routinely, and very very often.
J.E.B.
-
Intentional decision by whom? Who decided to ignore the needs of the vast majority of users of USB sticks? And why?
To call this bug an "intentional decision" is not very accurate. Instead it started as an unintended side-effect -- as a mistake that was never corrected. Here is the history:
- September 1, 2009: (http://forum.tinycorelinux.net/index.php?topic=2857.msg14634#msg14634) bmarkus notes that automatically created device mountpoints such as /mnt/sda are confusing if you have partitions on the device, and get /mnt/sda1, /mnt/sda2, etc. in addition.
- November 1, 2009: (http://forum.tinycorelinux.net/index.php?topic=3651.msg19273#msg19273) bmarkus notes that unneeded mountpoints are also created for extended partitions.
- November 15, 2009: (http://forum.tinycorelinux.net/index.php?topic=3866.msg20139#msg20139) roberts announces TC 2.6 RC 1. The changelog states "Updated rebuildfstab to drop extra mount points."
- December 14, 2009: (http://forum.tinycorelinux.net/index.php?topic=4275.msg22326#msg22326) Bug reports come in, stating that TC 2.6.1 no longer detects unpartitioned pendrives.
The changelog for v2.6 RC 1 makes the original intention of the change very clear: this is about removing unneeded mountpoints; a merely cosmetic change. It is not meant to introduce a new policy whereby USB sticks must be partitioned from now on. The bug report leads to the same conclusion. Note that roberts first requests the output of "fdisk -l", and then completely misinterprets said output. It is very obvious that he did not expect the 2.6 changes to make unpartitioned USB sticks unusable. But in fact they did, and that is what we have still today.
-
That sounds a whole lot more like the Tiny Core team I have come to know and love *grin* OK. I have had a good look at the code in rebuildfstab, and unless I am much mistaken, it looks like the whole kaboodle is right there. Is this correct?
I am probably going to try my hand at adding to it, but it is really elegant code right now, and I am not sure my skills are up to it.
J.E.B.
-
I never said unpartitioned disks were unusable.
I said they are not automatically recognized ( added to /mnt andfstab ).
You can still create mount points, and mount the drive.
I am just stating facts.
-
I never said unpartitioned disks were unusable.
I said they are not automatically recognized ( added to /mnt andfstab ).
You can still create mount points, and mount the drive.
I am just stating facts.
A web search would show that the status quo of many Linux distros wrt this aspect is similar.
-
Does that make it any better?
-
No, that's not my point. But that may give a more realistic perspective wrt expectations.
-
Personally, I would never trust a "factory formatted" device as you don't know where this device has been, Magnetic fields could have bad or weak sectors. Hidden partitions and exploits are also common on pendrives. Thereby upon performing a format one is warned about not having partitions and requires an additional flag to perform a format of an unpartitioned drive.
Notwithstanding I have gone ahead with supporting this request.