LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Partitioning question (https://www.linuxquestions.org/questions/ubuntu-63/partitioning-question-470325/)

satimis 08-03-2006 02:02 AM

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

konsolebox 08-03-2006 03:18 AM

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

satimis 08-03-2006 03:43 AM

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

binary_y2k2 08-03-2006 04:26 AM

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

satimis 08-03-2006 05:14 AM

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

konsolebox 08-03-2006 05:42 AM

fdisk directly modifies the disks and ignores the kernel buffers. you can run fdisk anytime.

Helmut_K 08-05-2006 04:50 AM

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

syg00 08-05-2006 05:05 AM

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.

satimis 08-05-2006 05:21 AM

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

binary_y2k2 08-05-2006 08:15 AM

I use LVM and to set it up I just used the alternative CD, easier than doing it from CLI in a running system

satimis 08-05-2006 08:48 AM

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

binary_y2k2 08-05-2006 11:50 AM

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.

binary_y2k2 08-05-2006 03:28 PM

I've just made a basic howto of installing custom LVM from alternative CD Take a look

satimis 08-08-2006 12:26 AM

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

binary_y2k2 08-08-2006 05:10 AM

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)


All times are GMT -5. The time now is 07:50 PM.