20.03.2016 09:38, Emilio Lazo Zaia пишет: > > On 20/03/16 00:35, Andrei Borzenkov wrote: >> (...) >> Create rescue image that can be used to boot off CD/USB >> >> pkgdatadir=$PWD ./grub-mkrescue -d grub-core -o /tmp/grub.iso >> >> This creates ISO image suitable for both CD and HDD boot. If using USB >> stick, just dd this image on full stick. When booting from it, you will >> end in GRUB command prompt. > Dumped into a USB stick... >> Check what >> >> ls -l >> in GRUB CLI says. What sector size GRUB detects for your disk? Does GRUB >> see partitions on your disk? Do they look reasonable (size, offset)? If >> yes, try > It says "Device hd2: No known filesystem detected - Sector size 4096B - > Total size 3906984960KiB" > > Partitions are not detected! In the previous test (GRUB 2.00-7) it > doesn't show the sector size but the sector size it detects is 512B > because of total sectors and partition offsets. In that test, ls -l says: >
No, GRUB internally works with 512B sectors and converts them when doing disk IO as appropriate. So this does not say anything about device sector size; display was added later. > Device hd2: No known filesystem detected - Total size 7813969920 > Partition hd2,gpt2: No known ... - Starts at 2048 ... > Partition hd2,gpt1: No known ... - Starts at 64 ... > > Total size of 7813969920 sectors with 512 bytes per sector is also > 3906984960KiB. Partition 1 starts at sector 64 (assuming 512B sectors) > is the same as it starts at sector 8 (4096B sectors, as gpart shows). > The same applies to partition 2, which starts at sector 2048 on 512B > units, or 256 on 4096B units. >> >> insmod lvm >> ls -l >> >> again. Does GRUB detect LVs? > Nein. It doesn't detect LVs with the iso hybrid image I dumped into an > USB stick, but it detect LVs and load kernel with GRUB 2.00-7 installed > on laptop's hard drive. So we additionally have regression against 2.00 :( Please test attached patch; it is the only real change in biosdisk driver comparing with 2.00. >> Do you have serial port (RS-2323) on your system and another system that >> can be used to connect to serial port? This would make capturing output >> much easier. > I'm sorry, I don't have serial ports. > > Emilio.
diff --git b/grub-core/disk/i386/pc/biosdisk.c a/grub-core/disk/i386/pc/biosdisk.c index f0aadd1..7ca89e3 100644 --- b/grub-core/disk/i386/pc/biosdisk.c +++ a/grub-core/disk/i386/pc/biosdisk.c @@ -570,6 +547,10 @@ get_safe_sectors (grub_disk_t disk, grub_disk_addr_t sector) size = sectors - offset; + /* Limit the max to 0x7f because of Phoenix EDD. */ + if (size > ((0x7fU << GRUB_DISK_SECTOR_BITS) >> disk->log_sector_size)) + size = ((0x7fU << GRUB_DISK_SECTOR_BITS) >> disk->log_sector_size); + return size; }
_______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
