Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After installing ubuntu can I move it to use a different disk space?

share|improve this question
    
No, you can't. Sorry. –  Novine Nov 1 '13 at 15:15
    
I have installed ubuntu along with windoes ..? –  harshal Nov 1 '13 at 15:16
    
So is there a way I can increase the c drive space partition? –  harshal Nov 1 '13 at 15:17
    
Yes, you can boot from a Live USB and use GParted –  Novine Nov 1 '13 at 15:18
1  
I'll put it in an answer, if you appreciate the help please choose the answer/up vote. –  Novine Nov 1 '13 at 15:21

3 Answers 3

You can try using GParted. There is a very nice guide to Live USBs and GParted here.

Also, for the partition moving, it could be possible using GParted as well. Make a new partition bigger than your current Ubuntu partition, then use GParted to copy all the data over. This is rather crude, and might not work completely, but with some luck should do the trick.

share|improve this answer

Yes we can do it, using resize2fs so:

First, we need know about free space:

root@server:/# df -h
Filesystem                       Size  Used Avail Use% Mounted on
/dev/sdb1                        3,7T  1,5T  2,1T  42% /users/home

Now proceed to resize:

root@server:~# resize2fs /dev/sdb1 2500G
resize2fs 1.42 (29-Nov-2011)
Por favor ejecute antes 'e2fsck -f /dev/sdb1'.

So, Well, We need verify our disk, before proceed. So, Its logic:

root@server:~# e2fsck -f /dev/sdb1
e2fsck 1.42 (29-Nov-2011)
Paso 1: Verificando nodos-i, bloques y tamaños
Paso 2: Verificando la estructura de directorios
Paso 3: Revisando la conectividad de directorios
No se encontró /lost+found.  Crear? no
Paso 4: Revisando las cuentas de referencia
Paso 5: Revisando el resumen de información de grupos
/dev/sdb1: ***** EL SISTEMA DE FICHEROS FUE MODIFICADO *****

/dev/sdb1: 3281220/244064256 files (0.4% non-contiguous), 383150021/976236032 blocks

Now, its ok!

resize2fs 1.42 (29-Nov-2011)
Resizing the filesystem on /dev/sdb1 to 655360000 (4k) blocks.
The filesystem on /dev/sdb1 is now 655360000 blocks long.

Now, we need delete our patition, and recover our partition with a new size.

We can use Fdisk, but if our HD is "big", may be we must use parted.

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


WARNING: The size of this disk is 4.0 TB (3998663944192 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID 
partition table format (GPT).

Using fdsik, we must put start from block 1 to last block that resize2fs, in our case was   655360000 and multiply by 4 (its k in every block). To get some safe margin, We can multiply this again by 1.05 and in this way you got a little more of space.

In parted, is very similar, like fdisk:

root@server:~# parted /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt                                                      
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? Yes

Warning: /dev/sdb contains GPT signatures, indicating that it has a GPT table.  However, it does not have a valid fake msdos partition table, as it should.  Perhaps it was
corrupted -- possibly by a program that doesn't understand GPT partition tables.  Or perhaps you deleted the GPT table, and are now using an msdos partition table.  Is this a GPT
partition table?
Yes/No? Yes  

(parted)                                                                  
(parted) print                                                            
Model: DELL MD32xxi (scsi)
Disk /dev/sdb: 3999GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart primary 0GB 3000GB
(parted) print                                                            
Model: DELL MD32xxi (scsi)
Disk /dev/sdb: 3999GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  3000GB  3000GB  ext4         primary

(parted) quit                                                             
Information: You may need to update /etc/fstab.

Ready! Now we have a new partition...

share|improve this answer

You can use gparted or fdisk for that. Finding out the free space to dump the installed one using resize2fs, e2fsck. Use --help for best results.

Go through this: http://noohonlinux.blogspot.in/

share|improve this answer
    
AU encourages high quality answers that don't just mention the name of a tool an/or a link to a third party resource. Please explain how to use the tools to solve the issue in the question and cite the crucial part(s) of linked resources in case they change or vanish. –  David Foerster Oct 21 at 12:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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