When installing Kubuntu and you want to create manual LVM. But LVM you want to create is thin. Open Live Session. Make sure you have network access.
Install thin-provisioning-tools:
# apt-get install thin-provisioning-tools .....<-- you may need to enable "universe" repository in /etc/apt/sources.list
Now install as usual. First create LVM thin pool and thin volumes as you need:
# pvcreate /dev/sda5 ......(for example)
# vgcreate kubuntu /dev/sda5 ......(again, example)
# lvcreate kubuntu --thinpool thin -L size .....<-- "thin" is volume name
# lvcreate -T kubuntu/thinpool -n root -V 15G
# lvcreate -T kubuntu/thinpool -n home -V 30G .....<-- V specifies virtual size, may be bigger than -L size.
Now make filesystems manually or proceed with installation:
# mkfs.ext3 /dev/kubuntu/root
# mkfs.ext3 /dev/kubuntu/home
Install Kubuntu. Use LVM volumes for root, home, etc.
Wait till install is finished. Go back to root shell.
Chroot into /target:
# cd /target
# mount --bind /dev dev
# mount --bind /sys sys
# mount --bind /proc proc
# chroot .
Forget! Apt-get won't work in chroot. Go into other root shell (press ctrl-shift-T in Konsole, sudo su). Go to /var/cache/apt/archives.
# cp /var/cache/apt/archives/* /target/tmp
Back to first chroot shell:
# dpkg -i /tmp/*.deb
This will install thin-provisioning-tools in target system.
Now create /etc/initramfs-tools/hooks/thin-provisioning-tools with content:
Change perms:
# chmod /etc/initramfs-tools/hooks/thin-provisioning-tools
Run update-initramfs-tools:
# update-initramfs-tools -u
Presto! On reboot will work, otherwise won't work.
Check initramfs for test:
# lsinitramfs /initrd.img | grep thin
usr/sbin/thin_dump
usr/sbin/thin_restore
usr/sbin/thin_check
usr/sbin/thin_repair
lib/modules/x.y.z-a-generic/kernel/drivers/md/dm-thin-pool.ko
lib/modules/x.y.z-a-generic/kernel/drivers/hid/hid-thingm.ko
Is included in initramfs now. Boot should work.
Otherwise won't load LVM & kernel panic.
Good luck!
Install thin-provisioning-tools:
# apt-get install thin-provisioning-tools .....<-- you may need to enable "universe" repository in /etc/apt/sources.list
Now install as usual. First create LVM thin pool and thin volumes as you need:
# pvcreate /dev/sda5 ......(for example)
# vgcreate kubuntu /dev/sda5 ......(again, example)
# lvcreate kubuntu --thinpool thin -L size .....<-- "thin" is volume name
# lvcreate -T kubuntu/thinpool -n root -V 15G
# lvcreate -T kubuntu/thinpool -n home -V 30G .....<-- V specifies virtual size, may be bigger than -L size.
Now make filesystems manually or proceed with installation:
# mkfs.ext3 /dev/kubuntu/root
# mkfs.ext3 /dev/kubuntu/home
Install Kubuntu. Use LVM volumes for root, home, etc.
Wait till install is finished. Go back to root shell.
Chroot into /target:
# cd /target
# mount --bind /dev dev
# mount --bind /sys sys
# mount --bind /proc proc
# chroot .
Forget! Apt-get won't work in chroot. Go into other root shell (press ctrl-shift-T in Konsole, sudo su). Go to /var/cache/apt/archives.
# cp /var/cache/apt/archives/* /target/tmp
Back to first chroot shell:
# dpkg -i /tmp/*.deb
This will install thin-provisioning-tools in target system.
Now create /etc/initramfs-tools/hooks/thin-provisioning-tools with content:
Code:
#!/bin/sh PREREQ="lvm2" prereqs() { echo "" } case $1 in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions copy_exec /usr/sbin/thin_check copy_exec /usr/sbin/thin_dump copy_exec /usr/sbin/thin_repair copy_exec /usr/sbin/thin_restore copy_exec /sbin/dmeventd manual_add_modules dm_thin_pool
# chmod /etc/initramfs-tools/hooks/thin-provisioning-tools
Run update-initramfs-tools:
# update-initramfs-tools -u
Presto! On reboot will work, otherwise won't work.
Check initramfs for test:
# lsinitramfs /initrd.img | grep thin
usr/sbin/thin_dump
usr/sbin/thin_restore
usr/sbin/thin_check
usr/sbin/thin_repair
lib/modules/x.y.z-a-generic/kernel/drivers/md/dm-thin-pool.ko
lib/modules/x.y.z-a-generic/kernel/drivers/hid/hid-thingm.ko
Is included in initramfs now. Boot should work.
Otherwise won't load LVM & kernel panic.
Good luck!
Comment