[SOLVED] Multi partition USB key - unable to format partitions
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Multi partition USB key - unable to format partitions
Hi,
I am trying to create a multi-partition USB key to use to kick multiple OS's whenever I need (1 NTFS partition for Windows image and data storage, one ext3 for boot, another ext3 for Linux distros iso storage and the last one as a Fedora live usb with permanent storage).
I am using a Kingston Data Traveler G2 16GB usb key and I have absolutely no problem to create the partitions and all looks fine. The problem I encounter is that although I can format the 1st partition on the usd key to any fs I want, I am unable to do the same on the other partitions. I tried fdisk+mkfs.XXX (ext2, ext3, fat, vfat, ntfs) and gparted, and no luck.
mkfs.XXX gives me no errors when I run it but when I try to mount the partition in Fedora 14 the OS is unable detect the fs. Gparted allows me to format the fs, gives no errors, shows a format successful message, but when it re-scans the device the fs appears as unknown.
I know it is possible to do this as I had a DataTraveler 101 16GB and it was working fine until I lost it.
Has anyone encountered a problem like that? Any ideas?
I have had a similar issue where a USB key would work periodically. I think the key itself was defective. The partition table is stored at the beginning of the key, and if this isn't reading correctly, it can affect the partitions that are on it.
Does fdisk still find the partitions and their types? Did you choose primary or extended partition?
Yep, I tried with both extended and primary and same problem. Funny thing: I tried once and managed to create 2 small partitions and could see them both, but when I deleted them and tried again I got the same problem.
I am thinking it might be something wrong with the usb stick itself as a few days ago I created a full disk FAT32 partition, copied some data into it (in Windows) and after returning from holidays could not read the data either in Linux of Windows. (despite showing no bad blocks or any problem)
Anyway, I found my original USB disk which works, so I am gonna close this.
Even if it is not anymore pressing: What does fdisk -l /dev/<stick> tell us?
I do not have the stick with me, but I remember it would not say anything unusual, would list the partitions normally with no problem at all. The problems appear when I try to format the file system...
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Hmm. The partition information resides in bytes 446 - 512 of the MBR. You might extract that (e.g. with dd) and hand it to an hex editor, same as with the beginnings of the partitions. I don't doubt that one could find the meaning of those data in the net but I don't have any links handy . The partition types were okay (83 for linux AFAIR)?
Unfortunately can no longer test it, I just binned the usb stick as it was not working. Every time I copied data into it, it would appear that all was good, but when unplugging it from the computer and connecting back some data would disappear and the one that did not would be corrupted (tried both linux and windows)
Anyway, just found my old usb stick and recreated the multi partition disk and it works flawlessly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.