[Bug 1015557] Re: grub-install fails when ldm drives are present
jb
1015557 at bugs.launchpad.net
Thu Jun 21 08:52:01 UTC 2012
"This GPT partition label has no BIOS Boot Partition; embedding won't be
possible!." << Oh wait hold ON.. I didn't ask to inject it on
/dev/sda.. PROGRAM LOGIC ERROR.
"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.
"
GPT for /dev/sda doens't have a "Bios Boot Partition" ? HUH? no I did
my fix on /dev/sdc.. wtf do i need to inject a "Bios Boot Partition" on
/dev/sda ldm drive? Glad I solved the problem figure this part out on
my own as well.. The warning message was absolutely useless here..
See the error messages are all messed up. Now I'm the one laughing because I have to RTFM on how to install a Bios BOOT Partition against an LDM DRIVE.
GOOD ONE.
--
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