LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing a second distro under LVM2 (https://www.linuxquestions.org/questions/linux-newbie-8/installing-a-second-distro-under-lvm2-284292/)

jkirby65 01-30-2005 09:23 PM

Installing a second distro under LVM2
 
Hello!

I need some help installing a second distro on a machine running Fedora 3. I put together an old machine just to experiment with linux. Currently, I have Fedora 3 running on a PII 350 Mghz machine with 192 MB of memory and a 40 GB hard drive. I am using fluxbox. Believe or not, this runs GREAT and I am really happy with it--- my first experience with linux is fantastic. But, I did this to learn, so I want to mess around a little. I would like to install damn small linux as a second bootable OS. Here is my plan.

1) Create 10 GB of free space from one of the partitions now used by Fedora using gnu parted.

2) Make a swap and a linux partition

3) Install DSL

4) Modify Grub

My first question--- is this plan OK?

My second question has to do with LVM2. My current install uses LVM2. Honestly, I don't know why I should use LVM2 and I don't know how to repartition a drive in this situation. Any help would be greatly appreciated. Output from mount, fdisk, lvdisplay, pvdisplay, and my fstab file are below, in case these help.

*****mount -l*****
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) []
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /boot type ext3 (rw) [/boot]
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

****./fdisk -l****
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 4865 38973690 8e Linux LVM

**** pvdisplay ****
--- Physical volume ---
PV Name /dev/hda2
VG Name VolGroup00
PV Size 37.16 GB / not usable 0
Allocatable yes
PE Size (KByte) 32768
Total PE 1189
Free PE 1
Allocated PE 1188
PV UUID nzZKFG-H3yX-gYk8-Nkvd-DX6I-eJyp-11Oxe1


**** lvdisplay ******
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID DBsvDj-8QnB-8ljW-39Gm-c0je-tIeH-e2zPme
LV Write Access read/write
LV Status available
# open 1
LV Size 36.75 GB
Current LE 1176
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID LNNEk4-m2DX-9i99-lA7K-JnSe-TBOi-hjW2pm
LV Write Access read/write
LV Status available
# open 1
LV Size 384.00 MB
Current LE 12
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

**** fstab file ******
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/hdd /media/cdrecorder auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
/dev/hdc /media/cdrom auto pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

aeruzcar 01-31-2005 06:00 AM

Hello there.
I believe that if you have already FC3 installed on your computer, you should already have a swap partition, which can be used for both disrtibutions, so you don't need to make a new swap partition, you only have to create a new / partition for damn small linux, you can use fdisk to do this.

Then after you have installed DSL you have to edit the grub.conf file and add a line that should look like this:

title DSL
kernel (hd0,0)/kernel* root=/dev/hda*

where (hd0,0) is your boot partition, kernel* is the name of the kernel and /hda* is the partition where DSL is installed

Hope this helps a little bit

jkirby65 01-31-2005 08:38 AM

Thanks! Very helpful.

My most immediate problem is extracting 10 GB from the logical volume holding my Fedora install. When I resize the logical value, reducing it my 10 GB, I cannot find the resulting free space, and therefore cannot make a partition for damn-small-linux. Maybe I do not need to use LVM2 at all, but just resize the partition using gnu-parted??

Thanks for you help!! It is good to know two distros can share a swap partition. Thanks for the grub lines too!

Jim

aeruzcar 01-31-2005 06:47 PM

how does your hard drive partitions look like??
try to do the following
fdisk /dev/hda

onec there tipe p and hit enter
it will list the partitions, write that down and we'll see what can be done

to exit fdisk just type q and hit enter

must do this as root

jkirby65 02-01-2005 07:11 AM

Here is the output from fdisk. Also, here is the output from "mount -l". If I understand it, I have a single hard drive (hda) with two partitions (hda1 and hda2). The first partition (hda1) is mounted on /boot/. The second partition (hda2) makes up Volume group 00 under LVM and is mounted on /. I am a little confused about where the swap is (buried in volume group 00?)

Thanks for your help.

***** fdisk -l *********
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 4865 38973690 8e Linux LVM

****** mount -l *********
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) []
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /boot type ext3 (rw) [/boot]
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


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