DIGIT-ARC read-only archive · snapshot: July 23, 2026

Linux partitioning queries.Separate home partition

31 posts · originally from https://geek.digit.in/community/threads/linux-partitioning-queries-separate-home-partition.77854/

shady_inc
shady_inc Original post #1
Jan 9, 2008 at 10:05 PM
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.:D ], will ubuntu and opensuse access the same home partition without any issues.??

Reagards,
shady_inc
praka123
Jan 9, 2008 at 10:11 PM
^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
shady_inc
Jan 9, 2008 at 10:20 PM
^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.??
praka123
Jan 9, 2008 at 10:26 PM
^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!.
shady_inc
Jan 9, 2008 at 10:33 PM
^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.
NucleusKore
Jan 9, 2008 at 10:45 PM
Check this post to enable multimedia without adding repositories. You can add the repositories later to make any updates if required.
shady_inc
Jan 10, 2008 at 1:23 PM
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
[COLOR="Red"]/dev/sda7 /home ext3 nodev,nosuid 0 2[/COLOR]
Red line is added by me.
infra_red_dude
Jan 10, 2008 at 1:51 PM
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?
shady_inc
Jan 10, 2008 at 2:25 PM
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.??
ray|raven
ray|raven #10
Jan 10, 2008 at 2:31 PM
sda means you have a SATA harddisk, while hda means you have an IDE harddisk.

Regards,
ray
praka123
praka123 #11
Jan 10, 2008 at 3:50 PM
@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 :D
infra_red_dude
Jan 10, 2008 at 7:52 PM
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.
shady_inc
shady_inc #13
Jan 10, 2008 at 8:58 PM
@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 :D
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.;( :(.
infra_red_dude
Jan 10, 2008 at 9:19 PM
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 :)
praka123
praka123 #15
Jan 10, 2008 at 10:09 PM
@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 [B]root=/dev/sda2[/B] 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. :oops:
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 .
infra_red_dude
Jan 10, 2008 at 10:16 PM
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 :)
Flake
Flake #17
Jan 10, 2008 at 10:18 PM
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.
praka123
praka123 #18
Jan 10, 2008 at 10:24 PM
^still old pata drivers are on use dude!yeah,the change was from 2.6.19 onwards to be precise.
@shady:report back :)
shady_inc
shady_inc #19
Jan 10, 2008 at 10:25 PM
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.:p], 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.;)
infra_red_dude
Jan 10, 2008 at 10:34 PM
@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.
Flake
Flake #21
Jan 10, 2008 at 10:35 PM
^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.
praka123
praka123 #22
Jan 10, 2008 at 10:42 PM
^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 :D;correct me if am wrong.
edit: source :)
*kernelnewbies.org/Linux_2_6_19#head-cdcbaa9c1b476decdc064e0a75d23d1328b1ddce
shady_inc
shady_inc #23
Jan 10, 2008 at 10:51 PM
@ 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
[COLOR=RED]/dev/sda: Not found or not a block device.[/COLOR]
praka123
praka123 #24
Jan 10, 2008 at 10:53 PM
again i was confused :oops:

OK.unmount as "sudo umount /mnt" and then run in terminal "sudo grub-install /dev/sda" and reply back.
shady_inc
shady_inc #25
Jan 10, 2008 at 10:54 PM
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.
praka123
praka123 #26
Jan 10, 2008 at 11:04 PM
^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?.
shady_inc
shady_inc #27
Jan 10, 2008 at 11:12 PM
^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:
*img90.imageshack.us/img90/6602/screenshotbootfilebrowset7.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.:p
Flake
Flake #28
Jan 10, 2008 at 11:19 PM
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?
praka123
praka123 #29
Jan 10, 2008 at 11:23 PM
^u meant *img90.imageshack.us/my.php?image=screenshotbootfilebrowset7.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
[COLOR=Red]/dev/sda7 /home ext3 nodev,nosuid 0 2[/COLOR]

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
Code:
sudo su -
and in "#" prompt,
run "grub" to get "grub>" prompt
then in grub>,
do :
Code:
root (hd0,1)
then;
Code:
setup (hd0)

try and reply asap dude!

EDITED fstab!
shady_inc
shady_inc #30
Jan 11, 2008 at 6:42 PM
^^Hey, that worked.Thanks a Lot to everyone.!!:p .Now I can proceed with the OpenSUSe [or any other distro] installation.Woohoo.!!
praka123
praka123 #31
Jan 11, 2008 at 8:15 PM
Pheww!thank Jesus! solved! :D ;)