Quote:
Originally Posted by DenisD
Brains,
I guess I read carefully your first post and I realize I was missing one step :
family@Computer ~ $ sudo parted -s /dev/sda print
Model: ATA KINGSTON SUV400S (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 112GB 112GB primary ext4 boot
2 112GB 120GB 7724MB extended
5 112GB 120GB 7724MB logical linux-swap(v1)
What is the command with parted to delete the partition ?
Thank you
|
I don't use parted or any Open source partition software, so I cannot recommend. I don't know which distribution you are using either as I don't recall you mentioning it and it's not in your profile, but many distributions have parted or Gparted (Gnome desktop) graphical front-end that makes it easy. I mention this because from what I'm seeing so far, I feel you are more efficient at wrecking your system than fixing it, because you are running potentially disabling commands without following instructions thoroughly. Therefor I recommend using the graphical front end of open source partitioning software.
My instructions in short recommend:
1: Turn off swap which may unmount the partition aslo
2: Unmount it, it don't matter if I says it's not mounted, it is an entry in /etc/fstab therefor has been mounted.
3: Delete the swap and extended partitions (dev/sda5 & /dev/sda2) with parted or Gparted graphical utility.
4: Create new primary partition in the now free space with parted or Gparted graphical utility. This will now be a new /dev/sda2
5: Format it to swap/solaris file system with parted or Gparted or with mkswap command as instructed in my first post.
6: Find the UUID of the new swap partition and replace the number in the /etc/fstab swap entry with the new UUID
7: Mount the new swap with mount -a command
8: Check with graphical system information utility, or reboot to see if you were successful, an error may show up during boot up if you did something wrong
For a better understanding, r
ead this article.