Page 1 of 4 123 ... LastLast
Results 1 to 10 of 37

Thread: Booting fails with LVM disk

  1. #1

    Default Booting fails with LVM disk

    I built my system with 1 hard drive because I wanted to use the recommended hard drive partitioning scheme from openSUSE 13.1 as my partitioning starting point. I left it as is, except I reduced the size of /home a bit, and added a /var partition. Anyway, after I got openSUSE 13.1 x86_64 installed, I shut the machine down and added to additional hard drives. When I booted up again, I partitioned those two drives using LVM. One drive is 1TB, the other is 2TB. I set up the 1TB on it's own Logical Volume called lv_music. I set up the 2TB on it's own Logical Volume called lv_video. (These are storage drives for my HTPC.) I then set up Volume Groups of vg_music, and vg_video. I set the mounts points as /music and /video. I used the full drive on both of them.

    Everything seemed fine.

    Then I was working on getting my cable card working and decided to reboot. When I reboot, I walked away and came back to a black screen with a flashing cursor. ****! Reboot again and hit ESC this time to see the boot messages. When it failed, I got these messages:

    Code:
    [TIME] Timed out waiting for device dev-vg_video.lv_video.device.
    [DEPEND] Dependency failed for /video.
    [DEPEND] Dependency failed for Local File Systems.
    Welcome to Emergency Mode!  After logging in, type "journalctl -xb" to view systemlogs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode.
    That last bit repeats after a bit of time, and I can't do anything.

    So I figured that maybe something's not installed that needs to be installed for LVM to work properly. YAST could help me figure that out. So I booted into the rescue system using the install DVD. Now I'm stuck. I can't mount my system disk. I get this:
    Code:
    mount /dev/sda /mnt
    Mount.bin: /dev/sda is write-protected, mounting read-only
    Mount.bin: wrong fs type, bad option, bad superblock on /dev/sda, missing code page or helper program, or other error.
    
    In some cases useful info is found in syslog - try dmesg | tail or so.
    I looked at dmesg, but there didn't appear to be anything related to mounting a disk.

    I'm lost. How can I mount my file system (/dev/sda), and/or what should I do to diagnose the original problem?

  2. #2
    Join Date
    Sep 2012
    Posts
    7,101

    Default Re: Booting fails with LVM disk

    Quote Originally Posted by Yippee38 View Post
    How can I mount my file system (/dev/sda)
    First, after you added one more hard drive, there is no guarantee that after reboot your original disk is still /dev/sda. It can well be /dev/sdb now. Second, even if it is /dev/sda it is partitioned (at least, you said you had partitioned it) so you should not mount /dev/sda (the whole disk) but individual partitions. Start with pasting here output of blkid and "fdisk -l" in rescue system.

    and/or what should I do to diagnose the original problem?
    Failure to enter emergency shell is known bug; if you find your root filesystem I can explain how to work around it so system does enter emergency mode, then it will be possible to troubleshoot further.

  3. #3

    Default Re: Booting fails with LVM disk

    Quote Originally Posted by arvidjaar View Post
    First, after you added one more hard drive, there is no guarantee that after reboot your original disk is still /dev/sda. It can well be /dev/sdb now. Second, even if it is /dev/sda it is partitioned (at least, you said you had partitioned it) so you should not mount /dev/sda (the whole disk) but individual partitions. Start with pasting here output of blkid and "fdisk -l" in rescue system.
    DOH! Yeah. I knew that about mounting the individual partitions. It's been a while since I've had to run anything command line though, so I forgot.

    I did run fdisk -l. That's how I knew /dev/sda was the right one. I actually took the system apart and re-cabled the drives to make sure my filesystem would come up as sda. Here's the output of blkid and fdisk -l though (PITA, having to hand type it all):
    Code:
    # blkid
    /dev/sdb: UUID="nPGBrC-IjA0-goeP-wswS-RujF-AAW8-PxcNFk" Type="LVM_member"
    /dev/sdc: UUID="31plbz-E6Ay-0o70-XktJ-Sa8e-jZaz-bBptD6" Type="LVM_member"
    /dev/sda1: SEC_TYPE="msdos" UUID="98BA-EC43" Type="vfat" PARTLABEL="primary" PARTUUID=<I'm not typing these anymore.  If you need one, let me know>
    /dev/sda2: UUID=<whatever> TYPE="swap" PARTLABEL="primary" PARTUUID=<not typing it>
    /dev/sda3: UUID=<whatever> TYPE="ext4" PARTLABEL="primary" PARTUUID=<not typing it>
    /dev/sda4: UUID=<whatever> TYPE="ext4" PARTLABEL="primary" PARTUUID=<not typing it>
    /dev/sda5: UUID=<whatever> TYPE="ext4" PARTLABEL="primary" PARTUUID=<not typing it>
    /dev/loop0: TYPE="squashfs"
    /dev/loop1: TYPE="squashfs"
    /dev/loop2: TYPE="squashfs"
    /dev/loop3: TYPE="squashfs"
    /dev/loop4: TYPE="squashfs"
    /dev/sr0: UUID=<whatever> LABEL="openSUSE-13.1-x86_640091" TYPE="iso9660" PTTYPE="dos"
    /dev/dm-0: UUID=<whatever> TYPE="ext4"
    /dev/dm-1:UUID=<whatever> TYPE="ext4"
    Code:
    # fdisk -l
    Disk /dev/sdb:  2000.4 GB 2000398934016 bytes, 3907029168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sectors size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 4096 bytes / 512 bytes
    
    Disk /dev/sdc:  1000.2 GB 100204886016 bytes, 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sectors size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    WARNING:  fdisk GPT support is currently new, and therefore is an experimental phase.  Use at your own discretion.
    
    Disk /dev/sda:  500.1 GB 500107862016 bytes, 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sectors size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: gpt
    
    #         Start             End        Size   Type               Name
    1          2048        321535      156M   EFI System       priimary
    2       321536     16064511       7.5G   Microsoft basic   primary
    3    16064512     58011647        20G   Microsoft basic   primary
    4    25011648    110446591       25G   Microsoft basic   primary
    5   110446592   976752639   413.1G   Microsoft basic   primary
    
    Disk /dev/dm-0:  1000.2 GB 1000203091968 bytes, 1953521664 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sectors size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    
    Disk /dev/dm-1:  2000.4 GB 2000397795328 bytes, 3907026944 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sectors size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    <whew!>

    Failure to enter emergency shell is known bug; if you find your root filesystem I can explain how to work around it so system does enter emergency mode, then it will be possible to troubleshoot further.
    I'm pretty sure my drive is partitions as follows:
    sda1 = boot
    sda2 = swap
    sda3 = ?
    sda4 = ?
    sda5 = home

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: Booting fails with LVM disk

    Don't see any Linux and you have an EFI system and sda1 is the EFI/boot partition

    try gdisk /dev/sda

  5. #5

    Default Re: Booting fails with LVM disk

    Quote Originally Posted by gogalthorp View Post
    Don't see any Linux and you have an EFI system and sda1 is the EFI/boot partition

    try gdisk /dev/sda
    -bash: gdisk: command not found

  6. #6

    Default Re: Booting fails with LVM disk

    Quote Originally Posted by gogalthorp View Post
    Don't see any Linux and you have an EFI system and sda1 is the EFI/boot partition
    BTW, sda does have linux on it. I'm not sure why fdisk is saying "Microsoft basic". I mean, they are ext4 partitions. Before I installed linux on these disks, I deleted all previous partitions and rebuilt the partition table from the install DVD.

  7. #7
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: Booting fails with LVM disk

    You need to be fully root ie use su -

    then

    gdisk /dev/'sda

  8. #8
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,287

    Default Re: Booting fails with LVM disk

    Well still looks like a EFI system not a BIOS

    gdisk should give a better output but normally fdisk gets the types right

  9. #9
    Join Date
    Sep 2012
    Posts
    7,101

    Default Re: Booting fails with LVM disk

    Quote Originally Posted by Yippee38 View Post
    I'm pretty sure my drive is partitions as follows:
    sda1 = boot
    sda2 = swap
    sda3 = ?
    sda4 = ?
    sda5 = home
    So you installed this system and you do not know what is on these partitions? Amusing

    Anyway - mount /dev/sda3, check whether you have file /etc/fstab there if yes - post here so that we can be sure.
    Code:
    mount /dev/sda3 /mnt
    ls -l /mnt/etc/fstab
    If not present - repeat with sda4
    Code:
    umount /mnt
    mount /dev/sda4 /mnt
    ls -l /mnt/etc/fstab
    If fstab found - you can simply copy it to USB stick to avoid typing; insert USB stick; it will be recognized as next disk number, most likely /dev/sdd in your case, and likely have single partition - /dev/sdd1. You can verify using blkid again after inserting stick. Then just mount it somewhere
    Code:
    mkdir /tmp/usb
    mount /dev/sdd1 /tmp/usb
    cp /mnt/etc/fstab /mnt/usb
    umount /mnt/usb
    And you do not need to type in commands output - you can just redirect them to a file on USB:
    Code:
    blkid > /tmp/usb/blkid.out

  10. #10

    Default Re: Booting fails with LVM disk

    Quote Originally Posted by gogalthorp View Post
    You need to be fully root ie use su -

    then

    gdisk /dev/'sda
    I still get "command not found". I'm thinking, that gdisk isn't on the install DVD rescue system.

    Quote Originally Posted by arvidjaar View Post
    So you installed this system and you do not know what is on these partitions? Amusing
    Obviously, they are / and /var, but I don't remember which is which.

    Thanks for the remedial lesson in basic linux. I can't believe how much I've forgotten. Anyway, here's the fstab:
    Code:
    /dev/disk/by-id/ata-WDC_WD5000KS-00MNB0_WD-WMANU1661439-part2 swap                 swap       defaults              0 0
    /dev/disk/by-id/ata-WDC_WD5000KS-00MNB0_WD-WMANU1661439-part3 /                    ext4       acl,user_xattr        1 1
    /dev/disk/by-id/ata-WDC_WD5000KS-00MNB0_WD-WMANU1661439-part1 /boot/efi            vfat       umask=0002,utf8=true  0 0
    /dev/disk/by-id/ata-WDC_WD5000KS-00MNB0_WD-WMANU1661439-part5 /home                ext4       acl,user_xattr        1 2
    /dev/disk/by-id/ata-WDC_WD5000KS-00MNB0_WD-WMANU1661439-part4 /var                 ext4       acl,user_xattr        1 2
    /dev/vg_music/lv_music /music               ext4       acl,user_xattr        1 2
    /dev/vg_video/lv_video /video               ext4       acl,user_xattr        1 2

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •