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?
-
2there was no gparted terminal.– Avinash RajDec 5, 2013 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 GedakDec 5, 2013 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...– RaviDec 6, 2013 at 2:52
-
Just for the sake of completeness. As the second answer explains, "GParted doesn't have its own terminal or console mode". However, Clonezilla offers the possibility to select right after booting up from the live CD a bash aka terminal option. :-)– ClemensSep 16, 2021 at 18:45
2 Answers
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
(parted)
-
4
-
6parted now lack all the file system functionality that is transparently served by gparted. Barely useful at all.– ZABDec 17, 2017 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).– PryftanOct 15, 2019 at 16:38
-
-
@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"– ZABOct 16, 2019 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.
-
1Thank 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.– RaviDec 5, 2013 at 13:14 -
GParted is a graphical frontend for
parted
which does the actual work and you can use it from command line. Oct 5 at 13:17