Things quickly turned ugly as I found out that the 'advanced partitioning' provided by ubuntu is no where near what I am used to when installing RHEL or SLES at work. I soon found out to install to LVM you first need to setup your LVM configuration and mkfs your volumes BEFORE you start the ubuntu install. After everything is setup it will see them and you can then specify what you want to mount where and the install will work as you want it.
Of course there are some workarounds to doing all this ... here is the process I used.
- Get your Ubuntu 9.10 install/live cd
- If you do not have network for the system your installing to (wired or wireless) then download the following to a USB drive (these are 32-bit versions since I have a netbook, you may need to find 64-bit versions for your install)
- Boot your system using the Ubuntu 9.10 install/live cd
- Once booted open a terminal and get root
- sudo su -
- For systems with no network:
- Insert your USB stick with the packages you downloaded above
- cd to /media/[USBdriveName]
/[directoryWithPackages] - Install lvm2 and watershed to the live cd OS
- dpkg -i lvm2*.dev watershed*.deb
- dpkg -i lvm2*.dev watershed*.deb
- For systems with network:
- apt-get update
- apt-get install lvm2
- fdisk /dev/sda
- o
- w
- n
- p
- 1
- 1
- +100M
- n
- p
- 2
- t
- 2
- 8e
- w
- fdisk /dev/sdb
- o
- w
- This is where I had some issues. I had some type of lock on /dev/sdb when trying to do the next step of pvcreate to pull it into LVM ... so I needed to reboot to release it. If you need to reboot to use your disk you will need to follow steps 1-6 from the first section to get a live boot enviornment with LVM running again.
- pvcreate /dev/sda2
- pvcreate /dev/sdb
- mkfs.ext2 /dev/sda1
- vgcreate rootdisk /dev/sda2 /dev/sdb
- lvcreate -i2 -I4 -L6G -nroot_lv rootdisk
- lvcreate -l100%PVS -nvar_lv rootdisk /dev/sda2
- lvcreate -l100%PVS -nhome_lv rootdisk /dev/sdb
- mkfs.ext4 /dev/rootdisk/root_lv
- mkfs.ext4 /dev/rootdisk/var_lv
- mkfs.ext4 /dev/rootdisk/home_lv
- Start install
- When you get to partition/disk setup section choose advanced
- You will see the /dev/mapper/[vg]
- [lv] devices you created in LVM. Below them will be the filesystem you put on each. Highlight the filesystem one and click the "Change..." button to specify the filesystem to use (should match how you mkfs above) and where to mount. DO NOT HAVE THE INSTALL REFORMAT THE FILESYSTEM. - For /dev/sda1 highlight and click "Change...". Specify the filesystem, where to mount (/boot) and DO HAVE IT FORMAT IT!
- Proceed through the rest of the questions to start the install
These instructions follow how I setup my system, you need to make adjustments for the VG/LV names you created.
- mount /dev/rootdisk/root_lv /mnt
- mount /dev/rootdisk/var_lv /mnt/var
- mount /dev/rootdisk/home_lv /mnt/home
- mount /dev/sda1 /mnt/boot
- mount -t proc proc /mnt/proc
- mount -t sysfs sys /mnt/sys
- mount -o bind /dev /mnt/dev
- IF YOU DO NOT HAVE NETWORK:
- Insert your USB stick with the packages you downloaded above
- cd to /media/[USBdriveName
]/[directoryWithPackages] - cp lvm2*.dev watershed*.deb libreadline5*.deb /mnt/var/tmp
- chroot /mnt
- cd /var/tmp
- dpkg -i lvm2*.dev watershed*.deb libreadline5*.deb
- IF YOU HAVE NETWORK:
- chroot /mnt
- apt-get update
- apt-get install lvm2
- mkinitramfs -o /boot/[filenameOfCurrentInitramfs]
- reboot
- Packages for ubuntu karmic
- Talking about installing ubuntu to LVM in general
- Where I found out that I needed to install lvm2 to my installed OS to allow it to boot from root filesystem in LVM
- LVM striping howto
No comments:
Post a Comment