Computer Really broken on boot: lVM mount problems, I think.

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Computer Really broken on boot: lVM mount problems, I think.

Postby Douglas_E_Knapp » Wed Apr 17, 2013 16:23

I booted up the other day to be greeted by the command line. Odd, I thought. Apon further investigation I found that many directories were empty. A bit deeper and I find that sba2 is not mounted. Thing is that it is a LVM2 thingy and I have no clue how to get back to normal. Here is some output that I got from parted magic.

What do I do next? Also how could this have happened? I did not add anything. SSD drive btw.
Hope you can help! It took me 5 hours to get this far.
Thanks!!

Welcome - Parted Magic (Linux 3.7.9-pmagic)

root@partedmagic:~# fdisk -l /dev/sda

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00045703

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 234440703 116707328 8e Linux LVM
root@partedmagic:~# modprobe dm-mod
root@partedmagic:~# vgscan
Reading all physical volumes. This may take a while...
Found volume group "vg_frog" using metadata type lvm2
root@partedmagic:~# vgchange -a y vg_frog
3 logical volume(s) in volume group "vg_frog" now active
root@partedmagic:~# lvdisplay
--- Logical volume ---
LV Path /dev/vg_frog/lv_root
LV Name lv_root
VG Name vg_frog
LV UUID CNXLf0-I6RK-ZFrA-KL6C-iTR1-11F6-ffIcFq
LV Write Access read/write
LV Creation host, time ,
LV Status available
# open 0
LV Size 50.00 GiB
Current LE 1600
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Path /dev/vg_frog/lv_home
LV Name lv_home
VG Name vg_frog
LV UUID zoZBRJ-fgdb-Yy6U-mTT9-dGJF-jusj-pvxhYp
LV Write Access read/write
LV Creation host, time ,
LV Status available
# open 0
LV Size 55.84 GiB
Current LE 1787
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/vg_frog/lv_swap
LV Name lv_swap
VG Name vg_frog
LV UUID I3ACkQ-ZZRa-sOMh-r9IF-qyCW-XDFI-XVvuad
LV Write Access read/write
LV Creation host, time ,
LV Status available
# open 0
LV Size 5.44 GiB
Current LE 174
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

root@partedmagic:~#
Last edited by Douglas_E_Knapp on Thu Apr 18, 2013 11:30, edited 1 time in total.
Douglas_E_Knapp
Growing Hen
 
Posts: 101
Joined: Sat Nov 03, 2012 8:53

Re: Computer REALLY broken on boot

Postby Cb7 » Wed Apr 17, 2013 17:42

A word of explanation, at least as I understand it:
sda2 which contain your LVM should not be mounted. At least that's what my 'mount -l' says. And seriously: taking care of LVM partition should be done automaticaly. In your case what should be mounted is respectively:
Code: Select all
/dev/vg_frog/lv_root
/dev/vg_frog/lv_home
/dev/vg_frog/lv_swap


Have you tried to rescue your install through Live DVD? When you click "Install Sabayon" there is option to "rescue" current install. Try that and say whether it helps. If won't, then some more info would be helpful. Like, what exactly you see when Sabayon isn't able to boot? In this "command line" you can do anything like using bash commands? If yes, then would be helpful output of:
Code: Select all
mount -l

Command above would (I suppose) provide some info in case that proposed solution wouldn't work.
Why, and how to add "[Solved]" to your post. Please read. ← credits to Fitzcarraldo

Kind regards
~Zetok Zalbavar
Cb7
Growing Hen
 
Posts: 104
Joined: Sun Apr 07, 2013 7:13

Re: Computer REALLY broken on boot; LVM mount problems

Postby Douglas_E_Knapp » Thu Apr 18, 2013 8:10

I had high hopes but it is the same after the resuce install.

mount -l
/dev/root on / type ext4 (ro)

Not much info there. Home and the rest still not mounting.

KDE is broken, command line and bash seem to be working. How would I test Bash? shutdown -r now works. The computer seems to be offline. Land line BTW eth1. Internet is fine when booting with live CD.

More ideas??

Thanks!
Douglas_E_Knapp
Growing Hen
 
Posts: 101
Joined: Sat Nov 03, 2012 8:53

Re: Computer REALLY broken on boot

Postby Cb7 » Thu Apr 18, 2013 12:01

1st thing: I'm not an expert. What I'll propose, may work but I'm not saying that it will.

With Live DVD you'll mount partitions and, create new 'grub.cfg' and update your Sabayon installation.

After start of Live DVD launch terminal and as a root make dir, as an example I'll use directory called 'sab':
Code: Select all
mkdir /sab
In that you'll mount your root partition:
Code: Select all
mount -t ext4 /dev/vg_frog/lv_root /sab

After that make sure that it was mounted successfully by listing content:
Code: Select all
ls -al /sab
If content is not listed, there is a problem with which my knowledge is probably not enough to help, and I firmly advise against going through next steps. If that's the case, someone more knowledgeable than me should speak.

In a case it was mounted successfully and content of your root directory is shown properly, continue with mounting other partitions, starting from boot partition:
Code: Select all
mount -t ext4 /dev/sda1 /sab/boot

Again it is wise to check if it's mounted correctly:
Code: Select all
ls -al /sab/boot

If ok, continue with mounting home partition:
Code: Select all
mount -t ext4 /dev/vg_frog/lv_home /sab/home

Check whether it's mounted:
Code: Select all
ls -al /sab/home

If ok, last swap:
Code: Select all
swapon -a


If everything was mounted successfully, then chroot into mounted system:
Code: Select all
chroot /sab

Now, when you are in your Sabayon root directory, log in as root using your root password (su), and then run command to back up your old grub.cfg, and create new one:
Code: Select all
cp /boot/grub/grub.cfg /boot/grub/grub.cfg.backup
grub2-mkconfig -o /boot/grub/grub.cfg

After performing it successfully, it would be wise to update your system, perhaps problem lies somewhere in installed software, since restoring boot with Live DVD didn't help (this may take some time, and after updating it'll ask for merging conf files, and then it'll perform tests):
Code: Select all
equo update && equo install entropy equo --relaxed && equo upgrade && equo conf update && equo libtest && equo deptest

Now you can type & repeat 'exit' until terminal is closed. Reboot and check whether what proposed works.
Last edited by Cb7 on Thu Apr 18, 2013 12:54, edited 1 time in total.
Why, and how to add "[Solved]" to your post. Please read. ← credits to Fitzcarraldo

Kind regards
~Zetok Zalbavar
Cb7
Growing Hen
 
Posts: 104
Joined: Sun Apr 07, 2013 7:13

Re: Computer REALLY broken on boot: lVM mount problems, I th

Postby Douglas_E_Knapp » Thu Apr 18, 2013 12:41

was swap here a typeo? should that not be home??
BTW so far so good.

If ok, continue with mounting home partition:
CODE: SELECT ALL
mount -t ext4 /dev/vg_frog/lv_swap /sab/home
Douglas_E_Knapp
Growing Hen
 
Posts: 101
Joined: Sat Nov 03, 2012 8:53

Re: Computer REALLY broken on boot: lVM mount problems, I th

Postby Cb7 » Thu Apr 18, 2013 12:55

uh, sorry, that was a typo. Though I was sure that I wrote it it right.. now repaired.
Why, and how to add "[Solved]" to your post. Please read. ← credits to Fitzcarraldo

Kind regards
~Zetok Zalbavar
Cb7
Growing Hen
 
Posts: 104
Joined: Sun Apr 07, 2013 7:13

Re: Computer REALLY broken on boot: lVM mount problems, I th

Postby Douglas_E_Knapp » Thu Apr 18, 2013 13:10

You sure the swap part is right? How does swapon -a know what to "mount"?

Also it seems that there are some errors with the grup2 bit. Here is a listing from swapon home or so on.

localhost / # swapon -a
localhost / # chroot /sab
localhost / # ls
bin boot dev etc home install-data lib lib32 lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var
localhost / # ls /home/
douglas ftp lost+found p2p
localhost / # ls /home/douglas/
Art Downloads MILA PlaneShift Web Site Projects
Desktop Dropbox Mila doc.odt Programs Which printer.jpeg
Diplomarbeit in Vorlage.odt Guppy thingies.odt MyPaint Tuina Massage Jammertal.odt You
dm Hi. Pamela Conn Beall and Susan Hagen Nipp - Wee Sing (25th Anniversary Celebration) VirtualBox VMs
Documents Katalog_Farbspuren150.pdf Panda3d Wall Paper
localhost / # cp /boot/grub/grub.cfg /boot/grub/grub.cfg.backup
localhost / # grub2-mkconfig -o /boot/grub/grub.cfg
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Generating grub.cfg ...
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found background: /boot/grub/default-splash.png
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found linux image: /boot/kernel-genkernel-x86_64-3.5.0-sabayon
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found initrd image: /boot/initramfs-genkernel-x86_64-3.5.0-sabayon
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found linux image: /boot/kernel-genkernel-x86_64-3.4.0-sabayon
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found initrd image: /boot/initramfs-genkernel-x86_64-3.4.0-sabayon
grep: /proc/mounts: No such file or directory
grep: /proc/swaps: No such file or directory
Cannot find list of partitions! (Try mounting /sys.)
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
done
localhost / # cd root/
localhost ~ # ls
anaconda-ks.cfg
localhost ~ # cp /boot/grub/grub.cfg /boot/grub/grub.cfg.backup
localhost ~ # grub2-mkconfig -o /boot/grub/grub.cfg
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Generating grub.cfg ...
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found background: /boot/grub/default-splash.png
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found linux image: /boot/kernel-genkernel-x86_64-3.5.0-sabayon
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found initrd image: /boot/initramfs-genkernel-x86_64-3.5.0-sabayon
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found linux image: /boot/kernel-genkernel-x86_64-3.4.0-sabayon
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
Found initrd image: /boot/initramfs-genkernel-x86_64-3.4.0-sabayon
grep: /proc/mounts: No such file or directory
grep: /proc/swaps: No such file or directory
Cannot find list of partitions! (Try mounting /sys.)
Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.
done
Douglas_E_Knapp
Growing Hen
 
Posts: 101
Joined: Sat Nov 03, 2012 8:53

Re: Computer REALLY broken on boot: lVM mount problems, I th

Postby Douglas_E_Knapp » Thu Apr 18, 2013 15:22

I tried to get that module to load but no luck.
localhost ~ # locate zfs.ko
/lib64/modules/3.4.0-sabayon/addon/zfs/zfs/zfs.ko
/lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko
localhost ~ # insmod /lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko/lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko
insmod: ERROR: could not load module /lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko/lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko: Not a directory
localhost ~ # insmod /lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko/lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko
insmod: ERROR: could not load module /lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko/lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko: Not a directory
localhost ~ # insmod /lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko
insmod: ERROR: could not insert module /lib64/modules/3.5.0-sabayon/kernel/fs/zfs/zfs/zfs.ko: Invalid module format
localhost ~ # insmod /lib64/modules/3.4.0-sabayon/addon/zfs/zfs/zfs.ko
insmod: ERROR: could not insert module /lib64/modules/3.4.0-sabayon/addon/zfs/zfs/zfs.ko: Invalid module format
Douglas_E_Knapp
Growing Hen
 
Posts: 101
Joined: Sat Nov 03, 2012 8:53

Re: Computer REALLY broken on boot: lVM mount problems, I th

Postby Cb7 » Thu Apr 18, 2013 15:35

Douglas_E_Knapp wrote:You sure the swap part is right? How does swapon -a know what to "mount"?

About this part I've made a little mistake, since 'swapon -a' reads from fstab which partitions are swap, so this command should be executed after chroooting, but before creating grub.cfg. If you're unsure about command, then write
Code: Select all
man swapon


and about this part with errors:
Douglas_E_Knapp wrote:Failed to load ZFS module stack.
Load the module manually by running 'insmod <location>/zfs.ko' as root.

I'm afraid that I can't help with that, my knowledge is a bit limited about kernel, its modules etc.

What interesting is here:
Douglas_E_Knapp wrote:grep: /proc/mounts: No such file or directory
grep: /proc/swaps: No such file or directory
Cannot find list of partitions! (Try mounting /sys.)
From what I understand, there is a little bit more that should be done before 'chroot'. My bad/mistake, I know that this (repairing system like that) should be possible, but I've never tried this, so...

Before chrooting, make a symlink to missing things:
Code: Select all
ln -s /proc /sab/proc
ln -s /sys /sab/sys


So, to make it simpler doing again (it includes what I wrote earlier in this post):
Code: Select all
mkdir /sab
mount -t ext4 /dev/vg_frog/lv_root /sab
mount -t ext4 /dev/sda1 /sab/boot
mount -t ext4 /dev/vg_frog/lv_home /sab/home
ln -s /dev /sab/dev
ln -s /proc /sab/proc
ln -s /sys /sab/sys
chroot /sab


And now, 'su' and then... well, have you tried updating your software? If no, and you don't want to "experiment" on trying to find solution with me, then you can restore your old grub.cfg:
Code: Select all
rm /boot/grub/grub.cfg
mv /boot/grub/grub.cfg.backup /boot/grub/grub.cfg


If you're willing to try (or you feel like you have to try anything), mount swap and update system (if you haven't alredy):
Code: Select all
swapon -a
equo update && equo install entropy equo --relaxed && equo upgrade && equo conf update && equo libtest && equo deptest


Form output that 'grub2-mkconfig' gave, I see that your kernel isn't "really" new or anything. How you feel about changing it? If you're willing, then change into newest (I hope that switching a kernel will resolve problems that 'grub2-mkconfig' showed - I thing that for some reason your kernel isn't loading properly modules, and newest version will resolve dependencies {which I think may somehow be incompatible with current kernel} properly):
Code: Select all
kernel-switcher switch linux-sabayon-3.8.5
or change into other kernel you may like/want:
Code: Select all
kernel-switcher list | grep linux-sabayon
more about 'kernel-switcher' here:https://wiki.sabayon.org/index.php?title=En:Entropy#Using_Kernel_Switcher

Kernel-switcher should by itself make new 'grub.cfg', but to be sure...:
Code: Select all
grub2-mkconfig -o /boot/grub/grub.cfg

What I'm proposing is what I would do, but it doesn't mean that it'll help (but since there is a chance...).

If what I wrote won't help... I'm afraid that I'm out of ideas for now.


Oh and BTW, on forum use things like
Code: Select all
[code]here you put text that is an input/output of terminal[/code]
and
Code: Select all
[quote]larger part of quoted text[/quote]
Why, and how to add "[Solved]" to your post. Please read. ← credits to Fitzcarraldo

Kind regards
~Zetok Zalbavar
Cb7
Growing Hen
 
Posts: 104
Joined: Sun Apr 07, 2013 7:13

Re: Computer REALLY broken on boot: lVM mount problems, I th

Postby Douglas_E_Knapp » Thu Apr 18, 2013 15:43

I have not tested all this yet but stop apologizing! You are the only one even trying to help me. Without you I would be staring at a dead computer without a clue.
Douglas_E_Knapp
Growing Hen
 
Posts: 101
Joined: Sat Nov 03, 2012 8:53

Next

Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 6 guests