LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Lilo wont write to MBR, Fatal error: only linear boot device supported (http://www.linuxquestions.org/questions/slackware-14/lilo-wont-write-to-mbr-fatal-error-only-linear-boot-device-supported-628447/)

agentc0re 03-16-2008 12:28 PM

Lilo wont write to MBR, Fatal error: only linear boot device supported
 
I had to reinstall slackware because i ran into problems with dmraid mixed with grub. something happened where grub couldn't see the kernel anymore and i couldn't figure out why. So I read up on how to do LVM and found out that you can use LVM to also stripe your drives. I didn't find AlienBob's doc on how to install Slack on LVM until after i had done it but the steps i took still accomplished the same thing.

So after i had installed, i was having trouble running lilo and having it write to the MBR. i ended up chroot /mnt, did a vgscan --mknodes, and had to sym link dm-0 to /dev/mapper/vg0-lvs0 (i think.. i wish i could remember and say for sure). i do remember having to symlink it though. Once i had done that, created initrd, edited lilo and it worked.

However, after now being able to boot i can't write lilo again. this is what i get.
Code:

root@nova:~# lilo -t -v             
LILO version 22.8 (test mode), Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2006 John Coffman
Released 19-Feb-2007 and compiled at 01:09:42 on Jun 10 2007.

Using BIOS device code 0x80 for RAID boot blocks
Reading boot sector from /dev/md0
Fatal: device-mapper: only linear boot device supported

I'll start by showing how i have my system setup

Code:

root@nova:~# fdisk -l

Disk /dev/sda: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        123      987966  82  Linux swap
/dev/sda2            124        136      104422+  fd  Linux raid autodetect
/dev/sda3            137      91201  731479612+  8e  Linux LVM

Disk /dev/sdb: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        123      987966  82  Linux swap
/dev/sdb2            124        136      104422+  fd  Linux raid autodetect
/dev/sdb3            137      91201  731479612+  8e  Linux LVM

Disk /dev/dm-0: 1498.0 GB, 1498062782464 bytes
255 heads, 63 sectors/track, 182129 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

    Device Boot      Start        End      Blocks  Id  System

Code:

root@nova:~# pvdisplay;vgdisplay; lvdisplay
  --- Physical volume ---
  PV Name              /dev/sda3
  VG Name              vg0
  PV Size              697.59 GB / not usable 0 
  Allocatable          yes (but full)
  PE Size (KByte)      4096
  Total PE              178583
  Free PE              0
  Allocated PE          178583
  PV UUID              Dbluwg-e0B3-p4EP-lIbA-CoW2-oL3o-6Md4yC
 
  --- Physical volume ---
  PV Name              /dev/sdb3
  VG Name              vg0
  PV Size              697.59 GB / not usable 0 
  Allocatable          yes (but full)
  PE Size (KByte)      4096
  Total PE              178583
  Free PE              0
  Allocated PE          178583
  PV UUID              R2od4U-aJqp-pnyj-2MvK-neuO-NdAg-Y3R5Om
 
  --- Volume group ---
  VG Name              vg0
  System ID           
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  2
  VG Access            read/write
  VG Status            resizable
  MAX LV                0
  Cur LV                1
  Open LV              1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size              1.36 TB
  PE Size              4.00 MB
  Total PE              357166
  Alloc PE / Size      357166 / 1.36 TB
  Free  PE / Size      0 / 0 
  VG UUID              tX57nW-17LX-ce2y-uof1-0MKy-EgbY-cS7hGU
 
  --- Logical volume ---
  LV Name                /dev/vg0/lvs0
  VG Name                vg0
  LV UUID                e3N383-kFwO-SQ4z-Uq2x-uBoQ-FC2w-n2YNhy
  LV Write Access        read/write
  LV Status              available
  # open                1
  LV Size                1.36 TB
  Current LE            357166
  Segments              1
  Allocation            inherit
  Read ahead sectors    0
  Block device          253:0

Code:

root@nova:~# tail -n 100 /etc/fstab
/dev/sda1        swap            swap        defaults,pri=1  0  0
/dev/sdb1        swap            swap        defaults,pri=1  0  0
/dev/vg0/lvs0    /                jfs        defaults        1  1
/dev/md0        /boot            jfs        defaults        1  2
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0

Lilo actually complains more than what i'm showing you. i will restart and post some more. However i think what i'll show you is an easy fix and im pretty sure i need to add mdadm -As somewhere in my initrd but i don't know where.

agentc0re 03-16-2008 01:06 PM

Okay so i figured out my lilo problem. I wasn't running a mount -a after I did a mdadm -As
once i did that, it mounted /boot and lilo works like a charm.

I guess what i need help on is getting mdadm -As to run durring boot.

agentc0re 03-16-2008 02:23 PM

Okay with the help of Xgizzmo in IRC channel, i was told that the latest mkinitrd supports mdadm.

So, i have that whole problem solved.
big thanks to everyone in the IRC channel! :)


All times are GMT -5. The time now is 09:41 PM.