You are not logged in.

#1 2013-03-23 11:31:04

buntolo
Member
Registered: 2011-10-11
Posts: 202

[SOLVED]Boot failing (SYSLINUX + LVM)

Does SYSLINUX works with LVM?
I've a dual boot system with Windows 8, arch is installed in LVM.
On SYSLINUX boot screen the first arch entry has an infinite loop of "Automatic boot in X seconds...": when the counter reaches 0 it simply starts again from 5.

I've configured syslinux.cfg to have more entries:
one with APPEND root=UUID=(UUID obtained from blkid)
another with APPEND root=/dev/mapper/lvm1-lvmroot
another with APPEND root=dev/mapper/lvm1/lvmroot
None of them works.

I've tried to install GRUB2 (grub-bios) from live but I get:

# grub-install --target=i386-pc --recheck /dev/sda
Path `/boot/grub2' is not readable by GRUB on boot. Installation is impossible. Aborting.

If I chroot in the system from live I have to install grub but I get INSTANTLY that pacman cannot connect to server, it so fast that it seems it's not trying.

If I use pacman with the change root option (--root) I get:

# pacman --root /dev/mapper/lvm1-lvmroot -Syy
error: failed to initialize alpm library (could not find or read directory)

I've tried installed debian in a logical extended partition out of LVM and it doesn't start as well.
I've put entries with both UUID and /dev/sdaX.
I don't understand what I'm doing wrong.

I've tried with a syslinux.cfg from a friedn with arch in LVM and it doesn't work as well. (obviously I've changed root= to fit mine)

Last edited by buntolo (2013-03-24 21:53:00)

Offline

#2 2013-03-23 12:39:19

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

Can you post your fstab?

Also remember that syslinux doesn't allow booting from LVM "/boot" partition. You need to have a separated normal partition for it and mount it under "/boot".

Also remember to add to your mkinitcpio.conf, "dm_mod" to the modules array and "lvm2" to the initram main array. Then rebuild with

 mkinitcpio -p linux 

For GRUB remember it has some preliminary install requirements depending on your partition table type. You really need to read a couple of times it's wiki if you haven't yet.

Last edited by s1ln7m4s7r (2013-03-23 16:15:32)

Offline

#3 2013-03-23 18:07:02

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

s1ln7m4s7r wrote:

Can you post your fstab?

Also remember that syslinux doesn't allow booting from LVM "/boot" partition. You need to have a separated normal partition for it and mount it under "/boot".

Also remember to add to your mkinitcpio.conf, "dm_mod" to the modules array and "lvm2" to the initram main array. Then rebuild with

 mkinitcpio -p linux 

For GRUB remember it has some preliminary install requirements depending on your partition table type. You really need to read a couple of times it's wiki if you haven't yet.

Where's the initram main array?

"mkinitcpio -p linux" return

==> ERROR: sepcified kernel image does not exist: `/boot/vmlinuz-linux'

I've tried to reinstall linux:

# pacman -S linux
error: failed to initialize alpm library (could not find or read directory)

Using pacman with "--root" option give the same result.

My disk is partitioned in this way:
1) Primary boot Windows
2) Primary Windows 8
3) Primary boot linux
4) Extended
  5) Logical debian
  6) LVM
    7) root
    8) home
    9) var
    10) var/log
    11) var/cache

My fstab:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>

# /dev/sda3
UUID=a7f5b04a-399d-45d6-b49a-3d989b033ffd	/boot		ext2					0 2

# /dev/mapper/lvm1-lvmroot
#UUID=bed1aca4-8581-41bc-acd8-10680d6857a1	/         	ext4      	defaults, noatime, discard	0 1

# /dev/mapper/lvm1-lvmhome
#UUID=66cbe4c4-f61c-4f5f-896b-0812eba793f9	/         	ext4      	defaults, noatime, discard	0 2

# /dev/mapper/lvm1-lvmroot
UUID=bed1aca4-8581-41bc-acd8-10680d6857a1	/         	ext4      	defaults	0 2

# /dev/mapper/lvm1-lvmhome
UUID=66cbe4c4-f61c-4f5f-896b-0812eba793f9	/home     	ext4      	defaults	0 2

# /dev/mapper/lvm1-lvmvar
UUID=e37d9783-0269-48b3-8fd0-11f25743706a	/var      	ext4      	defaults	0 2

# /dev/mapper/lvm1-lvmvarlog
UUID=7cf8c8f1-5fa2-4fef-b7c3-4599d9379c0c	/var/log  	ext4      	defaults	0 2

# /dev/mapper/lvm1-lvmvarcache
UUID=bd4d98e2-29dc-4499-a5ad-b791d3e2c6e5	/var/cache	ext4      	defaults	0 2

# /dev/mapper/lvm1-lvmswap
UUID=eaf1791f-3773-4685-9bec-499d960f1a15	none      	swap      	defaults  	0 0

Last edited by buntolo (2013-03-23 18:33:07)

Offline

#4 2013-03-23 19:50:22

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

Well, your fstab is completely messed up! You have the same volumes linking to different mount points.

Did you follow arch begginers guide to install arch? If so, you did something very wrong!

Can you post all the steps you made to install? Because my guess is that you made some mistake that messed things up. (ex.: Not running some commands under chroot, or running genfstab more than once using ">>" tabs rather than only ">")

Last edited by s1ln7m4s7r (2013-03-23 19:51:10)

Offline

#5 2013-03-23 20:17:17

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

I dont see what's messed up and these " same volumes  directorylinking to different mount points".

This fstab is similar with the one of my desktop which simply doesn't have LVM and separated /var/log directory.

Last edited by buntolo (2013-03-23 21:47:02)

Offline

#6 2013-03-23 20:22:25

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

Yes. Syslinux works fine with LVM. Your config line should be:

APPEND root=/dev/mapper/lvm1-lvmroot

You can check the correct volume name by scanning the volumes from a Live medium:

vgchange --available y vgroup
lvscan

I don't see a problem with your fstab, but the errors you are getting suggest that you haven't set up your chroot properly and/or your volumes are not correctly mounted when you try those operations.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2013-03-23 21:00:04

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

buntolo wrote:

I dont see what's messed up and these " same volumes  directorylinking to different mount points".

This fstab is similar with the one of my desktop which simply doesn't have LVM and separated directory.

Forget it, i didn't saw the commented character "#" under these:

#UUID=bed1aca4-8581-41bc-acd8-10680d6857a1	/         	ext4      	defaults, noatime, discard	0 1

#UUID=66cbe4c4-f61c-4f5f-896b-0812eba793f9	/         	ext4      	defaults, noatime, discard	0 2

So it must have been something you have/haven't done in chroot!

If you could post the commands you used to install arch, it would be helpful!

Last edited by s1ln7m4s7r (2013-03-23 23:25:49)

Offline

#8 2013-03-24 12:08:44

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

Ok probably I did something wrong with chroot, I've retried in this way:

mkdir /mnt
mount /dev/mapper/lvm1-root /mnt
mount /dev/mapper/lvm1-var /mnt/var
mount /dev/mapper/lvm1-varlog /mnt/var/log
mount /dev/mapper/lvm1-varcache /mnt/var/cache
mount /dev/sda3 /mnt/boot
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev 
chroot /mnt sh

and it works, except for pacman, which works only outside of chroot using --root.
Anyway thanks to --root I've managed to reinstall "linux", then I executed "mkinitcpio -p linux" and all went ok.

When I boot through the first entry system gets stuck on mounting/scanning a device:

[  ***] A start job is running for device dev-disk-by\x2duuid-eaf1791f\x2d3773\x2d4685\x29bec\x2499d960f1a15.device
[DEPEND] Dependency failed for /dev/disk/by-uuid/eaf1791f-3773-4685-9bec-499d960f1a15

After this it drops in a rescue shell.
The strange part is that I don't have ANY device with that UUID:

/dev/sda1: LABEL="System Reserved" UUID="8C9AAF7A9AAF6006" TYPE="ntfs" 
/dev/sda2: UUID="E254C0A454C07D33" TYPE="ntfs" 
/dev/sda3: UUID="a7f5b04a-399d-45d6-b49a-3d989b033ffd" TYPE="ext2" 
/dev/sda5: UUID="7aa83b14-83b2-42c2-a56d-008aaceb259e" TYPE="ext4" 
/dev/sda6: UUID="yeGQ3G-YLiM-lRU9-7TJT-iC65-Psa5-EyJInQ" TYPE="LVM2_member" 
/dev/sdc1: UUID="2013-03-01-07-03-14-00" LABEL="ARCH_201303" TYPE="iso9660" PTTYPE="dos" 
/dev/sdb1: UUID="D720-7D44" TYPE="vfat" 
/dev/loop0: TYPE="squashfs" 
/dev/loop1: UUID="5d4a9c61-254a-4144-8e42-76a12fb68fc4" TYPE="ext4" 
/dev/loop2: UUID="5d4a9c61-254a-4144-8e42-76a12fb68fc4" TYPE="ext4" 
/dev/mapper/arch_root-image: UUID="5d4a9c61-254a-4144-8e42-76a12fb68fc4" TYPE="ext4" 
/dev/mapper/lvm1-lvmroot: UUID="bed1aca4-8581-41bc-acd8-10680d6857a1" TYPE="ext4" 
/dev/mapper/lvm1-lvmvar: UUID="e37d9783-0269-48b3-8fd0-11f25743706a" TYPE="ext4" 
/dev/mapper/lvm1-lvmswap: UUID="ee5f3532-cf91-4f76-9af7-f724b656b9ea" TYPE="swap" 
/dev/mapper/lvm1-lvmvarlog: UUID="7cf8c8f1-5fa2-4fef-b7c3-4599d9379c0c" TYPE="ext4" 
/dev/mapper/lvm1-lvmvarcache: UUID="bd4d98e2-29dc-4499-a5ad-b791d3e2c6e5" TYPE="ext4" 
/dev/mapper/lvm1-lvmhome: UUID="66cbe4c4-f61c-4f5f-896b-0812eba793f9" TYPE="ext4" 

I don't find anything searching "A start job is running for device", I've never seen such a dialogue text.

Last edited by buntolo (2013-03-24 13:01:49)

Offline

#9 2013-03-24 13:15:13

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

This

buntolo wrote:

The strange part is that I don't have ANY device with that UUID:

is the reason for this:

buntolo wrote:
[  ***] A start job is running for device dev-disk-by\x2duuid-eaf1791f\x2d3773\x2d4685\x29bec\x2499d960f1a15.device
[DEPEND] Dependency failed for /dev/disk/by-uuid/eaf1791f-3773-4685-9bec-499d960f1a15

Change

buntolo wrote:
# /dev/mapper/lvm1-lvmswap
UUID=eaf1791f-3773-4685-9bec-499d960f1a15	none      	swap      	defaults  	0 0

to

# /dev/mapper/lvm1-lvmswap
UUID=ee5f3532-cf91-4f76-9af7-f724b656b9ea	none      	swap      	defaults  	0 0

in your fstab and you should be fine.

Last edited by Tarqi (2013-03-24 13:16:38)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#10 2013-03-24 13:28:19

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

Oh wow, the swap UUID has changed and I didn't notice it, thanks you.

Now I've another problem: I can't log in as user.
I can log in as root, I can use pacman without problem, I just can't log in as normal user.
I've even created a new one without password:

useradd -m -g users -s /bin/bash prova

But it just says "Login incorrect" after [empty] password insertion.

EDIT: If i add runlevel (I've tried both 3 and 5) in APPEND line in syslinux (as described here: http://natalian.org/archives/2012/01/15/Runlevels/).
I've also added init=/bin/systemd in the APPEND line.
If i run:

# runlevel
unknown

Last edited by buntolo (2013-03-24 13:43:31)

Offline

#11 2013-03-24 17:09:16

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

EDIT: If i add runlevel (I've tried both 3 and 5) in APPEND line in syslinux (as described here: http://natalian.org/archives/2012/01/15/Runlevels/).
I've also added init=/bin/systemd in the APPEND line.
If i run:

# runlevel
unknown

Are you upgrading your arch system or are you installing a clean arch system?????????????????????????????????????????????????????

If you're installing a clean arch system there's no need for any of those! systemd is automatically used and it doesn't work with runlevels but targets.

https://wiki.archlinux.org/index.php/Systemd#Targets

About the user problem, can you post the output of:

cat /etc/passwd

Last edited by s1ln7m4s7r (2013-03-24 17:14:57)

Offline

#12 2013-03-24 20:42:35

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

s1ln7m4s7r wrote:

EDIT: If i add runlevel (I've tried both 3 and 5) in APPEND line in syslinux (as described here: http://natalian.org/archives/2012/01/15/Runlevels/).
I've also added init=/bin/systemd in the APPEND line.
If i run:

# runlevel
unknown

Are you upgrading your arch system or are you installing a clean arch system?????????????????????????????????????????????????????

If you're installing a clean arch system there's no need for any of those! systemd is automatically used and it doesn't work with runlevels but targets.
https://wiki.archlinux.org/index.php/Systemd#Targets

I'm installing a new system and I know about Systemd, that inittab is no more and so on, but a friend o'mine with arch pure-systemd on LVM claims to receive answer (N 5) from runlevel.

s1ln7m4s7r wrote:

About the user problem, can you post the output of:

cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
mail:x:8:12:mail:/var/spool/mail:/bin/false
ftp:x:14:11:ftp:/srv/ftp:/bin/false
http:x:33:33:http:/srv/http:/bin/false
uuidd:x:68:68:uuidd:/:/sbin/nologin
dbus:x:81:81:dbus:/:/sbin/nologin
nobody:x:99:99:nobody:/:/bin/false
archio:x:1000:100::/home/archio:/bin/bash
prova:x:1001:100::/home/prova:/bin/bash
cento:x:1002:100::/home/cento:/bin/bash

It's quite the same as my desktop' one which works fine.

Offline

#13 2013-03-24 21:05:35

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

It really seems all ok. Try running multiuser target (runlevel 5), by

systemctl enable multi-user.target

and reboot, then try again!

Last edited by s1ln7m4s7r (2013-03-24 21:05:50)

Offline

#14 2013-03-24 21:20:20

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

#systemctl enable multi-user.target
Failed to issue method call: File exists

I already did it.
I've added password to newly created users: now they can login.
It seems that multi-user wasn't the default target and that I enabled it after creating new users.

Now it seems working.

Offline

#15 2013-03-24 21:23:34

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

Ok, don't forget to mark your post as [SOLVED]!

Offline

#16 2013-03-24 21:52:30

buntolo
Member
Registered: 2011-10-11
Posts: 202

Re: [SOLVED]Boot failing (SYSLINUX + LVM)

Well, perhapse I've pictured the whole situation that stucked me for days...
Short: be sure not to be dumb and untidy.

1) Putting runlevel in syslinux APPEND line causes the boot to fail.

It took me a bit to discover this and I did a lot of researchs, trial & error and so on.
I did a lot of chroot, sometimes I mistyped something getting new errors, new errors which I've searched on the internet for.
The solution was rather simple: no runlevel on APPEND line.


2) Mistype.

I'm using an italian keyboard: http://i.stack.imgur.com/9hOGH.png
As you can see the "ù" key is inside the "Enter" corner and it's common to press it with Enter, generating sentences like this.ù
or thisù
Having all these problems I was using the laptop in front of my desktop monitor, which required keeping the laptop lid a enough lowered, covering my visual of keyboard.
In short yes: I pressed "ù" when creating user's password.

Offline

Board footer

Powered by FluxBB