[Bug 1015557] Re: grub-install fails when ldm drives are present

jb 1015557 at bugs.launchpad.net
Thu Jun 21 08:36:04 UTC 2012


I did fix the grub with setting up a BIOS Boot partition..

 My concern is not much as getting grub installed vs if LDM code (where
they may be either with grub or the kernel) is safe.. Afaik ldm code is
still a wip..

To Phillip and whoever is in charge of this thread.. I paid close
attention to why an EFI partition is there-- OsX set it up.. and I don't
use it that efi partition for the boot.. You see I don't have an EFI
bios(It was installed there because the OSx is fooled into thinking
there's a real EFI bios but there isn't.. this is because the Chameleon
bootloader injects smart stuff into ram to fool the OsX installer,
Chameleon is an osx86 project to get OsX work on pc), but in order for
grub-pc to boot on GPT it needs that BIOS Boot Partition.. No problem I
made a 1 Meg partition (enough bit space for grub).. So grub-pc with
grub-install /dev/sdc injected bootcode into the mbr and i bet as well
into that reserved partition of 1 M i made for it..

What unbalanced me, is this was the first time I'm using a linux
software raid setup with this much complexity of being shared with an
Osx86 install(and which btw I have software raid setup with OsX as well
and it boots beautifully-- simply i've transfered chameleon's stage1
boot0 bootloader in an empty new partition of 1Meg-- this boot0 get's
chainloaded from grub).  I have done multiple boot systems with grub and
lilo but WITHOUT raid partitions.. (installing bootloaders for non-raid
is much easier, and have only done with dosmbr)..

What I couldn't determine is what I can do with the EFI partition that
was automatically made by OsX.. From my understanding (correct me if i'm
wrong), an EFI partition does not have to be made on a GPT disk, if that
GPT disk is used on a PC bios machine.

Seriously phcoder.  Grub has its share of bugs, like it or not.  You
have to accept the fact the output of /dev/sda or /dev/sdb is plain
useless and confusing (*especially in my case where I'm working and
****TRYING**** to avoid*** touching those ldm drives)..

Parted too has it's share of bugs.. and I don't know if this was due to
LDM code in the kernel, why parted was choking (AND gparted too was
showing a complete blank drive for /dev/sda saying a partition table not
found..)

Phillip Susi (psusi)
"Normally the installer automatically figures this out, but I guess in your case it didn't."

  I couldn't agree any more that this is what happened with me.. Ubuntu
complains if an "/" mountpoint is not specified and prevents the user
from clicking the next phase.. And I don't know if this should be
addressed or passed to the installation development team to fix the
partitioning part because I'm not using any efi hardware..

Grub-install has output of errors--  it should rather say 'Bios Boot
Partition' (If it did I obviously wouldn't be needing the insults from
phCoder<< and people like this are not helpful and know very little of
the whole problem)

There's virtually absolutely nobody who has (and I was totally stepping
into unchartered territory having no idea if it would work) an OSX86
software raid partitions drives (just the drives are shared of course)
being shared with Linux software RAID partitions with GPT Tables (though
it might be possible to have Osx86 use raid partitions on dosmbr drive).
Absolutely nowhere.  No need to be rude saying.. oh RTFM.  That's rude
and so against the spirit of a working community who are only trying to
help out. Seriously..

"
If you enable LDM support, then lilo is capable of booting from any of the
discovered partitions.  However, grub does not understand the LDM partitioning
and cannot boot from a Dynamic Disk.
"  http://www.kernel.org/doc/Documentation/ldm.txt

http://www.gnu.org/software/grub/manual/grub.html has no information
concerning the above quote about safely using LDM.

Also, to whomever it may concern, parted and gparted exhibit problems
when listing ldm drives.  I can only have speculated because of this
observation I was getting more unnecessary dumb output with grub itself.
Again.. nothing about "ldm" anywhere on gnu.org's grub manual site.. And
this is funny too, especially hearing phcoder telling me on irc that
"ldm is a joke". So where are the LDM docs in the grub manual big guy?

I wish to RTFM more.  Tell me, why not fix grub to show something other
than " error  * " , so that we can at least RTFM FOR OURSELVES.. No you
just want "error" in the output and make us guess as to what the problem
is.  So helpful ..

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1015557

Title:
  grub-install fails when ldm drives are present

Status in “grub2” package in Ubuntu:
  Invalid

Bug description:
  I have 4 drives..

  2 = ldm (microsoft's format called 'dynamic disc' in which neither
  dosmbr nor GPT table style are used) .. -- ldm is a wip in the linux
  kernel

  2 = linux+osx

  --

  A developer in the grub development project hosted a response online
  somewhere (I do not exactly know which grub branch) about the usage of
  a hackintosh on a PC. He does not endorse or sponsor osx but
  acknowledges hfs+ partitions.. so I believe to keep this in very short
  context and wish not to bring up any debate (which shouldnt) whether i
  should have osx on pc or not..

  The case is extremely simple.. Everything works 100% perfectly UP to
  the point that grub-install fails for the Ubuntu-installer (I'm using
  Ubuntu pangolin amd64 -- alternate desktop iso which supports RAID
  upon install)

  About the drives
  -> first 2 == /dev/sda and /dev/sdb
  -> last 2 == /dev/sdc and /dev/sdd

  Bios is kept/never changed across bootups for any OS.

  About the RAID across all OSes->
  ->They are all 100% software raids..

  The question/issue here is not to request on the path to take to have
  grub install on a non-installable drive.... but why it is failing.
  Here's the issue.

  
  grub-install SHOULD NOT be allowed to install on /dev/sda and /dev/sdb... it recognizes this.. this is good.
  grub-install SHOULD be able to install on /dev/sdc or /dev/sdd but it FAILS..

  
  When Ubuntu's installer finished without a grub-install (grub's stage1 could not be injected anywhere).. I could only be able to either boot my other Oses (osx or windows) or bootup into a Ubuntu rescue environment to access my ubuntu raid.

  The setup
  -----------
  /dev/sdc and /dev/sdd are GPT -- there is nothing dumb or out of the ordinary (there is not "hybrid" dosmbr-to-GPT sync stuff being used-- this is not used-- only an absolute clean GPT, fdisk -l even shows this with 1 GPT table entry as the only dosmbr record which is good-> for each of these two drives)

  here are my tables with parted...

  parted /dev/sda p
  "                                                        
  Warning: /dev/sda contains GPT signatures, indicating that it has a GPT table.  However, it does not
  have a valid fake msdos partition table, as it should.  Perhaps it was corrupted -- possibly by a
  program that doesn't understand GPT partition tables.  Or perhaps you deleted the GPT table, and are
  now using an msdos partition table.  Is this a GPT partition table?

                                                                            
  Yes/No? 
  ^C
  "

  
  parted /dev/sdb p
  "Model: ATA ST500DM002-1BD14 (scsi)
  Disk /dev/sdb: 500GB
  Sector size (logical/physical): 512B/4096B
  Partition Table: msdos

  Number  Start   End     Size    Type     File system  Flags
   1      32.3kB  1049kB  1016kB  primary
   2      1049kB  210GB   210GB   primary  ntfs         boot
   3      210GB   500GB   290GB   primary  ntfs

  "

  trivia-- this is new to me.. I've never worked alot with more than 2
  drives and noticed that when two LDM drives are seen by parted or the
  GUI gparted... then one of the drives would show records like you see
  in /dev/sdb (I totally expected to see the same parted message error
  as /dev/sda) .. is LDM partially working (i read that it is a WIP)..
  and I never bothered to mount any /dev/sdbN partitions as ntfs-3g in
  linux (probably dont ever intend to)

  
  parted /dev/sdc p

  "
  Model: ATA ST1000DM003-9YN1 (scsi)
  Disk /dev/sdc: 1000GB
  Sector size (logical/physical): 512B/4096B
  Partition Table: gpt

  Number  Start   End     Size    File system  Name                  Flags
   1      20.5kB  210MB   210MB   fat32        EFI System Partition  boot
   2      210MB   500GB   500GB   hfsx         Raid Partition 1
   3      500GB   500GB   134MB   hfs+         Booter 0x650540f6
   4      500GB   997GB   497GB   hfs+                               raid
   5      997GB   1000GB  3150MB                                     raid
   6      1000GB  1000GB  108MB   ext4
  "

  note: I believe there's a bug in the parted library because it should
  not say "hfs+" for partition 4. This "hfs+" label is a misprint but is
  totally benign in my case(I hope, so far I Haven't had problems re-
  assembling the array no issue-- always consistent).. Exactly the same
  story when I use a gparted live cd, graphically it says "hfs+" though
  it isn't.  I can confirm this is a bug with the parted library because
  I can see with another GPT tool that everything gets listed across the
  last two drives perfectly with a commercial GPT partition tool that
  understands how to work with hfs+ partitions inside-out.. (parted must
  have a glitch in it's partition identifier routine somewhere)


  parted /dev/sdd p
  "
  Model: ATA ST1000DM003-9YN1 (scsi)
  Disk /dev/sdd: 1000GB
  Sector size (logical/physical): 512B/4096B
  Partition Table: gpt

  Number  Start   End     Size    File system  Name                  Flags
   1      20.5kB  210MB   210MB   fat32        EFI System Partition  boot
   2      210MB   500GB   500GB   hfsx         Raid Partition 2
   3      500GB   500GB   134MB   hfs+         Booter 0x650540f6
   4      500GB   997GB   497GB                                      raid
   5      997GB   1000GB  3150MB                                     raid
   6      1000GB  1000GB  108MB   ext4
  "

  ^ For some reason the 4th partition doesnt carry that mystery symptom
  as for /dev/sdc4

  ..
  .
  For intentional purposes: I should wipe out /dev/sdc6 and /dev/sdd6 because they're there for absolutely nothing.. (I do not need /boot to be outside the raid assembly because i know grub2 has features to assemble a raid)

  
  ..Strangely after sometime.. after recording to text file for further logging, I noticed now I can list /dev/sda with both parted or fdisk..(both of these tools were failing to show any partition output-- couldn't recognize any partition style).. I did not change anything other than try to demonstrate grub-install /dev/sda which this time it said it completed. ?? (strange-- this must be due to ldm code somewhere)
   (However grub-install /dev/sdc does not succeed -- the mbr bootcode is nothing but chameleon's boot0 bootcode of about 436 bytes which i don't need at the moment and rather would have grub's stage1 in place)..

  
  Here's the attempt I use with grub-install..
  --------------------

  grub-mkdevicemap -vv

  util/deviceiter.c:396: Already seen /dev/disk/by-id/scsi-SATA_ST500DM002-1BD1_Z2AFX1Y1 (/dev/sda)
  util/deviceiter.c:396: Already seen /dev/disk/by-id/wwn-0x5000c5003f398497 (/dev/sda)
  util/deviceiter.c:396: Already seen /dev/disk/by-id/scsi-SATA_ST500DM002-1BD1_Z2AFSZXW (/dev/sdb)
  util/deviceiter.c:396: Already seen /dev/disk/by-id/wwn-0x5000c5003f39d3ac (/dev/sdb)
  util/deviceiter.c:396: Already seen /dev/disk/by-id/scsi-SATA_ST1000DM003-9YN_S1D1RXKE (/dev/sdc)
  util/deviceiter.c:396: Already seen /dev/disk/by-id/wwn-0x5000c5004b2bccf6 (/dev/sdc)
  util/deviceiter.c:396: Already seen /dev/disk/by-id/scsi-SATA_ST1000DM003-9YN_S1D1LJYN (/dev/sdd)
  util/deviceiter.c:396: Already seen /dev/disk/by-id/wwn-0x5000c5004b295b32 (/dev/sdd)
  util/deviceiter.c:396: Already seen /dev/disk/by-id/scsi-SMaxtor_6Y080L0_3Y36JDEV (/dev/sde)
  util/deviceiter.c:396: Already seen /dev/sda (/dev/sda)
  util/deviceiter.c:396: Already seen /dev/sdb (/dev/sdb)
  util/deviceiter.c:396: Already seen /dev/sdc (/dev/sdc)
  util/deviceiter.c:396: Already seen /dev/sdd (/dev/sdd)
  util/deviceiter.c:396: Already seen /dev/sde (/dev/sde)
  util/deviceiter.c:396: Already seen /dev/sdj (/dev/sdj)
  util/deviceiter.c:883: No DM devices found
  --
  cat /boot/grub/device.map  (i'm not using hd4 nor hd5 for anything , I plugged these two usb drives later and can be ignored-- symptom was there before plugging these two usb drives)

  (hd0)	/dev/disk/by-id/ata-ST500DM002-1BD142_Z2AFX1Y1
  (hd1)	/dev/disk/by-id/ata-ST500DM002-1BD142_Z2AFSZXW
  (hd2)	/dev/disk/by-id/ata-ST1000DM003-9YN162_S1D1RXKE
  (hd3)	/dev/disk/by-id/ata-ST1000DM003-9YN162_S1D1LJYN
  (hd4)	/dev/disk/by-id/ata-Maxtor_6Y080L0_Y363DJVE
  (hd5)	/dev/disk/by-id/usb-Lexar_JD_Secure_II_+_AA04011300000543-0:0

  --

  mount <enter>

  /dev/md0 on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)
  devtmpfs on /dev type devtmpfs (rw,relatime,size=1535940k,nr_inodes=383985,mode=755)
  /dev/sr0 on /media/cdrom type iso9660 (ro,relatime)
  proc on /proc type proc (rw,relatime)
  sysfs on /sys type sysfs (rw,relatime)
  /dev/sdj1 on /mnt/sdj1 type vfat (rw)
  --

  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  grub-install /dev/sda
  Installation finished. No error reported.

  note: I was number times getting the following output for grub-install /dev/sda.. I have no idea why now grub-install now success, but be ldm or something!!!!
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  However note the following error, My Main objective is to use /dev/sdc
  or /dev/sdc to host grub2's stage1

  grub-install /dev/sdc

  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
  /usr/sbin/grub-setup: error: embedding is not possible, but this is required for cross-disk install.

  
  note As you can see above all those cannot seek /dev/sda show up when doing grub-install /dev/sdc.. shouldnt grub-install ignore /dev/sda?

  --

  trying disk by-id path for sdc
  grub-install /dev/disk/by-id/ata-ST1000DM003-9YN162_S1D1RXKE

  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sda'.
  /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
  /usr/sbin/grub-setup: error: embedding is not possible, but this is required for cross-disk install.

  same symptom

  ..
  ...
  My main objective is to use /dev/sdc or /dev/sdd to host grub2's stage1, but never can grub-install inject stage1 to either /dev/sdc or /dev/sdd mbr.. (grub-install /dev/sdc , grub-install /dev/sdd, or grub-install /dev/disk/by-id/<> fails too)

  --  injecting grub into /dev/sda or /dev/sdb may break mswin's raid
  consistency (which is fine because i'm testing it:).. but right now, I
  can only bootup with a minimal grub shell when boot off /dev/sda..

  The raid for the 4 linux partitions (2 linux raid partitions on
  /dev/sdc and 2 linux raid partitions on /dev/sdd), two RAID1 sets- md0
  ==raid1, md1==raid1..

  md/0 --> sdc4 and sdd4 (/dev/md0 == ext4 -- i'm not using any partition tables on /dev/md0)
  md/1 --> sdc5 and sdd5 (/dev/md1 == swap -- i'm not using any partition tables on /dev/md1)

  ..cat /proc/mdstat shows perfect consistency when i go to a rescue
  environment any time..

  ok.. I rebooted, when I now try to do grub-install /dev/sdc, I get

  "error: cannot seek `/dev/sdb'. .. sometimes it does the following..

  "
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sdb'.
  error: cannot seek `/dev/sda'.
  error: cannot seek `/dev/sdb'.
  ..
  "

  Some is very wrong somewhere and I can speculate it has to do with ldm code in the kernel because both parted and grub-install have apparent bugs..
  The bug i encountered for parted/gparted is that /dev/sdc4 carries a "hfs+" identifier, but a commercial GPT tool shows there's now hfs+ identifier for /dev/sdc4.. I did not use this tool to partition.. but used Ubuntu's installer to do manually partitioning for setting up the linux raid..

  
  I'm not sure if I should send this bug upstream.. but if necessary please do . Thank you for any feeback..grealy appreciate it really..

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1015557/+subscriptions




More information about the foundations-bugs mailing list