reformatting hard drive

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

reformatting hard drive

Postby jonass on Wed Jan 23, 2013 2:15 am

Screenshot.png
Screenshot.png (55.58 KiB) Viewed 2535 times


I'll post a screenshot of the gparted view of the drive i want to change.

Is it possible to delete partitions at the front of a drive and then add the free space to a partition at the end of the drive? I have a 750gb hd where the first 20ish gb are for the os and the next partition is for media, but i am getting a ssd and wanted this whole drive for media.
jonass
Level 3
Level 3
 
Posts: 114
Joined: Wed Jun 22, 2011 7:11 pm

Linux Mint is funded by ads and donations.
 

Re: reformatting hard drive

Postby caf4926 on Wed Jan 23, 2013 3:26 am

It'll mess up the partition table but that may not matter if you are doing a clean install
You need to explain exactly what you want
But sda1 is a primary as is sda2 (extended)
Everything else is logical inside the extended space
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1784
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: reformatting hard drive

Postby nomko on Wed Jan 23, 2013 3:30 am

Yes, this can be done. But not without data loss. So, before removing and reformatting, you must make a backup of all your files. If you going to use the whole disc as a media disc, best is to backup your files (here you get 50 gig free: https://mega.co.nz/) and remove all the partitions and create 1 large partition for your media.
MSI GE70-2PE*Quad core Intel Core i7-4710HQ*Kingston 16 GB RAM*Intel 4th Gen. Integr. GPU/NVidia GeForce GTX860M*Qualcomm Atheros Killer E2200/Intel Wireless 3160*Sitecom X5-N600 Router (WLR-5100)

Visit my website:
My personal website
User avatar
nomko
Level 9
Level 9
 
Posts: 2920
Joined: Sat Feb 25, 2012 7:28 pm
Location: The Hague, The Netherlands

Re: reformatting hard drive

Postby jonass on Wed Jan 23, 2013 10:35 am

So what I wanted to do is delete all the partitions before sda6, and then add that free space to the beginning of sda6
jonass
Level 3
Level 3
 
Posts: 114
Joined: Wed Jun 22, 2011 7:11 pm

Re: reformatting hard drive

Postby jonass on Wed Jan 23, 2013 10:39 am

Hmmm the problem with backing it up is I don't have an extra 350 GB, otherwise I would just copy the files over to the backup and reformat the whole drive and copy the files back over afterward
jonass
Level 3
Level 3
 
Posts: 114
Joined: Wed Jun 22, 2011 7:11 pm

Re: reformatting hard drive

Postby 741cc on Wed Jan 23, 2013 12:06 pm

Hmmm the problem with backing it up is I don't have an extra 350 GB

Your screen-shot shows you have 390.45GiB of Data on sda6 and you say that you have no back-up? Thats an awful lot of stuff to lose in the event of a mishap such as hardware failure, theft or user error. The mere fact that you are asking for assistance on re-partitioning makes the third event a likely outcome. Do you know what its like to look at agparted window and see a complete blank because you hit the wrong button (don't ask me how I know this :oops: ).

Take my advice:-
1. Beg, borrow or steal a device large enough to hold all your files, and then some.
2. Use rsync or something similar to back up all your stuff.
3. Check the authenticity of the backed-up files.
4. Then, and ONLY then, start messin' with your 750G drive.

It will be a lot easier to simply format it and start again as already stated above.
Good luck and feel free to ask any further questions.
741cc
Level 3
Level 3
 
Posts: 155
Joined: Mon Sep 03, 2012 8:00 am

Re: reformatting hard drive

Postby caf4926 on Wed Jan 23, 2013 1:40 pm

Backup is essential I agree
But you can actually do pretty much anything with gparted
But I can tell you this... Even if you have a power house machine,, moving and resizing that lot will take forever..ever ....ever....ever
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1784
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: reformatting hard drive

Postby nomko on Wed Jan 23, 2013 2:30 pm

caf4926 wrote:Backup is essential I agree
But you can actually do pretty much anything with gparted
But I can tell you this... Even if you have a power house machine,, moving and resizing that lot will take forever..ever ....ever....ever


With large sized disc's...yes it can be painfully slow!

@jonass: buy an 1 gig external USB disc. Move all your stuff on that and when that's done remove all your partitions and create 1 big partition. That will save you a lot of trouble and headaches!
MSI GE70-2PE*Quad core Intel Core i7-4710HQ*Kingston 16 GB RAM*Intel 4th Gen. Integr. GPU/NVidia GeForce GTX860M*Qualcomm Atheros Killer E2200/Intel Wireless 3160*Sitecom X5-N600 Router (WLR-5100)

Visit my website:
My personal website
User avatar
nomko
Level 9
Level 9
 
Posts: 2920
Joined: Sat Feb 25, 2012 7:28 pm
Location: The Hague, The Netherlands

Re: reformatting hard drive

Postby bb333 on Wed Jan 23, 2013 4:44 pm

jonass wrote:Hmmm the problem with backing it up is I don't have an extra 350 GB, otherwise I would just copy the files over to the backup and reformat the whole drive and copy the files back over afterward


You can use gparted to "juggle" around your data but you have to find room on your new SSD or somewhere else for ~90GB.

1. Install the SSD and an OS.
2. From a livecd with gparted, shrink the extended partitions to the lowest. Expand sda1 (formated to ex4).
3. Transfer data to sda1 and delete the extended partitions when empty.
4. Transfer that 90GB back from where ever you stored it.
5. Done.

This will takes hours depending on the drive and your computer. You can and may lose a chunk or all of your data if problems arise.
http://askubuntu.com/questions/144809/c ... partitions
bb333
Level 2
Level 2
 
Posts: 60
Joined: Wed Jan 23, 2013 3:50 pm

Re: reformatting hard drive

Postby srs5694 on Wed Jan 23, 2013 6:50 pm

First, it is possible to delete the earlier partitions and then use GParted to resize a partition to occupy the earlier space. The problem with this is that it involves moving the start of the filesystem, and since filesystem data structures are defined relative to the beginning of the filesystem, the result of this operation is that a lot of critical filesystem data must be recomputed and rewritten. This is both time-consuming and risky. I don't recommend doing it without a backup. It will succeed most of the time, but do you really want to take the chance that you'll be one of the minority of people for whom it fails?

One alternative is to create a new partition in the freed space and mount it within the existing directory tree, then move a subset of your data to that space. It looks like you're using auto-mounting in the /media directory tree, so to do this you'd need to switch to mounting the partitions via /etc/fstab. This might make things cleaner or more convenient, though, so it's not necessarily bad. Suppose for the sake of argument that you decide that you've got a bunch of MP3s that will fit in the new partition. You might do something like this:

  • /home -- Your new /home on the SSD
  • /home/jonass/data2 -- Your current /dev/sda6, currently mounted at /media/Data2
  • /home/jonass/data2/mp3s or /home/jonass/mp3s -- The new partition you'll create in the free space

This approach is a bit inflexible, since it arbitrarily divides your free space between partitions, but it's a lot safer than trying to resize the start of a partition. If you've got a directory tree that's a bit smaller than the new free space and that you don't expect to grow significantly in size, this can be a good way to go.

In the long run, you might want to look into using a logical volume manager (LVM) setup. Using LVM, instead of putting filesystems in partitions, you put them in logical volumes, which are data structures within LVM partitions. The logical volumes can be managed a bit like files, which means that you can increase their size without touching their start points, even if the available space comes before the start of the logical volume. If you'd used LVMs for your current setup, you'd be able to easily increase the size of the logical volume to use the available space. Btrfs provides similar features without using an LVM, although it's officially experimental. If you wanted to begin moving in this direction, you could set up your freed space as an LVM or use Btrfs on it, and plan to convert more of your partitions in the future, whenever it becomes convenient. The main problem with LVMs is that Mint doesn't provide good install-time support for them.
srs5694
Level 6
Level 6
 
Posts: 1020
Joined: Mon Feb 27, 2012 1:42 pm

Re: reformatting hard drive

Postby jonass on Thu Jan 24, 2013 10:41 pm

741cc wrote:
Hmmm the problem with backing it up is I don't have an extra 350 GB

Your screen-shot shows you have 390.45GiB of Data on sda6 and you say that you have no back-up? Thats an awful lot of stuff to lose in the event of a mishap such as hardware failure, theft or user error. The mere fact that you are asking for assistance on re-partitioning makes the third event a likely outcome. Do you know what its like to look at agparted window and see a complete blank because you hit the wrong button (don't ask me how I know this :oops: ).

Take my advice:-
1. Beg, borrow or steal a device large enough to hold all your files, and then some.
2. Use rsync or something similar to back up all your stuff.
3. Check the authenticity of the backed-up files.
4. Then, and ONLY then, start messin' with your 750G drive.

It will be a lot easier to simply format it and start again as already stated above.
Good luck and feel free to ask any further questions.


Yeah ideally I will one day have a large 5TB back up drive for my almost 2.5 GB of data but its not financially feasible right now, just gotta live dangerously haha, I'll keep my eye on the good will up here as I have occasionally been able to find functioning external hard drives before, I don't want to attempt this if there is a good chance to lose my media files
jonass
Level 3
Level 3
 
Posts: 114
Joined: Wed Jun 22, 2011 7:11 pm

Re: reformatting hard drive

Postby caf4926 on Fri Jan 25, 2013 12:36 am

I don't want to attempt this if there is a good chance to lose my media files
Then don't. It looks like it's potentially a lot of pain for no real gain
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1784
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: reformatting hard drive

Postby 741cc on Fri Jan 25, 2013 9:32 am

If you can source some old hdd's, search the net or ebay for "usb ide/sata cable" or some thing similar and you should find some thing like this, to use them for storage/backups. Does exactly what it says in the description - a really versatile piece of kit (optical drive on netbook anyone?) and cheaper than caddies, too.


@srs5964
you might want to look into using a logical volume manager (LVM) setup

Thats exactly what I'm going to do - come across it several times but never bothered to research it. Good prompt :wink:
741cc
Level 3
Level 3
 
Posts: 155
Joined: Mon Sep 03, 2012 8:00 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: cycler2, DeVIL-I386, gibbs1984, LABordo, Mute Ant, Shunjoss, xenopeek and 39 guests