I read this doc of gparted to recover from booting issues when a partition is moved. To test the command grub on gparted terminal, I want to open the terminal but not finding a way from my Ubuntu 13.04. When I run sudo gparted & on my shell terminal, it opens GUI and so I can't test the commands. How to open the terminal?

  • 2
    there was no gparted terminal. – Avinash Raj Dec 5 '13 at 10:05
  • Ubuntu 13.04 uses GRUB2. So if you are trying to restore boot for ubuntu 13.04, see these instructions GRUB 2 bootloader - Full Tutorial. If you are actually trying to restore legacy grub, then try booting from the Live image for the version of GNU/Linux you are trying to get working again. – Curtis Gedak Dec 5 '13 at 18:05
  • @CurtisGedak Thank you very much for providing me with this good tutorial. Also may I know whether this doc will help me to understand details of how GRUB 2 works including how it writes to MBR. What all files are needed to install GRUB 2,etc... – Ravi Dec 6 '13 at 2:52

Why not? Yes There was, it's parted. you can use it in terminal. just install Gparted with following the command and then use it in terminal by running parted

sudo apt-get install gparted

GParted is a graphical (plus) front end to the libparted library used by the Parted project. If you want to use the command line then use parted instead (note: no g in front of name).

just use sudo parted to start it.

Here is all list of command in parted:

$ sudo parted

GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help                                                             
  align-check TYPE N                        check partition N for TYPE(min|opt) alignment
  check NUMBER                             do a simple check on the file system
  cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition
  help [COMMAND]                           print general help, or help on COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
  mkfs NUMBER FS-TYPE                      make a FS-TYPE file system on partition NUMBER
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system
  resizepart NUMBER END                    resize partition NUMBER
  move NUMBER START END                    move partition NUMBER
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a particular partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START and END
  resize NUMBER START END                  resize partition NUMBER and its file system
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and copyright information of GNU Parted
  • 2
    The resize command was removed in parted 3.0 – Ortomala Lokni Jul 1 '16 at 14:25
  • 2
    parted now lack all the file system functionality that is transparently served by gparted. Barely useful at all. – ZAB Dec 17 '17 at 6:10
  • @OrtomalaLokni Hmm. I see in parted version 3.1: resizepart NUMBER END resize partition NUMBER (CentOS 7 latest revision). Maybe they added it back, I don't know. But even so a lot easier to deal with without considering lvm/md (or other raids). – Pryftan Oct 15 '19 at 16:38
  • @ZAB You too on at least resizing. – Pryftan Oct 15 '19 at 16:39
  • @Pryftan it doesn't resize filesystem. From manual: "Note that this does not modify any filesystem present in the partition. If you wish to do this, you will need to use external tools" – ZAB Oct 16 '19 at 17:43

Those instructions are telling you to open a terminal and use the grub console.

GParted doesn't have its own terminal or console mode.

  • 1
    Thank you. The last line says The grub application is included on each Live CD listed in the section called “Acquiring GParted on Live CD”. I also have made a gparted live CD 4 months back. There grub application isn't present. May be that is a different software than those mentioned by gparted. I will try downloading again. – Ravi Dec 5 '13 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.