Search the Community
Showing results for tags 'diskpart'.
-
I really need help with this one as I've run out of ideas to try! All of the troubleshooting that I've tried has just led me down dead ends with various errors along the way. I have an HTPC / media server running a regular installation of Windows 10 on a Samsung 4TB 870 EVO SATA SSD (2 years old) and the PC froze on the lock screen to which I rebooted it, and haven't been able to get into Windows since. The SSD shows in the BIOS storage configuration, and also shows partitions and volumes when I boot the PC from a Windows PE USB stick, but does not show in the boot order. I've tried various troubleshooting methods including bootrec.exe, bcdboot, bcdedit, to no avail. Following one of the troubleshooting steps, I opened a file explorer window from Windows PE and the drive shows up, however, it does not show the storage bar, and does not allow me to access it at all, so it looks like I don't have read permission? 2 years ago I had a similar experience with the same computer with Windows on a ADATA M.2 SSD, but I could access it, but it was locked into read-only mode as it seemed to have died - don't know if this fate has occurred to me again or if it's something different. I would like to hook up the SSD to another system to see if I can diagnose it but I don't have the appropriate connections / alt. desktop with me. Any / all help is greatly appreciated!
-
- windows 10
- ssd
-
(and 3 more)
Tagged with:
-
Im going to reinstall windows and i wanted to make it a clean install and completely zero all my disks so that they are like ”fresh-out-of-the-box” I have a Samsung SSD and my question is if it would be safe to use the diskpart ”clean all” command when im in the windows installer, before selecting where to install windows ofc. And if you know i would like to learn what this command actually does Thanks!
- 1 reply
-
- windows install
- diskpart
-
(and 1 more)
Tagged with:
-
I hope you're doing well and having a great day. If I remove the label of my system partition, it is automatically reassigned on next boot. Is there a way to remove it so it doesn't get reassigned permanently? Thank you.
-
I just updated my Windows 10 2004 to Windows 10 20H2 as I got the notification for it. Once my PC completed the reboot to finish the update it died on me after giving me a BSOD with the CRITICAL_PROCESS_DIED error. After it tried to reboot itself after the BSOD my PC kept booting to the BIOS directly every time. I plugged in my bootable USB with Windows 10 on it and tried the following without any success : Startup repair - Couldnt repair your PC Uninstall Updates - Ran into a problem and wont be able to uninstall update. Try resetting your PC (IDK how, the reset option isnt available as Im unable to boot into windows) System Restore - Requires me to boot to Window System Image Recovery - Couldn't find any image Then I tried to reinstall windows on the SSD and thats when I noticed that Disk 0 (my SSD) shows 223GB out of 223GB as free/unallocated space. I clicked on the new option there to create a new partition and it just gets stuck there. I can move my mouse but the Windows setup window in which I selected the unallocated space becomes unresponsive. After about 15-20 minutes I get the error : We couldnt creat a new partition 0x8c1c2d80 (Couldnt find anything about this error code online) Then I tried command prompt option after rebooting into troubleshooting mode with my bootable USB. I could see my SSD shown as 100% free in diskpart as well. I followed the below steps to try and format the drive manually : Type diskpart and press Enter. Type list disk to display all the storage media connected to your system. Type select disk X where X is the number of the disk you want to format. Type clean and press enter to erase all the data on the drive. Now, you have to create a new partition on the drive. Type the following and press enter: create partition primary Here on the last step I got the following error : DiskPart has encountered an error: The request could not be performed because of an I/O device error Any other suggestions that can try? I obviously would prefer if I wouldn't have to reinstall Windows but I doubt that. Would be fine with getting my SSD back to working condition I guess.
-
Hi, i'm trying to do a fresh install of windows 10 on asus rog g752. Laptop has uefi and I'm trying to install from a portable usb, I made created it with rufus. Now, a problem comes up at the selecting disk process, my disk c (ssd) is not shown in the list! Only the hdd is shown. I tried checking in diskpart > list disk, same thing, only the hard drive is shown and not the ssd. Anyway, I can still boot into os without any problem. But how can I make my ssd visible so I can install os!?? Thanks ahead!
- 12 replies
-
- installation
- disk
-
(and 1 more)
Tagged with:
-
Hello world! So Im a newb here on the forum. Initially, all of this was written as a response to a thread that I bumped on just now. As i was typing away, I was automatically logged out... leaving we with a grey window upon submitting. Now being a bit used to web based forums... I always do regular copies of the novels they always tend to become as I go, so no harm done. I couldn't find the thread though... so I thought that I'd post a thread with it instead. Not sure if I picked the right forum for it though, if not... rip. Some of you may find this a bit excessively clear if you're used to dealing with the commandline and OS servicing in general. But this is for the beginners. I feel that it's a good cause to give them the power of their operatingsystems instead of using third party software to do something that they can do on their own, and at the same time maybe learning something. Step 1: Mount the ISO. Just double click the ISO file to mount it. It will be given a letter (i.e. "E:" or "D:") Take note to this letter, you'll need it later. Most likely though, it will be "E:". Step 2: Open a command prompt. (Hold Windows key and press X, then click "Command prompt (Administrator).) Then click Yes. Step 3: Insert a USB drive, with at least 8gb of storage, THIS DATA WILL BE ERASED ON THE USB DRIVE SO SAVE EVERYTHING ON IT BEFORE PROCEEDING. Preferrably not larger than 32g as the command for that would be different. Make sure you disconnect every other USB harddrive and/or USB drive for the time being. Step 4: Type command: diskpart and hit enter. Type command: list disk and hit enter. Step 5: Now, you will see the harddrives connected to your machine. They all have a number, with your system drive identified as "Disk 0". This is NOT the disk to select in this case. The USB drive will likely be put last or close to last in the list. I mounted a 64gb USB drive to my system, you can view this example image. It is clear by determining the size of this drive being 57gb, as the external drive. This time it was given the identifier disk2 in my system. Yours could be different depending on how many drives are in the machine. Take note of what number your external drive is given. Step 6: Just to make sure that the drive you think is the external one really is what it is, execute the following commands: sel disk 2 << This is where you put your number for your external USB drive. Could be 1, 2, 3 or whatever. Look at the size and guess. detail disk << This command will output the details of your disk. Up top, you will see information as to how it is connected. It should say "USB" in "Type". You know it is the right disk. See my attached picture for that too. Step 7: Now, assuming you know which disk is your USB drive, we will proceed. I will refer to the USB as "Disk x" here for the examples. Replace "X" with your number for the USB. Type the following commands, hitting Enter after each one. sel disk x (This being the USB drive Disk number) clean create par primary format quick fs=fat32 label=wininstall active assign letter=m exit Step 8: Now your USB drive is primed to become a windows install media. It might have popped up in a window after the assign letter command, giving it a mountpoint. Just close that window. The "exit" command in Step 7 is rather important. Now, you need to know the letter of your mounted Windows installer ISO that you did in Step 1. Mine was given the letter E: so I will use that for my example below. you can copy and paste the following command. To paste in CMD, right click and click "paste" or hold shift while doing ctrl+v. xcopy /s /e /h e:* m: Step 9: Now enjoy the power of xcopy, as the files from the ISO copy from the image over to your USB. XCOPY with those switches copies everything from hidden system files, to empty directories. A simple drag-n-drop here will not do, hence XCOPY. When it tells you that its done copying, you can close the command prompt and eject the drive. Turn the machine off and boot from the USB. Please let me know if anything is unclear! The most important thing here is not to select the wrong letters and the wrong disk, especially when running "clean". That command completely erases all data off of the drive. If you want to do this on a Mac, a combination of diskutil and the dd command can perform these steps too. Let me know if you need that info too.
-
Hi! Sorry I am kinda new to the forum but I ran into an issue I thought was very weird and thought would be nice if I could fix. Basically I was experimenting with a few different Raspberry Pi projects and was downloading various ARM Linux distros and installing them onto SD cards with Win32 disk imager and Rufus and the like. Then, one day I downloaded an OS which I cannot really recall and installed it onto the SD card. I then ejected the SD and proceeded to try and boot the Pi. It would not boot, so I decided to place it back into my PC for formatting and reinstallation. Then, I started to have problems. Firstly I got an error message which said that it was an unrecognized filesystem, which is sometimes normal when installing Linux, so I went to format it and the damn thing said that it was a near 16GB SD when in actual fact on the outside of the SD it clearly says it is 8GB?! I browsed online and I could see people had problems with it displaying a smaller partition than usual and I did encounter that issue once , but I just used diskpart to fix but this thing isn't even able to format in diskpart. When attempting to format, it says that the SD is write-protected, despite the little 'lock' thing on the side always being unlocked, I tried to fix this with some registry editing but nothing has thus worked. I know its probably easier to go and buy another SD but I can't be arsed and it would be nice if I could just fix this, so please help. I have attached some pictures below also for reference. Thanks for reading
- 16 replies
-
- sd
- formatting
-
(and 3 more)
Tagged with:
-
Hi all, long time lurker first time poster, ya get the idea... First off, this is going to be a longer post - want to include all of the troubleshooting steps I've already tried, and all of the thoughts I've had so far...so, sorry for the long post. Anyways... A few days ago I decided to force shutdown my machine (6700k, 16gigs ram, MSI h110m motherboard, msi 1070, Samsung 850 evo 500gb, windows 10 - not sure what update anymore). When I went to boot up the next day, it got past the motherboard splashscreen, and told me that it did not detect a boot device. So, somehow when I force shutdown, I killed my windows install. Ok, no worries, nothing mission critical, full backups from the night before, we're good. I'll make a windows flashdrive and reinstall. I'm going to list out the issues I've had so far, and the troubleshooting steps I've taken cause I fell that's easier. Made flashdrive, tried to boot - but it hangs at the windows spinning circles realize that somehow having the ssd plugged in is stopping windows from loading Take out old ssd (Samsung 850 evo 250gb) to try to boot to/install windows to it (it was an old install from a few months ago, same machine, should have booted fine) No dice. This ssd prevents boot as well Find old 250gb hitachi traditional drive, boot up, install windows. Update bios somewhere in there Turn on hot swap to prevent boot issues, and allow me to look at drives in windows without going through sata-usb adapters (these were causing naming issues in diskpart) Both drives are recognized, by name (Samsung SSD 850 EVO ___gb by device manager/devices and printers), but there are still issues Try to clean them using diskpart Works for 250 gb drive (which, by the way, is being recognized as a 500gb drive somehow by diskpart, drive manager, etc) Diskpart throws out errors about not being able to access file when I go to create a partition Diskpart now hangs even at startup, no command line options available. Drive manager hangs on opening, will not show list of drives Previously, both drives were able to be recognized in drive manager and diskpart, but could not be initialized with gpt or mbr. Does not work for 500gb drive - from this point on, this drive is unplugged because it seemed to be causing slowdown with diskpart and devicemanager/disk manager. Try to uninstall the device/driver in device management - hangs Drivers on both drives were updated around October when I cloned them. Other thoughts/information: 250gb drive was a known good device until today. It was simply cloned to the 500gb drive using the Samsung wizard software, and then left in my desk drawer for the past few months. Sata cables/sata power are known good All other hardware is fine, and windows is now bootable - but will still hang if EITHER ssd is plugged in - via sata or the sata to usb adapter. So, are there any other troubleshooting steps I can take, or should I just accept I now have two inexplicably dead ssd's (well, one is inexplicable, I know I f'ed up with the 500gb drive)? I really don't care about the data on them - it is all backed up. I plan to take them in to the IT guy for my department tomorrow to see if he has any ideas, but if I can get it fixed/figured out on my own, I'd like to. It really isn't his job to fix my personal gear. TL;DR: Forced shutdown machine, broke drive, somehow broke spare drive as well. Can see drives, but cannot wipe them. pls send help. Thanks in advance everyone. Let me know if this is in the wrong place or something, I'll happily move it.
- 4 replies
-
- ssd
- drive failure
-
(and 3 more)
Tagged with:
-
I want to delete a volume on a secondary hard drive that has no data on it, but the delete volume button is greyed out in the disk management tool, and when I run diskpart clean, it gives the following error: Virtual Disk Service error: Clean is not allowed on the disk containing the current boot, system, pagefile, crashdump or hibernation volume. I realised that this is because the disk is marked as both a pagefile disk and a crashdump disk, but I can't for the life of me figure out how to turn these off and be able to reset it properly.
-
I've been at this for hours... halp I'm trying to install a Samsung 860, my PC already has a Samsung 960 M.2 (with Windows) and a random 4TB HDD. The SSD appears on BIOS and device manager, but it does NOT appear on disk manager or diskpart or other software like speccy. I've tried: - Different SATA cables and connectors (even with the ones the current HDD is using which I know work fine). - Updating BIOS, any related drivers, reinstalling Windows (it didn't show up on the windows installation software either). - Completed a memory diagnostic test (someone said it worked for him but didnt for me) - Clear cmos I dont know what to do anymore... what am I missing? Specs: i7 8700K 1080Ti 32GB RAM AORUS Z370 Ultra Gaming Windows 10 Education Any ideas? I'll provide any extra information if needed. Thanks in advance!
- 1 reply
-
- ssd
- disk manager
-
(and 4 more)
Tagged with:
-
I currently can't boot into windows, and have somehow removed a partition containing 4TB of backups and un-backed-up files I'm currently working on. I was planning on reinstalling windows due to system instability caused by corrupted system files. I was going to use the system reset feature but it failed repeatedly and no amount of troubleshooting worked so I decided to create a new partition with some spare space to use as a bootdisk (I didn't have a USB stick or CD), load windows onto that and boot from there. In the process, without realising it I deleted grub (I dual boot with Elemental). I kinda copped that I had done that and sighed and shook my head but no biggie. The problem being when I was using diskpart I cleaned the volume that I thought was just my partition for installing windows onto but disk unmounted. Panicked and tired, I then restarted my PC. I was unable to get back up and running with grub rescue, so I took my elemental install media and figured that I'd format C:/, install elemental on one of the few free partitions on my 4TB disk, and continue getting a bootable windows installer ready on another partition in elemental Only, when I got into elemental it read my 4TB disk as completely empty. There was absolutely not enough time between me pressing "clean" on that volume and the operation completing/me restarting to format that disk, so I'm convinced the data is retrievable, but I have no idea how and I'm out of my depth and making mistakes. Pllleaaase someone help. I have been working overtime and trying to balance my degree on top of that and have made some very stupid mistakes in the course of the last 2 hours please forgive me for being an absolute idiot.
- 1 reply
-
- data recovery
- grub
-
(and 2 more)
Tagged with:
-
(sorry for any mistakes im german) I Flashed puppy linux onto a generic 4gb usb flashdrive. after trying it out i wanted to clean the drive as you usually do. in the disk management it looked like i could just delete the partition. i did and tried creating a new simple volume. i got an error message so i used diskpart in the cmd. i tried the usual clean command but then it told me that access was denied. i tried out some youtube tutorials and one suggested that i tried "attributes disk clear readonly". that worked but when i then tried to clean the disk it still told me that my accsess was denied. what else should i try?
-
i have an old WD network storage device made from 2x1TB drives that doesn't work anymore. there was an option for RAID 1 but im not sure if i used it. i have alot of data that i must recover from them and i prefer to do so without a data recovery program because i want to maintain the folder heirarchy and not pay 80$ for it, ill do so if there is no other choice... i connected the drives to my pc one after the other and they both looked like this: the context menu wouldn't let me assign a letter to the big partition, so on one of the drives i tried creating another one for testing and made a new simple volume out of the unallocated segment. that changed the drive to this: so i had letters for the partitions which are now all dynamic but couldn't access the drives... i used partition wizard 4.2.2 and revert the drive back to basic and now i have this: during this whole time the CMD:DISKPART told me that it can see the disk and partition but it can't see a volume for it. this is what it sees on the changed drive(c,d are on disks 0,1): i still have 1 drive that have the original 4 basic partitions, also with no volume, and i dont know if it has the same data or not. remo recovery shows me the data and i am now scanning the second drive to see if they are raided or not. can some1 help me? is there a way i can still use the drives like normal without erasing the data?
-
Hello, I tried to separate my windows install from the software for it with a different partition for it called "WSoft" as you can see below, it's just because I was planning on formatting this PC later but I didn't need it anymore and thought this would cut down in setup time since I wouldn't have to install most of my software again, now I just need to extend that install partition but windows wont allow me to. Disk 0 is a Kingston 111GB SSD; Disk 1 is a 500GB Toshiba laptop HDD. The two other partitions are from a Ubuntu install.
-
Hello good people. So, it's going to take a while to explain the chain of events leading to my current problem, I know it's convoluted and long but please bear with me and I will try to explain it as best as I can. My dad's pc has 2 hard drives: an old drive from which he created a clone ("new") a month ago, and the clone on which he has been working since. They both have several partitions. Each drive has a partition on which win 7 is installed and one on which win 10 is installed, and he's only been using the new one for the past month. Yesterday, he was trying to back up a .pst file from win 7 (probably not very important). Upon completion, he used partition magic 8.0 (what he's always been using) to switch to the win 10 partition, but something went wrong and win 10 couldn't load and instead we got a "something went wrong :(" blue screen which then lead us to some of win 10's troubleshooting tools - none of which worked (they all threw some kind of errors). Ironically, while you might think that is what I was gonna ask about, it is not, because since yesterday we've made matters even worse. Don't ask why, but today we used the same program with which my dad cloned the old hard drive - "Acronis" - to delete the contents of some unused partition from the new drive. We thought that it might help us with something but it didn't, and what followed is pretty bad. Upon leaving Acronis and trying to boot again (back to the win 10 troubleshooting tools) we suddenly got a black screen with the msg "No operating system found". It seems that for some reason, after deleting the old unused partition, that partition was somehow set to be the active partition. At this point we connected back the old hard drive (which is working fine) and entered win 7 to take a look at the disks and partitions inside the Disk Management tool. I think the partitions of the new drive got completely messed up. For one, none of the partitions had a drive letter next to them. Additionally, the active partition was indeed the empty one which we had deleted (I don't understand this topic too much but I am pretty sure the partitions are not the way they're supposed to be, just from comparing them to the old drive). So, I looked around google and tried to use DISKPART (via cmd). With diskpart I was able to do 3 things: 1. Change the right partition to be the active one (the leftmost one). 2. Assigned the letter E to the volume that represents the new hard drive - after which the letter E appeared next to the right-most partition. 3. Set the "info" attribute of that volume so it wouldn't be "Hidden" (I thought this might solve the issue). After that I tried to boot from the windows 7 partition (the one I set to Active) of the new drive and indeed the logo of windows 7 appeared(!!!) but got hung on the splash screen. I don't know what else to do and could really use some help. Here are some relevant screenshots: As you can see, Disk 0 is my faulty new drive, and it's left most partition is the one I set to active using diskfrat...but win 7 just hangs when I boot it. The right-most partition (454 MB) for some reason is the only one that's associated with volume E. Disk 1 is my old drive which works fine. This is a screenshot from DISKPRAT showing the partitions I have on my old drive, and the details of Partition #1 which is working and booting my old win 7. And lastly, this shows the partition on my new drive, as well as details on Partition #1 which is set to Active but NOT WORKING
- 1 reply
-
- windows 7
- windows 10
-
(and 3 more)
Tagged with:
-
Hello good people. So, it's going to take a while to explain the chain of events leading to my current problem, I know it's convoluted and long but please bear with me and I will try to explain it as best as I can. My dad's pc has 2 hard drives: an old drive from which he created a clone ("new") a month ago, and the clone on which he has been working since. They both have several partitions. Each drive has a partition on which win 7 is installed and one on which win 10 is installed, and he's only been using the new one for the past month. Yesterday, he was trying to back up a .pst file from win 7 (probably not very important). Upon completion, he used partition magic 8.0 (what he's always been using) to switch to the win 10 partition, but something went wrong and win 10 couldn't load and instead we got a "something went wrong :(" blue screen which then lead us to some of win 10's troubleshooting tools - none of which worked (they all threw some kind of errors). Ironically, while you might think that is what I was gonna ask about, it is not, because since yesterday we've made matters even worse. Don't ask why, but today we used the same program with which my dad cloned the old hard drive - "Acronis" - to delete the contents of some unused partition from the new drive. We thought that it might help us with something but it didn't, and what followed is pretty bad. Upon leaving Acronis and trying to boot again (back to the win 10 troubleshooting tools) we suddenly got a black screen with the msg "No operating system found". It seems that for some reason, after deleting the old unused partition, that partition was somehow set to be the active partition. At this point we connected back the old hard drive (which is working fine) and entered win 7 to take a look at the disks and partitions inside the Disk Management tool. I think the partitions of the new drive got completely messed up. For one, none of the partitions had a drive letter next to them. Additionally, the active partition was indeed the empty one which we had deleted (I don't understand this topic too much but I am pretty sure the partitions are not the way they're supposed to be, just from comparing them to the old drive). So, I looked around google and tried to use DISKPART (via cmd). With diskpart I was able to do 3 things: 1. Change the right partition to be the active one (the leftmost one). 2. Assigned the letter E to the volume that represents the new hard drive - after which the letter E appeared next to the right-most partition. 3. Set the "info" attribute of that volume so it wouldn't be "Hidden" (I thought this might solve the issue). After that I tried to boot from the windows 7 partition (the one I set to Active) of the new drive and indeed the logo of windows 7 appeared(!!!) but got hung on the splash screen. I don't know what else to do and could really use some help. Here are some relevant screenshots: As you can see, Disk 0 is my faulty new drive, and it's left most partition is the one I set to active using diskfrat...but win 7 just hangs when I boot it. The right-most partition (454 MB) for some reason is the only one that's associated with volume E. Disk 1 is my old drive which works fine. This is a screenshot from DISKPRAT showing the partitions I have on my old drive, and the details of Partition #1 which is working and booting my old win 7. And lastly, this shows the partition on my new drive, as well as details on Partition #1 which is set to Active but NOT WORKING
-
Hello, I'm trying to extract pictures and videoes from an unresponsive 4TB HDD. When I use diskpart it lists os disk as 0 and then the disk where I'm storing the recovered data as disk 2. Actively jumping over the malfunctioning disk. I can still select it as disk 1 and get information that it is in RAW format. The weird thing is that it shows up in Explorer and Disk Management, I can see drive letter and all the folders inside the drive, but I can't copy them out. Chkdsk gives "cannot open volume for direct access". Recuva gives "Invalid drive size". EaseUS just doesn't find anything. Trying Lazesoft Data Recovery at the moment, but my hopes aren't high. So I'm looking for anything that could help recover these files.
-
Hey guys, I've been battling an error with installing windows for the past day and a half. I've never had this issue spiral out of control so badly... I'm making a fresh install of Windows 7, onto my new SSD (Samsung 850 Pro) via USB. No matter what I've done so far I fall into the following error:- "Setup was unable to create a new system partition or locate an existing system partition. See the Setup log files for more information." I have done the following:- http://linustechtips.com/main/topic/314463-fresh-install-windows-7-driver-problems/ DISKPART = Countless times Converted the HDD to MBR Disk - though CMD in the Windows install (Ctrl + F10) Only running SSD and USB Completely changed SATA Cable Swapped SATA Cables (with another cable) Checked if my Bios is Legacy or not Reset my BIOS (removing the battery) Swapped USB to another location eg:- http://druss.co/2013/10/fix-error-during-installing-windows-7-from-usb-setup-was-unable-to-create-a-system-partition-or-locate-an-existing-partition/ 1) When you see the error – remove the flash drive from the computer 2) Press exit (red cross in the top right corner) 3) Start installation from the beginning (without reboot) 4) After selecting Windows 7 edition you will get new error - (cant get past this point, without plugging the usb back in. However the error returns) 5) Press OK in error window, you will be redirected to installation main menu 6) Insert your USB Flash drive in to the computer 7) Install windows I'm out of ideas, and frustration is takings its toll. - Any help will be greatly appreciated!
-
- windows7
- setup was unable to create a
- (and 3 more)
-
How to: format USB flash drive not showing up on computer A member had a problem with one of his USB flash drives. Something went wrong when he formatted it with a format program to turn the flash drive into a linux live drive. As a result of this his USB flash drive no longer showed up in the "computer" folder. The USB flash drive did show up on the windows 7 Disk Management but it was grayed out and he could not format it via the Disk Management. This tutorial will fix the problem by formatting it using diskpart. WARNING: You will lose all data on the USB flash drive! Step 1: type "diskpart" in the windows search bar and open the program, preferably by right-clicking and selecting "Run as administrator". Step 2: Once you opened diskpart you will need to type in the following command: "list disk" This will list all the Hard drives and USB flash drives connected to the computer. Step 3: Locate you USB flash drive by looking at the size of the drive in the list, make sure you remember the Disk number. In my case it's a 32GB flash drive, so mine is the 29GB drive listed as "Disk 8" WARNING: Don't continue to step 4 unless you are 100% sure that you have the right drive or you will clean the wrong drive! Step 4: Select the troubled USB flash drive by typing the command: "select disk (insert the drive number here without brackets)" In my example it is Disk 8. Step 5: Now you must clean the drive by giving the "clean" command. Step 6: Next thing you need to do is create a partition with the command "create partition primary" Step 7: Now you need to select the partition you just created by giving the following command: "select partition 1" Step 8: Last step, you need to format the flash drive with the following command: "format fs=ntfs label=USB quick" Victory: You can close diskpart. The drive will now show up on your computer listed as USB formatted with the NTFS file system. Please like this post if it was helpful. looney
- 28 replies
-
Hi guys, please, can anyone help me ? I am having this wierd problem. I want to use DISKPART which is tool in windows used to manage partitions e.t.c. of your drives, from java, programatically. The problem is , how to open DISKPART and insert command "select disk 1" and then "clean". (example); Problem comes when DISKPART is opened from java in new window, and seems no to accept any other commannds. Here's the code. ProcessBuilder builder = new ProcessBuilder( "cmd.exe","/C diskpart /s select disk 1", "clean"); builder.redirectErrorStream(true); Process p = builder.start(); BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream())); String line; while (true) { line = r.readLine(); if (line == null) { break; } System.out.println(line); } } I tried multiple ways, this is the default way. Thanks a lot