LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-03-2006, 02:02 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Partitioning question


Hi folks,

Please help me to understand what is following partition;
Code:
/dev/hda5   228M  4.1M  212M   2% /media/hda5
At time of installation I created;

/boot 255M (p)
/ 8G (p)
/home 10G (ext)
swap 1G (ext)


Now they are shown as;

$ sudo fdisk -l
Code:
Disk /dev/hda: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        2342    18812083+   5  Extended
/dev/hda5   *           1          31      248944+  83  Linux
/dev/hda6              32        1004     7815591   83  Linux
/dev/hda7            1005        2220     9767488+  83  Linux
/dev/hda8            2221        2342      979933+  82  Linux swap / Solaris
$ sudo df -h
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda6             7.4G  2.1G  5.0G  30% /
varrun                471M   92K  471M   1% /var/run
varlock               471M  4.0K  471M   1% /var/lock
udev                  471M  100K  471M   1% /dev
devshm                471M     0  471M   0% /dev/shm
lrm                   471M   22M  450M   5% /lib/modules/2.6.15-26-amd64-generic/volatile
/dev/hda7             9.2G  659M  8.1G   8% /home
/dev/hda5             228M  4.1M  212M   2% /media/hda5
According to order of their creation;

/boot should be /dev/hda1
/ should be /dev/hda2
/home should be /dev/hda5
swap should be /dev/hda6

I intentionally left /dev/hda3 (P) for another OS to be installed later from the unallocated space.

Why /home is on /dev/hda7 instead not /dev/hda5

Please advise. TIA

B.R.
satimis

Last edited by satimis; 08-03-2006 at 02:04 AM.
 
Old 08-03-2006, 03:18 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
you can sort your partitions by running fdisk. press x for expert mode then press m. press f to fix the partition's order.

Last edited by konsolebox; 08-03-2006 at 03:35 AM.
 
Old 08-03-2006, 03:43 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi konsolebox,

Tks for your advice.

Can I run it while the partitions are mounted? OR I have to run a LiveCD to fix it?

TIA

B.R.
satimis
 
Old 08-03-2006, 04:26 AM   #4
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
It looks like you have created 1 extended partition and in that you have
hda5 created for /boot (but not setup to be used as /boot)
hda6 for /
hda7 for /home
hda8 for swap

The partition numbers miss out 2-4 because logical partition numbers start at 5
 
Old 08-03-2006, 05:14 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi binary_y2k2,

Yes, I saved Grub/boot on MBR

At time of installation I created

- /boot 255M
- / 8G
- /home 10G
- swap 1G

the remaining space out of 40G unallocated. But can't understand how they became;
hda6 for /
hda7 for /home
hda8 for swap

I'm not going to rectify the problem but try to understand how it came avoiding repeating the same mistake in future.

I'm prepared to have another round wiping out the complete HD.

Tks.

B.R.
satimis
 
Old 08-03-2006, 05:42 AM   #6
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
fdisk directly modifies the disks and ignores the kernel buffers. you can run fdisk anytime.
 
Old 08-05-2006, 04:50 AM   #7
Helmut_K
LQ Newbie
 
Registered: May 2006
Posts: 15

Rep: Reputation: 0
Satimis,
Your extended partition is always numbered hda5. If you had not created an extended partition, the last partition you could create, or the partition with the highest count you possibly could create would be hda4, and you couldn't create any more than that on that drive. Thats why we create an extended partition and carry on from there.

Some theory behind it: We can not create more than four primary partitions. If we need more than those four, we need to create an extended partition (hda5) first. Then, all other partitions created will have a higher number (hda6 hda7 hdaxx and so on) and will be actually created within the bounds of that extended partion. If I'm not mistaken, we can create up to 64 partitions inside the extended partition.

Btw, another way to look at your drives is to call-up a console and type " df " or type "df -la"

Helmut

Last edited by Helmut_K; 08-05-2006 at 05:21 AM.
 
Old 08-05-2006, 05:05 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
You simply created all logical partitions - you apparently intended to allocate a couple of primaries, but didn't.
Why do you care ???.

The unallocated space can be allocated as primary partition(s) when you want to install that other O/S; no problem.

I think you are worried about nothing.
 
Old 08-05-2006, 05:21 AM   #9
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi folks,

Tks for your advice.

I wiped out the entire HD and did following steps to partition and create VG and LV

HD 40G ATA133/IDE

After partitioning

# fdisk -l
Code:
....
/dev/hda1 *  1     98    49360+  83  Linux
/dev/hda2   99  77557  39039336  8e  Linux LVM
# pvcreate /dev/hda2 && vgcreate VG /dev/hda2 && \
> lvcreate -L5g -nUbuntuRoot && lvcreate -L5g -nUbuntuHome && \
> lvcreate -L5g -nFC5Root && lvcreate -L5g -nFC5Home && \
> lvcreate -L10G -nData VG 2>&1 | less
File descriptor 3 left open
File descriptor 4 left open
File descriptor 5 left open
File descriptor 6 left open
cant' initialize physical volume "/dev/hda2" of volume group "VG"
without -ff


I did not know how to proceed? Please shed me some light. TIA


B.R.
satimis
 
Old 08-05-2006, 08:15 AM   #10
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
I use LVM and to set it up I just used the alternative CD, easier than doing it from CLI in a running system
 
Old 08-05-2006, 08:48 AM   #11
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi binary_y2k2,

Tks for your advice.

I ran Ubuntu-6.06-alternate-amd64 to install Ubuntu. If not for LVM I have no problem to get it installed and ran on PC.

I have been playing round the whole day without a breakthrough. First I ran GUI partitioning with LVM and can't get it done. Therefore I manual partitioning the HD still without result.

Does the HD needs to be set sector=1024 (bs=1024)? It is now bs=512. Tks.

B.R.
satimis
 
Old 08-05-2006, 11:50 AM   #12
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
I just installed on a blank HD and let the installer figure it all out for me.
Actually, to get it to work the exact way i wanted, I had to get in to the debian installer menu (press "go back" enough times on the install and you'll get there), then change the debconf priority to low and you can set how LVM is configured.
It's not exactly an easy way of setting it up, but then it's not the average users setup.
Also when I went in to a liveCD after, the partitioners (CLI or GUI) don't seem to see the LVs, just the LVM partition (since the LVs are inside a partition and aren't written to the partition table it's not that surprising). But I used the LVM installer module in the install cd to configure LVM.
 
Old 08-05-2006, 03:28 PM   #13
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
I've just made a basic howto of installing custom LVM from alternative CD Take a look
 
Old 08-08-2006, 12:26 AM   #14
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi binary_y2k2,

Tks for your Howto.

I can't find "Change debconf priority" page. Which installer you were running? I ran "Ubuntu-6.06-amd64". TIA

B.R.
satimis
 
Old 08-08-2006, 05:10 AM   #15
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
It should work with any installer, but I was using the x86 one, just hit "Go Back" enough times and youll see the menu.
You could also try adding "debconf/priority=low" to the boot options (press F6 at the boot menu)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partitioning question... Saurian Linux - Newbie 4 03-21-2006 08:39 AM
Partitioning question kuplo Linux - Newbie 4 11-10-2005 09:05 PM
partitioning question pablowablo Linux - General 2 02-12-2005 11:38 PM
I have a question about partitioning... Wind_Sp00n Linux - Newbie 12 09-07-2004 02:29 AM
re-partitioning question shilo Slackware 8 07-16-2004 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration