Linux partitioning queries.Separate home partition

Status
Not open for further replies.

shady_inc

Pee into the Wind...
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

left this forum longback
^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
 
OP
shady_inc

shady_inc

Pee into the Wind...
^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

left this forum longback
^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!.
 
OP
shady_inc

shady_inc

Pee into the Wind...
^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

TheSaint
Check this post to enable multimedia without adding repositories. You can add the repositories later to make any updates if required.
 
OP
shady_inc

shady_inc

Pee into the Wind...
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

Wire muncher!
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?
 
OP
shady_inc

shady_inc

Pee into the Wind...
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.??
 

praka123

left this forum longback
@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

Wire muncher!
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.
 
OP
shady_inc

shady_inc

Pee into the Wind...
@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.;( :(.
 
Last edited:

infra_red_dude

Wire muncher!
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

left this forum longback
@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

Wire muncher!
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

Linux User
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

left this forum longback
^still old pata drivers are on use dude!yeah,the change was from 2.6.19 onwards to be precise.
@shady:report back :)
 
OP
shady_inc

shady_inc

Pee into the Wind...
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

Wire muncher!
@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.
 
Status
Not open for further replies.
Top Bottom