It is currently Sat Jul 06, 2024 2:50 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: linux partition question
PostPosted: Thu May 24, 2012 11:50 am  (#1) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
Ok so I'd appreciate if some of the more experienced linux users here would pitch in here... I recently decided to reduce the size of my windows partition since I don't really use windows almost at all these days, but now the thing is, the hard drive looks about this:

(Windows)--------(linux boot)(linux home)(swap)

where the ---- is unallocated space.

So I'd have to move the linux partitions left, so that I can increase their size, but while googling about it I've read some conflicting information - some say that doing this may mess up GRUB so that linux wouldn't be able to boot, even the gparted manual warns about this, but then some say that this isn't a problem on ubuntu because of the way grub is installed or something...

I'm going to need clarification here, is it true or not that moving the boot partition would mess up grub, and if so, will it be hard to fix using the live cd?

There's no real hurry to doing this, I still have plenty of free space on both partitions, so I'd rather know exactly what I'm doing here without rushing into things...


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: linux partition question
PostPosted: Thu May 24, 2012 1:52 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2012
Posts: 583
Just go into the Windows boot. Load up the windows partition manager. "Shrink" the disk space by however much you want. At that point it becomes unallocated. (As I am not a avid linux user from here out I got nothing but assumptions) Then go into linux and grab it with a linux partition manager, I guess?

_________________


"In the face of adversity, there's three things: fly, freeze or fight; We're choosing to fight..."- Guy Boucher, Tampa Bay Lighting Head Coach


Top
 Post subject: Re: linux partition question
PostPosted: Thu May 24, 2012 2:31 pm  (#3) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
ZWard117 wrote:
Just go into the Windows boot. Load up the windows partition manager. "Shrink" the disk space by however much you want. At that point it becomes unallocated. (As I am not a avid linux user from here out I got nothing but assumptions) Then go into linux and grab it with a linux partition manager, I guess?


I don't think you really understood my question... I've already shrunk the windows partition, that's not the issue here.


Top
 Post subject: Re: linux partition question
PostPosted: Thu May 24, 2012 2:36 pm  (#4) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
I wouldn't use guess work when creating partitions in Linux. My advice if you are not sure, don't try it.

_________________
Image


Top
 Post subject: Re: linux partition question
PostPosted: Thu May 24, 2012 2:41 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2012
Posts: 583
I understood your question, "Where is the Unallocated Space?" Windows likes to hog it all. W/e there is a great tool out there called Google!

_________________


"In the face of adversity, there's three things: fly, freeze or fight; We're choosing to fight..."- Guy Boucher, Tampa Bay Lighting Head Coach


Top
 Post subject: Re: linux partition question
PostPosted: Thu May 24, 2012 2:51 pm  (#6) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2439
I have to confess that I have more or less tried this in the past using a partition image and failed miserably. The partition 'uuid' will change etc, but this was using legacy-grub (which I still use) and looks like it might be easier with grub2

https://help.ubuntu.com/community/Boot-Repair - obviously for 'buntu - which distro do you use?

There is also supergrub - it certainly boots a broken installation, fixing is another matter.
http://www.supergrubdisk.org/super-grub2-disk/

Alternatives
1.Depending on the free space, make a new fresh parallel installation, copy what you need from the old and then delete. Remember that the system can go on a primary partition and the rest, home,swap & data can go on an extended partition. That data partition could be formatted ntfs to share with windows.
edit: just had a look again at your layout - are all these primary partitions?

2. If you are using one of the 'update-every-six-months' distros, why not hang on wipe everything clean, (back up all your data first) and do a fresh install.

_________________
Image


Top
 Post subject: Re: linux partition question
PostPosted: Thu May 24, 2012 4:38 pm  (#7) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
ZWard117 wrote:
I understood your question, "Where is the Unallocated Space?" Windows likes to hog it all. W/e there is a great tool out there called Google!


Sorry, but no, you didn't. And like I said in my post I already googled it but got conflicting answers... Thanks for trying anyway, but guesswork really isn't very helpful here.


rich2005 wrote:
I have to confess that I have more or less tried this in the past using a partition image and failed miserably. The partition 'uuid' will change etc, but this was using legacy-grub (which I still use) and looks like it might be easier with grub2

https://help.ubuntu.com/community/Boot-Repair - obviously for 'buntu - which distro do you use?


I'm using Ubuntu with the latest LTS version 12.04.

I've read about the boot-repair utility, it should be included on the live-cd I think? I just don't know, is it hard to use and will it fix the boot-up problems for sure if grub can't find the boot partition...

Also I checked and yes, I do have GRUB 2

rich2005 wrote:
Alternatives
1.Depending on the free space, make a new fresh parallel installation, copy what you need from the old and then delete. Remember that the system can go on a primary partition and the rest, home,swap & data can go on an extended partition. That data partition could be formatted ntfs to share with windows.
edit: just had a look again at your layout - are all these primary partitions?

2. If you are using one of the 'update-every-six-months' distros, why not hang on wipe everything clean, (back up all your data first) and do a fresh install.


The windows partition is a primary partition, all the others are on the extended partition. Does this mean that I have to resize the extended partition first, and then move the logical partitions inside it?

Also I don't think the boot partition needs to be a primary partition on linux, at least mine is inside the extended partition.

I really would rather avoid reinstalling, it's such a pain and hassle...

molly wrote:
I wouldn't use guess work when creating partitions in Linux. My advice if you are not sure, don't try it.


Yeah, that's why I'm asking questions here. I'm also not creating a partition, I just need to move the existing system partition a bit to the left, so that I can grow their size...


If my first post was unclear, here's a screenshot of my partitions:

Image


Another question: would it be possible to have two partitions mounted to the same location? Specifically, could I just create a new primary partition in the unallocated space and mount it on /home, so that I'd have two home partitions?


Top
 Post subject: Re: linux partition question
PostPosted: Thu May 24, 2012 7:23 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
dd wrote:
The windows partition is a primary partition, all the others are on the extended partition.

Then your easiest solution is to install Logical Volume Manager and combine your unallocated partition and your /home partition into a logical group. As long as your sda5 partition remains root (/), grub should work fine (you will probably need to adjust your /etc/fstab mountpoint for /home).


dd wrote:
Another question: would it be possible to have two partitions mounted to the same location? Specifically, could I just create a new primary partition in the unallocated space and mount it on /home, so that I'd have two home partitions?

Only the most recently mounted filesystem will be accessible. After you unmount that partition, the one "underneath" it will be available.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: linux partition question
PostPosted: Thu May 24, 2012 11:26 pm  (#9) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
saulgoode wrote:
Then your easiest solution is to install Logical Volume Manager and combine your unallocated partition and your /home partition into a logical group. As long as your sda5 partition remains root (/), grub should work fine (you will probably need to adjust your /etc/fstab mountpoint for /home).


Hm, so you're certain that moving sda5 & the extended partition would cause problems for GRUB?


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 3:29 am  (#10) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2439
Once you start delving into partitioning everyone has their own ideas, I know mine are specific to my interests.

However & FWIW.
All your linux stuff is on an extended partition and you can only have one. I recently tried resizing, similar exercise to yours, and lost all the logical partitions. So proceed with care and 'rule-number-one' applies - make backups.

Saulgoode has a valid suggestion, Ubuntu has a logical volume manager, never been in the position to use it so I can not comment.
It is there as the LVM2 package. http://i.imgur.com/meqX3.jpg

Looking at your setup I would be even more inclined to start afresh, after all it is not M$ and an install only takes 20 minutes.
You could zip all the data in your home folder to the windows partition for recovery later. It is no big problem restoring email, documents, .gimp-2.x folders etc.

Your root partition is 76 MB, used 8.5 MB, maybe 15 MB would do.
Your home is 30 Mb used 13 MB, keep it the same and make another logical partition (110 MB-ish) for data.

_________________
Image


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 5:00 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Oct 29, 2010
Posts: 711
Location: Netherlands
When you resize a partition it's UUID will change!
But what is sure to cause problems is the physical start of your install.
I would backup anything important and then after resizing re-install.
After re-install you can replace the backup files.
I use a USB harddisk to backup.
For copying files back and forth I use "cp -a".
I could give you a complete howto if you're interested.
Gerard.

_________________
Gentoo Linux always up-to-date.
Kernel-3.17.4 Python-2.7.8/3.3.5
Gimp-2.8.14

I use Linux only.
And Virtualbox with Win 7


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 5:13 am  (#12) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
dd wrote:
Hm, so you're certain that moving sda5 & the extended partition would cause problems for GRUB?

I do not use GRUB so my level of certainty on any of its behavior would be rather low. Nonetheless, my understanding is that GRUB looks for specific files in a filesystem that exists on a particular partition, so I would expect that as long as the relevant files are in the same location in the filesystem and the filesystem is located on the same partition, GRUB should have no problem finding them regardless of where that partition is located on the disk. However, if you move the filesystem to another partition, or the partition "name" changes in any way (e.g., from /dev/sda6 to /dev/sda3 *) then the GRUB configuration would need to be updated.

For what it's worth, I shouldn't consider this as "causing problems for GRUB", merely that you have to update GRUB to let it know when there are changes to the boot file's locations. The only caution is that you have to plan ahead and use a separate boot process (i.e., a Live CD) because GRUB won't function properly until you've reconfigured it.


* GRUB uses a different naming scheme whereby /dev/sda1 is called "hd(0,0)" and /dev/sdb3 would be "hd(1,2)" -- but the concept of these being the "name" of the partition remains the same. GRUB can also use UUID (unique unit identifiers, or somesuch) to identify the partitions but, again, you would only need to reconfigure GRUB if the UUID of your system partitions changed.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 5:24 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Oct 29, 2010
Posts: 711
Location: Netherlands
saulgoode that is grub1.
Grub2 only uses UUID.
Gerard.

_________________
Gentoo Linux always up-to-date.
Kernel-3.17.4 Python-2.7.8/3.3.5
Gimp-2.8.14

I use Linux only.
And Virtualbox with Win 7


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 7:18 am  (#14) 
Offline
GimpChat Member

Joined: Oct 31, 2011
Posts: 112
Hello there,

Sorry I don't really know the answer. but I have used ubuntu and in the past I have played around with partition, so maybe I can tell you few things. first of all, beware if you play around with extended partition. at the past, I had a laptop which looks like this: 2 hidden stupid primary partitions from the laptop itself, 1 primary for windows, and 1 extended for linux + data. and I already forgot what I did, but basically I ended up losing my data partition! and at that time I didn't back up my data :gaah . (I could recover my data after painful efforts.) but in your case, I don't see your extended partition contain data, so MAYBE it will be ok to grow your linux partition. and btw you don't have separate partition for data? I think you should.......

so yeah, I think just try to grow your linux partition, but don't forget to BACKUP your data. and if everything goes wrong, just clean install linux :D


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 8:04 am  (#15) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
Quote:
btw you don't have separate partition for data? I think you should


I have a separate partition for /home, what exactly do you mean by data partition?

Quote:
When you resize a partition it's UUID will change!
But what is sure to cause problems is the physical start of your install.


Ok... you're sure about this? Also, if so, can't this be fixed by the boot-repair utility that comes with the live cd? If I understand correctly it should be able to fix grub and other boot problems even after moving partitions...

I'd really like to find a way to do this without reinstalling, because if I do that I'll also have to reinstall all software, compile things from source etc. which is bound to be a huge pain in the ass...


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 11:45 am  (#16) 
Offline
GimpChat Member

Joined: Oct 31, 2011
Posts: 112
dd wrote:
Quote:
btw you don't have separate partition for data? I think you should


I have a separate partition for /home, what exactly do you mean by data partition?

I'd really like to find a way to do this without reinstalling, because if I do that I'll also have to reinstall all software, compile things from source etc. which is bound to be a huge pain in the ass...


now I see again that you have /home already, that's what I mean by data partition. but maybe you need to format it in ntfs, so that windows could read it? just saying......

and also, I am sorry couldn't help you better. anyway, for playing with partition, you should always prepare for the worst option: clean install :mrgreen:


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 12:01 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Oct 29, 2010
Posts: 711
Location: Netherlands
dd assume this is your HD picture:
|-----------------------------------|-------------------------|
^ ^ ^
start Windows end/start Linux end
And after resizing you have this:
|------------------|------------------------------------------|
^ Windows ^ ^ Linux ^
The space freed for Linux contains garbage!
The only way to do this w/o loosing anything is to backup at least Linux.
I have no time to tell you how to go about it now,will be back later.
Gerard.
Edit: for some reason the ^ are being moved by the site.

_________________
Gentoo Linux always up-to-date.
Kernel-3.17.4 Python-2.7.8/3.3.5
Gimp-2.8.14

I use Linux only.
And Virtualbox with Win 7


Top
 Post subject: Re: linux partition question
PostPosted: Fri May 25, 2012 6:08 pm  (#18) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
hanciong wrote:
now I see again that you have /home already, that's what I mean by data partition. but maybe you need to format it in ntfs, so that windows could read it? just saying......


Why would I want to make my home partition readable for windows, that'd just be a huge security hole... besides, my home directories are encrypted anyway, so the point is moot.


gerard82 wrote:
dd assume this is your HD picture:


No, this is my hd picture:

Image

As you can see I've already shrunk the windows partition, so all I'd need to do is move the extended partition to the left...

gerard82 wrote:
The space freed for Linux contains garbage!
The only way to do this w/o loosing anything is to backup at least Linux.


how is it full of "garbage", isn't the space going to be re-formatted if I move another partition there?

Quote:
Edit: for some reason the ^ are being moved by the site.


You need to use [code] tags for formatted text, otherwise phpbb will shrink all iterations of whitespace into a single whitespace, and remove all whitespace from line beginnings.


Top
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Installing SCM in Fedora Linux

2

No new posts Attachment(s) I am looking for a UserFilter 64 bit plugin for Linux

3

No new posts Attachment(s) Gimp on Linux with OpenCL

11

No new posts Attachment(s) Stupid Question II

9

No new posts Digikam question

1



* Login  



Powered by phpBB3 © phpBB Group