Problems with Debian and SATA

Started by Herkules, December 20, 2013, 03:04:23 PM

Previous topic - Next topic

Herkules

Thanks so much for that help :) Now it worked perfectly and I can browse the drive and save data on it :)

That was really great :)
Herkules

Herkules

One last quick reply :)

If I want to reformat the whole disk from 2 partitions to one partition, what am I supposed to do?
I want the disk with only 1 partition with 1TB

Hope you can help,
Herkules

sickmind

The easiest and fastest way is to remove both partitions and create a new one without specifying size - by default the whole disk will be selected (this will wipe your data!).

The other option preserving the data from the first partition is to install 'parted' tool (apt-get install parted), unmount the partitions, remove the second one (/dev/sda2), extend the first partition (/dev/sda1) in order to use the whole disk and then extend the file system (ntfs can be extended using the 'ntfsresize' tool).

Which method do you prefer?

Herkules

First, thanks for that help :)
So how can I remove both partitions?
I do know how to create the 1TB partition, but, as I sad before, I dunno how to remove the partitions.

Hope you can help :)
Herkules

sickmind

Using fdisk again :)

fdisk /dev/sda
p #print partition table
d #d stands for delete
1 #1st partition
d #delete again
2 #2nd partition
p #print partition table again, now both partitions should be gone. At this point you can simply create a new one using the 'n' key and you know the rest :) At the end just type 'w' in order to write all of the changes.


PS: found how to rescan for partition changes without restarting (partprobe doesn't work on this device). So after 'w' ('write' command, fdisk will quit automatically after writing the changes), just execute:
hdparm -z /dev/sda

Herkules