Page 1 of 1

[SOLVED] Installation on LVM

Posted: 3. Sep 2014, 08:23
by AforAcronym
Hi.

I tried to install Salix64 14.1 (Xfce) on LVM partitions and cannot boot. I used instructions from Alien: http://slackware.osuosl.org/slackware-1 ... ME_LVM.TXT

What exactly I did.
1. Made an installable USB stick with dd, it seems to work fine

2. Booted from it on my PC. The partition table was as follows:
  • /dev/sda1 — ntfs [~100M]
  • /dev/sda2 — ntfs [~112G] — the target partition
  • /dev/sda3 — ntfs [~530G]
  • /dev/sda4 — ntfs [~ 97G]
3. Exited the setup and made LVM partitions:

Code: Select all

# ... cfdisk'ed /dev/sda2 to 8E (LVM physical volume)
pvcreate /dev/sda2
vgcreate vgall /dev/sda2
lvcreate -L 15G -n root vgall
lvcreate -L 90G -n home vgall
lvcreate -L 6G -n swap vgall
lvcreate -l 100%FREE -n boot vgall
4. Then I started the setup program, assigned mounting points of /dev/vgall/{root,home,boot} to corresponding directories. Formatted root and home as ext4, and boot as ext2. I forgot to mkswap, so I skipped it for better times.

5. After the installation, as AlienBOB writes, I exited the installer to command prompt. I chrooted into /mnt, made initrd with command he provided:

Code: Select all

mkinitrd -c -k 3.10.17 -m ext4 -f ext4 -r /dev/vgall/root -L
Then I edited lilo.conf, where I found strange '(IN' inclusion in root (bug?):

Code: Select all

image = /boot/vmlinuz
root = (IN
label = linux
read-only
Then, on boot, I got messages like 'Exec format error' about mbcache, jbd2.ko, ext4, message about \(IN' nad /mnt.

6. The last attempt to fix the system was mounting installed system FS in /mnt and making initrd the right way (as well as i guiess)

Code: Select all

vgchange -ay # makes LVM partition in 'vgall' VG active
mount /dev/vgall/root /mnt
mount /dev/vgall/home /mnt/home
mount /dev/vgall/boot /mnt/boot
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt
/usr/share/mkinitrd/mkinitrd_command_generator.sh -r

The last command gives a command to generate initrd but in has '(IN ' inclusion after -r key, so I deleted it (This may be a bug, also see sec. 5)

Code: Select all

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -r

mkinitrd -c -k 3.10.17 -f ext4 -r (IN /dev/vgall/root -m usb-storage:ehci-hcd:ehci-pci:usbhid:hid_generic:uhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz

Code: Select all

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -r | sed s/\(IN//

mkinitrd -c -k 3.10.17 -f ext4 -r /dev/vgall/root -m usb-storage:ehci-hcd:ehci-pci:usbhid:hid_generic:uhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
7. And then I edited lilo.conf as Alien says

Code: Select all

image = /boot/vmlinuz-3.10.17
initrd = /boot/initrd.gz
root = /dev/vgall/root
label = Salix
read-only
7. Than I boot and see this messages
Image
Image

8. gapan adviced me to exclude 'ext4' in mkinitrd command. So I executed

Code: Select all

mkinitrd -c -k 3.10.17 -r /dev/vgall/root -m usb-storage:ehci-hcd:ehci-pci:usbhid:hid_generic:uhci-hcd:mbcache:jbd2 -u -o /boot/initrd.gz
The ext4 error disappeared. Then I deleted 'jbd2' and 'mbcache' and executed again

Code: Select all

mkinitrd -c -k 3.10.17 -r /dev/vgall/root -m usb-storage:ehci-hcd:ehci-pci:usbhid:hid_generic:uhci-hcd -u -o /boot/initrd.gz
Now I only see one error. And I don't know how to fix it.
Image

/etc/fstab in the installed system under chroot

Code: Select all

(IN USE)         /                            defaults         1   1
/dev/vgall/home  /home            ext4        defaults         1   2
/dev/vgall/root  /                ext4        defaults         1   2
/dev/vgall/boot  /boot            ext2        defaults         1   2
/dev/sda3        /home/win-c      ntfs-3g     fmask=111,dmask=000 1   0
/dev/sda4        /home/win-d      ntfs-3g     fmask=111,dmask=000 1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0

Re: Installation on LVM

Posted: 4. Sep 2014, 09:38
by gapan
What is this line in your fstab?

Code: Select all

(IN USE)         /                            defaults         1   1

Re: Installation on LVM

Posted: 4. Sep 2014, 14:06
by AforAcronym
gapan wrote:What is this line in your fstab?

Code: Select all

(IN USE)         /                            defaults         1   1
I hadn't edited the fstab file, just showed what it contained. I think this is result of a bug.

Re: Installation on LVM

Posted: 4. Sep 2014, 14:39
by AforAcronym
It's interesting that there were no problems in setting up Salix64 on LVM in VirtualBox. Besides, the same errors about ext4, jbd2 and mbcache appeared on boot but they didn't prevent the VM from booting. /ets/fstab didn't contain this (IN USE) line and there was no '(IN ' in mkinitrd command.

So, maybe I just messed up something on my machine. I'll try to install Salix64 on hard drive one more time.

Re: Installation on LVM

Posted: 4. Sep 2014, 15:47
by gapan
Yes, something probably went wrong. Removing that line should probably fix this error...

Re: Installation on LVM

Posted: 4. Sep 2014, 19:47
by AforAcronym
Today I tried other systems in order to compare initial memory consumption in Xubuntu, Linux Mint 17 Xfce, Salix (all 64bit), that's why I didn't have /etc/fstab to fix it. By now I have installed Salix64, the installation being flawless. Though I get those complaints on ext4, jbd2 and mbcache at the beginning of booting.

Thanks for your help!