Announcement

Collapse
No announcement yet.

LVM and booting problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    LVM and booting problem

    Hi all,

    Im having major problems instaling Kubuntu from the amd64-DVD the way i want it...
    Im unable to boot my fresh installed system!

    Let me start with the error im stuck at and after explain my setup.
    When i boot i see vt8 and vt1 outputs below, and thats it...
    I can't seem to get the system up

    My setup is:
    • CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
    • Memory: 1GB RAM
    • Video card: ATI Radeon 1650 pro
    • Disks: 1xIDE, 1xSATA
    • Partition table(s): See fdisk output and LVM setup below, /dev/sda1 is an ext3 partition mounted on /boot
    • Bios boot: IDE-HD
    • System is dual booting Kubuntu / Windows XP using GRUB.
    • Install option choosen was: Setup server with all 3 extras (LAMP etc)

    I was able to set this all up and install kubuntu without any problems or errors, although the tea-breaks between LV setups is kinda BIG.

    Anyone any ideas how to proceed tobe able to boot this system from HD?
    _________________________________________________
    [vt8] output:
    Code:
    BusyBox v1.1.3 (Debian 1:1.1.3-3ubuntu3) Built-in shell (ash)
    Enter 'help' for a list of built-in commands.
    
    /bin/sh: can't access tty: job control turned off
    (initramfs) <promt is here>
    [vt1] output:
    Code:
    Loading, please wait...
    kinit: name_to_dev_t(/dev/mapper/Linux-swap) = dm-1(254,1)
    kinit: trying to resume from /dev/mapper/Linux-swap
    kinit: No resume image, doing normal boot...
    Target filesystem doesn't have /sbin/init
    
    
    <following lines are at bottom of screen>
    Kernel alive
    kernel direct mapping tables up to 100000000 @ 8000-d000
    Fdisk output:
    Code:
    ~ # fdisk -l
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
     Device Boot   Start    End   Blocks Id System
    /dev/sda1       1     3   24066 83 Linux
    /dev/sda2 *     4    6409  51456195 7 HPFS/NTFS
    /dev/sda3      6410   19457 104808060 8e Linux LVM
    
    Disk /dev/hda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
     Device Boot   Start    End   Blocks Id System
    /dev/hda1       1   16709 134215011 7 HPFS/NTFS
    ~ #
    LVM setup:
    All LV's are ext3 and mounted on the obvious named mountpoints, except swap ofcourse which is a swap
    Code:
              Current LVM Configuration:
    Unallocated physical volumes:
     * none
    
    Volume groups:
     * Linux                       (107319MB)
      - Uses physical volume:     /dev/sda3     (107319MB)
      - Provides logical volume:   bin        (1073MB)
      - Provides logical volume:   home       (85895MB)
      - Provides logical volume:   lib        (4294MB)
      - Provides logical volume:   root       (104MB)
      - Provides logical volume:   sbin       (1073MB)
      - Provides logical volume:   swap       (8589MB)
      - Provides logical volume:   tmp        (524MB)
      - Provides logical volume:   usr        (4294MB)
      - Provides logical volume:   var        (419MB)
      - Provides logical volume:   var.log      (524MB)
      - Provides logical volume:   var.spool     (524MB)
    Well thats all for now, 3M

    #2
    Re: LVM and booting problem

    Target filesystem doesn't have /sbin/init
    init is the first thing that needs to get started for your system to come up.
    at this point of boot, lvm is not available, so your sbin volume, which is where init is, is not mounted.
    this, i think, is what happens.

    it also seems to me that your lvm is a bit..."overdesigned".
    but i don't know your needs, so there may a good reason for doing it that way.
    still, i'd suggest to keep your root file system and swap outside of the lvm config.
    and i'd suggest to make swap a little smaller.
    8gb swap for a 1gb ram system is way too much (unless, of course, you have an application that requires something like 7gb of mem).
    i wouldn't make it bigger than 3 or 3.5gb (which is a lot, already).

    hth
    cheers
    gnu/linux is not windoze

    Comment


      #3
      Re: LVM and booting problem

      Is there anyway i can edit-in the necessary bits into the boot image so that LVM support will be in it, from the LiveDVD?
      Because i also came to the conclusion that the generated ramfs image is not composed correctly in cases where the user needs LVM, which IMHO is what most ppl who setup a server-type will be wanting to use


      I made the swap 8GB, as a look-ahead with upgrade in mind...
      The machine is going to do a lot of things simultaneously (L.A.M.P. + gaming)...
      Well thats all for now, 3M

      Comment


        #4
        Re: LVM and booting problem

        mmm...
        if lvm was an available option during setup, i should indeed work all right...
        my feisty doesn't even have lvm installed by default.
        though, if i apt-get install it, my initramfs gets updated automatically.

        before doing anything, you could try to unzip and unpack your current initrd file
        to make sure lvm is indeed missing. you could boot your box off a live cd, copy
        the initrd.img file from sda1 to /tmp/myimagedir/initrd.gz and then:
        Code:
        gunzip initrd.gz
        cat initrd | cpio -iv
        cd /tmp/myimagedir
        find . -name \*lvm\* -print
        i now find:
        ./sbin/lvm
        ./etc/udev/rules.d/85-lvm.rules
        with 85-lvm.rules containing:
        # This file causes block devices with LVM signatures to be automatically
        # added to their volume group.
        # See udev(8) for syntax

        SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="lvm*|LVM*", RUN+="watershed sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -a y'"
        in order to be able to manipulate the initrd you need the initrd-tools package
        with mkinitrd and the initramfs-tools package with update-initramfs.

        btw, ubuntu has a server edition, which (i really don't know) might have lvm of out the box:
        http://www.ubuntu.com/products/whati.../serveredition
        gnu/linux is not windoze

        Comment


          #5
          Re: LVM and booting problem

          As said i'm using the amd64-DVD, the DVD versions have all 3 CD types in them, so LVM was available at install time.

          See attachment for a full listing of the contents of the boot image, it was generated using the command gunzip -cd initrd.img-2.6.20-15-server | cpio --list --quiet > output.txt,

          Doing a grep lvm output.txt, reveals:
          Code:
          sbin/lvm
          etc/udev/rules.d/85-lvm.rules
          So it seems that lvm was indeed put into the image.

          After fiddling with cpio to extract the files, i was finaly able to get to the contents of etc/udev/rules.d/85-lvm.rules:
          Code:
          # This file causes block devices with LVM signatures to be automatically
          # added to their volume group.
          # See udev(8) for syntax
          
          SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="lvm*|LVM*", RUN+="watershed sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -a y'"
          Regarding the
          Target filesystem doesn't have /sbin/init
          , this seems tobe correct.
          There seems tobe an init script in the / directory however...see listing in attachment.
          Attached Files
          Well thats all for now, 3M

          Comment


            #6
            Re: LVM and booting problem

            From the symptoms you describe, I believe LVM is part of your initramfs. The reason I say this is if LVM wasn't working at all, you wouldn't even get this far but would instead see a "VFS-Couldn't mount root" type of kernel panic before the system would even attempt an /sbin/init. I installed with LVM support off of the alt-installer and everything came up fine in that regard.

            As far as I know /bin, /sbin/, /dev, and /etc, all need to be a part of the root filesystem in order for a system to make it through the booting process. I would try redoing the installation to remove those as separate logical volumes.

            Comment


              #7
              Re: LVM and booting problem

              Originally posted by fati
              As far as I know /bin, /sbin/, /dev, and /etc, all need to be a part of the root filesystem in order for a system to make it through the booting process. I would try redoing the installation to remove those as separate logical volumes.
              One more I forgot, you also need /lib on root

              Comment


                #8
                Re: LVM and booting problem

                You are somehow correct, because after i posted my last reply i tried a few things:
                • I have changed the whole LVM partition setup into a regular extended partition setup, with individual partitions.
                  Did have no effect, as the system still barked the same way!
                • I have then combined the /, /bin, /lib and /sbin partitions into one /, with the combined size of all these partitions.
                  Still had no effect, as the system still barked the same way!
                • After this all, i came to the conclussion that the installer must not like/honor anykind of subpartitioning at all. Except for the swap and /boot.
                  I was right, because when i setup my system using 3 partitions: /, /boot and swap
                  The system cameup nicely this time!
                  In this case i have even made the / partition one big single LV in a single VG


                So as a conclussion of this thread i think its correct to make this comment about *Ubuntu installer:
                When you try to install a new system:
                You cannot have other partitions after the root-FS "/" is mounted, or you wont be able to bootup!
                Well thats all for now, 3M

                Comment


                  #9
                  Re: LVM and booting problem

                  My suggestion: root, bin, sbin, and etc should be outside the LVM and on a regular Ext3(or 2) partition (I read this originally in the Gentoo LVM Howto). The reason is: if something terrible happens to your system, and LVM support can't be loaded, you'll still have a workable system. Otherwise, you have to hope you have a Linux CD that has LVM support built-in, and boot to that.
                  Just my 2 cents...

                  Comment

                  Working...
                  X