You are not logged in.
Pages: 1
Hi,
I am performing an installation on a system with a hard drive currently partitioned as follows:
Number Start End Size Type File system Flags
1 32.3kB 210GB 210GB primary ntfs boot
2 210GB 500GB 290GB extended lba
5 210GB 367GB 157GB logical ntfs
6 367GB 500GB 133GB logical ntfs/dev/sda1 : start= 63, size= 409593177, type=7, bootable
/dev/sda2 : start= 409593240, size= 567158760, type=f
/dev/sda5 : start= 409593303, size= 307194867, type=7
/dev/sda6 : start= 716788233, size= 259963767, type=7
The only partition I need to keep is /dev/sda6, but as you can see it is the last logical partition of an extended partition (/dev/sda2).
Is there a way I could delete /dev/sda5 and then resize /dev/sda2 so that its start matches the start of /dev/sda6?
Or otherwise would it be simpler to just delete the extended partition and somehow convert /dev/sda6 into a primary partition?
Thank you.
Offline
I don't know with parted but it is easy to do with fdisk (which allow better control of what is really done). First list your partition table with "fdisk /dev/sda -l", be sure to have the output as sectors and print this out or put it on an external drive or usb key. Then launch fdisk and delete all partitions (this only delete the entry in the partition table, not the data on the partitions). Recreate the needed partition as primary with the same first and last sector as you have seen above.
Last edited by olive (2016-10-24 07:07:07)
Offline
Thank you for your answer.
I am guessing that in addition to the steps you mentioned, I also have to set the exact same "System ID" on the partition for it to work, or is it irrelevant?
Thanks!
Offline
Thank you for your answer.
I am guessing that in addition to the steps you mentioned, I also have to set the exact same "System ID" on the partition for it to work, or is it irrelevant?
Thanks!
The system id mention the filesystem that is on the partition. It is usually not used by Linux that autodetect the filesystem regardless of it. It is used by Windows so that it s indeed important to put the correct id with this OS. Anyway, even under Linux, it is better to put it correctly; so you are not confused when you launch tool such as fdisk.
Offline
Pages: 1