 |
|
09-01-2008, 10:05 PM
|
#1 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Linux partitioning queries.Separate home partition
Ok..So after using Ubuntu so long, I have decided to make it my primary OS.So, I want to merge some more space into the Ubuntu partition.Can Gparted do the job.??
Also I would like to have a separate home partition and came across this this tutorial for the same.What should be the ideal size for a home partition.??In future Iif I install a new distro [I have a opensuse 10.3 dvd and I am itching to try it out.  ], will ubuntu and opensuse access the same home partition without any issues.??
Reagards,
shady_inc
__________________
Life is as complicated as you say it is.
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
09-01-2008, 10:11 PM
|
#2 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
^u can share same /home for different distros.also,I will say a separate /home is a must if u r gonna have lot of stuff which u randomly download(torrents?) and delete and again fills!.make sure ur /home is around 20GB if space is not a problem,else stick with a >6GB
gparted cannot merge freespace.it needs formatted partition.also u cannot be so sure of gparted merging partitions!
Best a Luck a!
and,if at all ur gonna use gparted,always try the ubuntu/gparted livecd!dont use from installed ubuntu
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
09-01-2008, 10:20 PM
|
#3 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
Quote:
Originally Posted by praka123
^u can share same /home for different distros.also,I will say a separate /home is a must if u r gonna have lot of stuff which u randomly download(torrents?) and delete and again fills!.make sure ur /home is around 20GB if space is not a problem,else stick with a >6GB
gparted cannot merge freespace.it needs formatted partition.also u cannot be so sure of gparted merging partitions!
Best a Luck a!
and,if at all ur gonna use gparted,always try the ubuntu/gparted livecd!dont use from installed ubuntu
|
For home partition, I will stick with 7-8 gb.
By LiveCD, you mean installing Gparted in Ubuntu liveCD and not using Gparted LiveCD, right.??
__________________
Life is as complicated as you say it is.
|
|
|
09-01-2008, 10:26 PM
|
#4 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
^either ubuntu cd(ur install cd) to boot into live environment;make sure none of ur hdd partitions are mounted in livecd session(sudo umount /media/*) or use gparted livecd(is available) the same way!.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
09-01-2008, 10:33 PM
|
#5 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
Quote:
Originally Posted by praka123
^either ubuntu cd(ur install cd) to boot into live environment;make sure none of ur hdd partitions are mounted in livecd session(sudo umount /media/*) or use gparted livecd(is available) the same way!.
|
Ok..Thanks.Will do the partitioning job tomorrow and post back the results.
Cheers.!!
shady_inc.
__________________
Life is as complicated as you say it is.
|
|
|
09-01-2008, 10:45 PM
|
#6 (permalink)
|
|
TheSaint
Join Date: Jun 2004
Location: Antigua
Posts: 3,447
|
Re: Linux partitioning queries.Separate home partition
Check this post to enable multimedia without adding repositories. You can add the repositories later to make any updates if required.
__________________
http://www.neville.in
http://www.linuxrocks.in
"The Future Is Open"
|
|
|
10-01-2008, 01:23 PM
|
#7 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
I created the new home partition of 5 gb successfully.I even added a line in
/etc/fstab to automount it.But I can't see the new partition under computer:///.This is what I get on doing sudo fdisk -l
Code:
poisonblack@poisonblack-desktop:~$ sudo fdisk -l
Disk /dev/sda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x37233722
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1714 13767673+ 7 HPFS/NTFS
/dev/sda2 2372 4864 20025022+ f W95 Ext'd (LBA)
/dev/sda3 1715 2371 5277352+ 83 Linux
/dev/sda5 2433 4211 14289817+ 7 HPFS/NTFS
/dev/sda6 2372 2432 489919+ 82 Linux swap / Solaris
/dev/sda7 4212 4864 5245191 83 Linux
Partition table entries are not in disk order
poisonblack@poisonblack-desktop:~$
These are the contents of /etc/fstab
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda3
UUID=79d490c0-3c66-458e-818c-23c02fcd7d70 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=86F420E8F420DBE5 /media/sda1 ntfs defaults,umask=007,gid=46 0 1
# /dev/sda5
UUID=D0E06424E0641350 /media/sda5 ntfs defaults,umask=007,gid=46 0 1
# /dev/sda6
UUID=2c783cbb-544e-4e07-be8e-8b4e056d066b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/sda7 /home ext3 nodev,nosuid 0 2
Red line is added by me.
__________________
Life is as complicated as you say it is.
|
|
|
10-01-2008, 01:51 PM
|
#8 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Linux partitioning queries.Separate home partition
You won't see it in computer:///. To access that partition goto /home; since you've mounted it as home. Make sure it shows free space pertaining to 5GB one. Did you move your files from prev. /home to sda7 and then mounted sda7 as home?
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
10-01-2008, 02:25 PM
|
#9 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
Quote:
Originally Posted by infra_red_dude
You won't see it in computer:///. To access that partition goto /home; since you've mounted it as home. Make sure it shows free space pertaining to 5GB one. Did you move your files from prev. /home to sda7 and then mounted sda7 as home?
|
Oh...ok.So the partition will still be visible as Home folder.Yes, It does have ~5 gb free space.Thanks.
And yeah, I first moved over files from /home to new partition before mounting it.
One more thing.My partitions are listed as sda1,sda3 etc. while the link I gave in first post has partitions listed as hda1,hda3 etc.Why this difference of s and h.??
__________________
Life is as complicated as you say it is.
|
|
|
10-01-2008, 02:31 PM
|
#10 (permalink)
|
|
Think Zen.
Join Date: Dec 2005
Posts: 1,498
|
Re: Linux partitioning queries.Separate home partition
sda means you have a SATA harddisk, while hda means you have an IDE harddisk.
Regards,
ray
__________________
Do what you will; but not because you must. -- Zen Quote
|
|
|
10-01-2008, 03:50 PM
|
#11 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
@shady:ur partn order had changed as from the fdisk -l o/p.for fixing that(if interested) just run below sequences when max mounts are umounted.
sudo fdisk /dev/sda ;then press "x" enter;enter "f";enter "w" and enter "q" to quit  run a sudo partprobe for a immediate change if possible
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
10-01-2008, 07:52 PM
|
#12 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Linux partitioning queries.Separate home partition
To be precise the s in sda is not SATA but for SCSI. All SATA drives are mounted under SCSI emulation, while the h in hda refers to PATA drives.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
10-01-2008, 08:58 PM
|
#13 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
Quote:
Originally Posted by praka123
@shady:ur partn order had changed as from the fdisk -l o/p.for fixing that(if interested) just run below sequences when max mounts are umounted.
sudo fdisk /dev/sda ;then press "x" enter;enter "f";enter "w" and enter "q" to quit  run a sudo partprobe for a immediate change if possible 
|
Just followed the instructions.But I think I messed up somewhere.  Now I get an Error 17 right when the Grub is loading.So, I am using LiveCD atm.Any solution to this error.??
Contents of fdisk -l
Code:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x37233722
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1714 13767673+ 7 HPFS/NTFS
/dev/sda2 1715 2371 5277352+ 83 Linux
/dev/sda3 2372 4864 20025022+ f W95 Ext'd (LBA)
/dev/sda5 2372 2432 489919+ 82 Linux swap / Solaris
/dev/sda6 2433 4211 14289817+ 7 HPFS/NTFS
/dev/sda7 4212 4864 5245191 83 Linux
Contents of /boot/grub/menu.lst.Only part I thought was important.
Code:
## ## End Default Options ##
title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=79d490c0-3c66-458e-818c-23c02fcd7d70 ro quiet splash locale=en_US
initrd /boot/initrd.img-2.6.22-14-generic
quiet
title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=79d490c0-3c66-458e-818c-23c02fcd7d70 ro single
initrd /boot/initrd.img-2.6.22-14-generic
title Ubuntu 7.10, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows NT/2000/XP (loader)
root (hd0,0)
savedefault
makeactive
chainloader +1
Just checked Gparted and it's showing entire partition as unallocated.;(  .
__________________
Life is as complicated as you say it is.
Last edited by shady_inc; 10-01-2008 at 09:04 PM.
|
|
|
10-01-2008, 09:19 PM
|
#14 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Linux partitioning queries.Separate home partition
The Fdisk from the livecd indicates that there is linux installed. However to confirm that its not an empty partition just run: df -h command or use the Disk free space utiltiy. It shouldn't be fully empty.
After ensuring that edit your <linux part>/boot/grub/menu.lst
Now change all the lines with "root (hd0,2)" to "root (hd0,1)". This should set things rite
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
10-01-2008, 10:09 PM
|
#15 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
@shady:i am sorry  .what those commands did was fixing the partition order!nothing happened;just that partition numbering may got fixed.the problem is most prolly due to the uuid menace.
inorder to restore the grub,try below commands from ubuntu livecd session:
1.mount ur / partition(/dev/sda2) in /mnt directory and edit /boot/grub/menu.lst as below for fix.
in detail,
open terminal in livecd,then run:
Code:
sudo mount /dev/sda2 /mnt
now press ALT+F2 to get run dialog and run :
Code:
gksudo gedit /mnt/boot/grub/menu.lst
and edit title Ubuntu 7.10, kernel 2.6.22-14-generic as below and save and exit:
Code:
title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sda2 ro quiet splash locale=en_US
initrd /boot/initrd.img-2.6.22-14-generic
quiet
now,if grub is totally missing in ur boot,u need to run below commands from livecd terminal. 
guessing ubuntu hdd /dev/sda3 is mounted on /mnt,
Code:
sudo chroot /mnt /bin/bash
now run:
Code:
grub-install /dev/sda
thats it!.again reboot and try:
also,when in a ubuntu session from harddisk,u can run "vol_id" or "blkid" commands to find the corresponding UUID's of /dev/sda3 and edit the /boot/grub/menu.lst .
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
10-01-2008, 10:16 PM
|
#16 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Linux partitioning queries.Separate home partition
If I am correct the uuids won't change even if the partition number changes; changes only if the partition is restructured. Anyways, try these things shady; I'm sure everything'll be fine
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
10-01-2008, 10:18 PM
|
#17 (permalink)
|
|
Linux User
Join Date: Jan 2008
Location: Chandigarh, India
Posts: 145
|
Re: Linux partitioning queries.Separate home partition
Quote:
Originally Posted by infra_red_dude
To be precise the s in sda is not SATA but for SCSI. All SATA drives are mounted under SCSI emulation, while the h in hda refers to PATA drives.
|
Hi !
This is not true any more. Latest kernels ( 2.6.22 onwards ) have updated IDE drivers. These drivers assign sdx name to all types of HDs. There isn't any hdx now.
|
|
|
10-01-2008, 10:24 PM
|
#18 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
^still old pata drivers are on use dude!yeah,the change was from 2.6.19 onwards to be precise.
@shady:report back
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
10-01-2008, 10:25 PM
|
#19 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
I followed that procedure of changing (hd0,2) to (hd0,1) [and in the process also learnt that (hd0,0)=sda1, (hd2,3)=sdc4 ..... GR8.  ], but it didn't solve the problem.Now trying praka123's solution.
@ praka123: No need to be sorry for it mate.Atleast the partition table has been fixed now.
__________________
Life is as complicated as you say it is.
|
|
|
10-01-2008, 10:34 PM
|
#20 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Linux partitioning queries.Separate home partition
@shady
Don't worry you'll soon haf your system back
@ghost
Yes, the s in sda is still for SCSI. PATA drives are assigned sda1, sdax coz even they are loaded thru the SCSI emulation driver by certain kernels. As a matter of fact my laptop uses a seagate ide pata hdd and I use Ubuntu GG with 2.6.22 kernel and the partitions are still mounted as hda1/hda2 etc. by default for me. So if the kernel module mounts the disk in SCSI emulation whether its SATA or PATA it will be named as sda otherwise its hda.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
10-01-2008, 10:35 PM
|
#21 (permalink)
|
|
Linux User
Join Date: Jan 2008
Location: Chandigarh, India
Posts: 145
|
Re: Linux partitioning queries.Separate home partition
Quote:
Originally Posted by praka123
^still old pata drivers are on use dude!yeah,the change was from 2.6.19 onwards to be precise.
|
Hi !
Old Driver?? Could you post any link friend? Latest kernels are using new drivers that why hdx are sdx now.
|
|
|
10-01-2008, 10:42 PM
|
#22 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
^I know in the aspect that the old pata drivers from andrew morton which is still used in pata hdd's( afaik and i have a sata only!) and most of the ide cd/dvd drives!i know that new drivers are there which will make ur pata device having /dev/scd0 or /dev/sr0 {libata} instead of /dev/hda;still old pata drivers are which is working fine for my dvd writer
the source is my own custom kernel dosth  ;correct me if am wrong.
edit: source
http://kernelnewbies.org/Linux_2_6_1...d23d1328b1ddce
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
10-01-2008, 10:51 PM
|
#23 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
@ praka123: I followed all the steps in your post.Rebooted once after editing menu.lst file.But the error was still there.So, I got back to liveCD terminal and mounted sda2 [you had mentioned sda3 in your post, but I guess that was typo,right.??] in /mnt directory.Now, on doing the final step i.e.:
Code:
grub-install /dev/sda
I get following:
Code:
ubuntu@ubuntu:~$ sudo mount /dev/sda2 /mnt
ubuntu@ubuntu:~$ sudo chroot /mnt /bin/bash
root@ubuntu:/# grub-install /dev/sda
/dev/sda: Not found or not a block device.
__________________
Life is as complicated as you say it is.
|
|
|
10-01-2008, 10:53 PM
|
#24 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
again i was confused
OK.unmount as "sudo umount /mnt" and then run in terminal "sudo grub-install /dev/sda" and reply back.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
10-01-2008, 10:54 PM
|
#25 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
Quote:
Originally Posted by praka123
OK.unmount as "sudo umount /mnt" and then run in terminal "sudo grub-install /dev/sda" and reply back.
|
No, I still get:
Code:
Could not find device for /boot: Not found or not a block device.
__________________
Life is as complicated as you say it is.
|
|
|
10-01-2008, 11:04 PM
|
#26 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
^shady:check ur /mnt directory for (/dev/sda2) ur ubuntu hdd install be there already(use nautilus file manager for viewing)!also,check the hdd ubuntu /boot directory for all files intact like vmlinuz-xx,initrd.img etc.
and BTW,/dev/sda7 is ur /home partn?.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
10-01-2008, 11:12 PM
|
#27 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
Quote:
Originally Posted by praka123
^shady:check ur /mnt directory for (/dev/sda2) ur ubuntu hdd install be there already(use nautilus file manager for viewing)!also,check the hdd ubuntu /boot directory for all files intact like vmlinuz-xx,initrd.img etc.
and BTW,/dev/sda7 is ur /home partn?.
|
Yup, I can access all my ubuntu HDD files in /mnt folder.The /boot directory contains:
http://img90.imageshack.us/img90/660...lebrowset7.png [60 kb image]
And, yes sda7 is my new home partition.
EDIT: I need to go offline now.Will check back the problem status and for some help here tomorrow.Thanks for all the help till now.
__________________
Life is as complicated as you say it is.
|
|
|
10-01-2008, 11:19 PM
|
#28 (permalink)
|
|
Linux User
Join Date: Jan 2008
Location: Chandigarh, India
Posts: 145
|
Re: Linux partitioning queries.Separate home partition
I would suggest you to boot up from SuperGRUB CD and select ' Fix Linux Boot Loader (GRUB)' option. It will detect conf files of GRUB and re-install it.
In case, it doesn't work, we will have to look somewhere else.
BTW, how did you copy files of /home folder to new partition? Did you retain permissions? I mean, did you use -a option with cp command?
|
|
|
10-01-2008, 11:23 PM
|
#29 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Linux partitioning queries.Separate home partition
^u meant http://img90.imageshack.us/my.php?im...lebrowset7.png
now in the livecd session,in mounted ubuntu partition, edit ur /etc/fstab as follows to add ur / and /boot:
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
[B]# /dev/sda2
/dev/sda2 / ext3 defaults,errors=remount-ro 0 1
proc /proc proc defaults 0 0
# /dev/sda1
UUID=86F420E8F420DBE5 /media/sda1 ntfs defaults,umask=007,gid=46 0 1
# /dev/sda5
UUID=D0E06424E0641350 /media/sda5 ntfs defaults,umask=007,gid=46 0 1
# /dev/sda6
UUID=2c783cbb-544e-4e07-be8e-8b4e056d066b none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/sda7 /home ext3 nodev,nosuid 0 2
OK.I think it is time for to set grub natively!
unmount ur hdd ubuntu partition as above(sudo umount /dev/sda2)
in livecd,open a terminal,run
and in "#" prompt,
run "grub" to get "grub>" prompt
then in grub>,
do :
then;
try and reply asap dude!
EDITED fstab!
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
11-01-2008, 06:42 PM
|
#30 (permalink)
|
|
Pee into the Wind...
Join Date: May 2007
Location: Mumbai
Posts: 782
|
Re: Linux partitioning queries.Separate home partition
^^Hey, that worked.Thanks a Lot to everyone.!!  .Now I can proceed with the OpenSUSe [or any other distro] installation.Woohoo.!!
__________________
Life is as complicated as you say it is.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|