ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Sorry...but this script isn't working on my Suse system nor Ubuntu.
I've checked the parted command and this is the command I have to go for, but the strange thing is, is that my 2 systems keep crying that /dev/sda is in use and can't be formated, set partitions or whatever.
or rather why do you run those both? Isn't parted making the filesystems, or what's that mkfs command in it - why do you have to run mkfs.ext2 after that again?
This will work for Linux. I'll see 2 partitions.But if i put the same disk to a Windows machine, I only see one single drive which is the one i set 'boot on'.
I figured out that both partitions use id 'c'. and mkfs 2 isn't accessible in Windows.
How can I set id to 'd' so Windows will see both of my partitions?
Please see output below fdisk -l and note ID sda1 and sda2:
nl1email:~ # fdisk -l
Disk /dev/hda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 131 1052226 82 Linux swap / Solaris
/dev/hda2 * 132 3738 28973227+ 83 Linux
Disk /dev/sda: 519 MB, 519831552 bytes
16 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 992 * 512 = 507904 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 197 97656 b W95 FAT32
Partition 1 has different physical/logical endings:
phys=(12, 40, 13) logical=(196, 14, 13)
Partition 1 does not end on cylinder boundary.
/dev/sda2 197 886 341797 b W95 FAT32
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(12, 40, 14) logical=(196, 14, 14)
Partition 2 has different physical/logical endings:
phys=(54, 180, 57) logical=(885, 15, 57)
Partition 2 does not end on cylinder boundary.
nl1email:~ #
As far as I know, Windows only looks at the first partition on removable USB devices. When I was still using Windows on my desktop, I could never find a way for it to recognize more than one partition on a removable device. Perhaps there is some trick to it.
That's another reason why I don't use Windows - it does not recognize the second partition on an USB pendrive. Let me repeat that. Windows will not recognize a second partition on a USB pendrive. Which makes sense because if you have many pendrives with many partitions then you will run out of alphabet letters for the 'drive letter'. I always found that so ridiculous.
That's another reason why I don't use Windows - it does not recognize the second partition on an USB pendrive. Let me repeat that. Windows will not recognize a second partition on a USB pendrive. Which makes sense because if you have many pendrives with many partitions then you will run out of alphabet letters for the 'drive letter'. I always found that so ridiculous.
Yes...this will be the thing because the second partition was recognized in device manager, but not in Explorer.
Unfortunatly 99% of our costumers use Windows, so automatically formatting and partitioning in Linux for USB pen drives is not possible :-(
Thanks for all your help. Again learned something.
We use software which format the pendrives into two partitions. Windows is recognize them as 2 different drives!!
If I can manage that with fdisk or parted, this would be great.
We copy alott of data to thousands of disks everyday. duplicating one pendrive to 32 others at ones. We use Windows for this at the moment, but Windows keeps losing its USB driver. have to reboot everytime to be recognized. Bcause I'm a big Linux fan, I would like to run the procedure with a script.
But....the last thing I need to do, I can't get it done. That is partitioning a pen drive in two partitions so Windows will recognize the two partitions a two drives and not 1.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.