Re: help with grub 1.99-2

2014-08-09 Thread Andrey Borzenkov
В Sat, 9 Aug 2014 15:25:50 -0400
Hernán Fernández her...@mitierra.cl пишет:

 thanks Jordan, I tried to analyze the outputs, without success
 
 echo $prefix return
 (hd0,gpt2)/EFI/Ubuntu
 

Are you using legacy BIOS boot or EFI boot? You have both bootloaders
and we do not know which one is actually used. Also I'm afraid your
grub version is a bit old to show this information at runtime.

 bootinfo script returned
 (here (,gpt6)/boot/grub called my attention, I don't know what is gpt6)
 

It is partition 6 on your drive. According to output it does contain
elementary OS so it appears to be correct.

 
 
   Boot Info Script 0.61  [1 April 2012]
 
 
 = Boot Info Summary:
 ===
 
  = Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector
 389763072 of the same hard drive for core.img. core.img is at this
 location and looks for (,gpt6)/boot/grub on this drive.
 
 sda1:
 __
 
 File system:   ntfs
 Boot sector type:  Windows Vista/7: NTFS
 Boot sector info:  No errors found in the Boot Parameter Block.
 Operating System:
 Boot files:
 
 sda2:
 __
 
 File system:   vfat
 Boot sector type:  Unknown
 Boot sector info:  No errors found in the Boot Parameter Block.
 Operating System:
 Boot files:/grub.cfg /efi/Boot/bootx64.efi
/efi/elementary/grubx64.efi
/efi/elementary/shimx64.efi /bootmgr /boot/bcd
 
 sda3:
 __
 
 File system:
 Boot sector type:  -
 Boot sector info:
 Mounting failed:   mount: unknown filesystem type ''
 
 sda4:
 __
 
 File system:   ntfs
 Boot sector type:  Windows Vista/7: NTFS
 Boot sector info:  No errors found in the Boot Parameter Block.
 Operating System:
 Boot files:/bootmgr /Windows/System32/winload.exe
 
 sda5:
 __
 
 File system:   BIOS Boot partition
 Boot sector type:  Grub2's core.img
 Boot sector info:
 
 sda6:
 __
 
 File system:   ext4
 Boot sector type:  -
 Boot sector info:
 Operating System:  elementary OS Luna
 Boot files:/boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
 
 sda7:
 __
 
 File system:   swap
 Boot sector type:  -
 Boot sector info:
 
  Drive/Partition Info:
 =
 
 Drive: sda
 _
 
 Disk /dev/sda: 500.1 GB, 500107862016 bytes
 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 4096 bytes
 
 Partition  Boot  Start SectorEnd Sector  # of Sectors  Id System
 
 /dev/sda1   1   976,773,167   976,773,167  ee GPT
 
 
 GUID Partition Table detected.
 
 PartitionStart SectorEnd Sector  # of Sectors System
 /dev/sda1   2,048 1,023,999 1,021,952 Windows Recovery
 Environment (Windows)
 /dev/sda2   1,024,000 1,638,399   614,400 EFI System partition
 /dev/sda3   1,638,400 1,900,543   262,144 Microsoft Reserved
 Partition (Windows)
 /dev/sda4   1,900,544   389,761,422   387,860,879 Data partition
 (Windows/Linux)
 /dev/sda5 389,763,072   389,765,119 2,048 BIOS Boot partition
 /dev/sda6 389,765,120   960,231,423   570,466,304 Data partition
 (Windows/Linux)
 /dev/sda7 960,231,424   976,771,07116,539,648 Swap partition (Linux)
 
 blkid output:
 
 
 Device   UUID   TYPE   LABEL
 
 /dev/sda1B60E5B6E0E5B26A1   ntfs   Windows
 RE tools
 /dev/sda2145D-ECAB  vfat   SYSTEM
 /dev/sda41A125FE5125FC503   ntfs
 /dev/sda658b9c768-d9fc-484f-a6f6-54cc25216c4a   ext4
 /dev/sda73acd7db7-2c97-459c-9257-880979edcedf   swap
 
  Mount points:
 =
 
 Device   Mount_Point  Type   Options
 
 /dev/sda6/ext4   (rw,errors=remount-ro)
 
 
  sda2/grub.cfg:
 
 
 
 

Re: help with grub 1.99-2

2014-08-09 Thread Andrey Borzenkov
В Sun, 10 Aug 2014 01:11:12 -0400
Hernán Fernández her...@mitierra.cl пишет:

 The BIOS has a mode called CMS, that allow boot windows 8 and Linux. Its a
 Samsung notebook NP470r.

You probably mean CSM.

Anyway, it sounds like you actually are not using CSM. When you are in
grub command line, do you have e.g. drivemap command (simply try
drivemap on command line - does it return an error or anything else?) 

 
 It should be the same grub version than Ubuntu.
 On Aug 10, 2014 12:47 AM, Andrey Borzenkov arvidj...@gmail.com wrote:
 
  В Sat, 9 Aug 2014 15:25:50 -0400
  Hernán Fernández her...@mitierra.cl пишет:
 
   thanks Jordan, I tried to analyze the outputs, without success
  
   echo $prefix return
   (hd0,gpt2)/EFI/Ubuntu
  
 
  Are you using legacy BIOS boot or EFI boot? You have both bootloaders
  and we do not know which one is actually used. Also I'm afraid your
  grub version is a bit old to show this information at runtime.
 
   bootinfo script returned
   (here (,gpt6)/boot/grub called my attention, I don't know what is gpt6)
  
 
  It is partition 6 on your drive. According to output it does contain
  elementary OS so it appears to be correct.
 
  
   
 Boot Info Script 0.61  [1 April 2012]
  
  
   = Boot Info Summary:
   ===
  
= Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector
   389763072 of the same hard drive for core.img. core.img is at this
   location and looks for (,gpt6)/boot/grub on this drive.
  
   sda1:
  
  __
  
   File system:   ntfs
   Boot sector type:  Windows Vista/7: NTFS
   Boot sector info:  No errors found in the Boot Parameter Block.
   Operating System:
   Boot files:
  
   sda2:
  
  __
  
   File system:   vfat
   Boot sector type:  Unknown
   Boot sector info:  No errors found in the Boot Parameter Block.
   Operating System:
   Boot files:/grub.cfg /efi/Boot/bootx64.efi
  /efi/elementary/grubx64.efi
  /efi/elementary/shimx64.efi /bootmgr /boot/bcd
  
   sda3:
  
  __
  
   File system:
   Boot sector type:  -
   Boot sector info:
   Mounting failed:   mount: unknown filesystem type ''
  
   sda4:
  
  __
  
   File system:   ntfs
   Boot sector type:  Windows Vista/7: NTFS
   Boot sector info:  No errors found in the Boot Parameter Block.
   Operating System:
   Boot files:/bootmgr /Windows/System32/winload.exe
  
   sda5:
  
  __
  
   File system:   BIOS Boot partition
   Boot sector type:  Grub2's core.img
   Boot sector info:
  
   sda6:
  
  __
  
   File system:   ext4
   Boot sector type:  -
   Boot sector info:
   Operating System:  elementary OS Luna
   Boot files:/boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
  
   sda7:
  
  __
  
   File system:   swap
   Boot sector type:  -
   Boot sector info:
  
    Drive/Partition Info:
   =
  
   Drive: sda
   _
  
   Disk /dev/sda: 500.1 GB, 500107862016 bytes
   255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
   Units = sectors of 1 * 512 = 512 bytes
   Sector size (logical/physical): 512 bytes / 4096 bytes
  
   Partition  Boot  Start SectorEnd Sector  # of Sectors  Id System
  
   /dev/sda1   1   976,773,167   976,773,167  ee GPT
  
  
   GUID Partition Table detected.
  
   PartitionStart SectorEnd Sector  # of Sectors System
   /dev/sda1   2,048 1,023,999 1,021,952 Windows Recovery
   Environment (Windows)
   /dev/sda2   1,024,000 1,638,399   614,400 EFI System
  partition
   /dev/sda3   1,638,400 1,900,543   262,144 Microsoft Reserved
   Partition (Windows)
   /dev/sda4   1,900,544   389,761,422   387,860,879 Data partition
   (Windows/Linux)
   /dev/sda5 389,763,072   389,765,119 2,048 BIOS Boot partition
   /dev/sda6 389,765,120   960,231,423   570,466,304 Data partition
   (Windows/Linux)
   /dev/sda7 960,231,424   976,771,07116,539,648 Swap partition
  (Linux)
  
   blkid output:
   
  
   Device   UUID

Re: Non-Linux, non-Unix platforms

2014-08-01 Thread Andrey Borzenkov
В Fri, 1 Aug 2014 23:25:03 -0600
Dee Sharpe demetrioussha...@netscape.net пишет:

 Is it possible to use Grub2 on platforms other than Linux? Such platforms may 
 not use the run level setup, which Grub2 seems to rely on.

What are you talking about? grub has nothing to do with run level.

  Also, what about platforms that aren't Unix-based? Such platforms may
  not run bash scripts or have etc/ directories.

Current version 2.02 beta2 switched from shell scripts to compiled
binaries; e.g. Windows is supported natively, you can download prebuilt
package from alpha.gnu.org. Also platform support code is sufficiently
modular so adding support for new systems should be easier.

  Forgive me if this
  information is provided elsewhere. I've googled this subject  I can
  only find dual-booting examples. I'd like to find out how to setup 
  use Grub2 with an alternative OS, as a first class platform.
 
 Apollo Demetrious Sharpe
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Grub on a Micron Trek 2.

2014-07-12 Thread Andrey Borzenkov
В Fri, 11 Jul 2014 11:10:34 -0700
pe...@easthope.ca пишет:
 
 OK, I commented everything but the menuentry command. 
 Also removed boot from the menuentry. 
 Still no menu and grub drops to the command interface.  
 chainloader (hd0,5)+1enterboot starts the target system.
 
 If the --unrestricted option is removed from menuentry, then 
 the menu appears and the target system starts from it.  I don't 
 recognize why that option blocks the menu.
 

I can't reproduce it using current master head. I created rescue image
with grub.cfg containing your single menu entry (copy-paste) and when I
boot I'm presented with menu. May be something else was changed besides
--unrestricted.

 In any case, grub is working now.
 
 Thanks for the tips,... Peter E.
 
 
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: install two instance of linux in uefi mode.

2014-07-08 Thread Andrey Borzenkov
On Tue, Jul 8, 2014 at 10:24 AM, Bizhan Gholikhamseh (bgholikh)
bghol...@cisco.com wrote:



 Hi

 I have partitioned my disk to

  /dev/sda1 efi,

 /dev/sda2 ext4,

 /dev/sda3, ext4

 /dev/sda4 swap.



 I boot my system in uefi mode, the /dev/sda1 has efi which is mounted
 on /boot/efi.

 This is  ubuntu 14.04 system installed on /dev/sda2. I managed to
 install another instance of ubuntu 14.04 using debootstrap on
 /dev/sda3, now I need to install grub for that partition, what should I do 
 please?


grub2 installs bootloader in \EFI\${GRUB_DISTRIBUTOR} directory, where 
GRUB_DISTRIBUTOR is defined in /etc/default/grub. After installation you can 
manually edit this file; whether it can be changed during installation you 
probably need to ask on your distribution support list.

 I like to understand what you suggesting. If GRUB_DISTRIBUTOR is modifiable. 
 Then you suggesting to install the grub for the new slot (/dev/sda3)  
 \EFI\New destination\ directory ?  Please let me know.


Bootloader is installed in ESP (EFI System Partition) which in your
case is sda1. That is why you need  to different GRUB_DISTRIBUTOR, to
distinguish between two different instances of the same OS.

Alternatively you could create second ESP for your second OS. Linux
should have no problems with it.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Access to DMI/SMBIOS data from GRUB

2014-07-08 Thread Andrey Borzenkov
On Tue, Jul 8, 2014 at 6:09 AM, Michael Mohr
michaelm...@hyvesolutions.com wrote:
 Good evening;

 I'm looking for a way to read strings stored in a server's DMI tables from
 GRUB2.  In grub-core/loader/multiboot.c, there is a FIXME which states that
 SMBIOS tables are not supported.  However, in
 grub-core/commands/efi/loadbios.c's fake_bios_data, it seems that there may
 well be a way to access this data.  Is there code available somewhere which
 encapsulates the process of deserializing this data?  If so, how do I use
 it?  If not, how difficult would it be to implement?

 I'm looking at this as a solution to boot servers in a datacenter based on
 e.g. the system serial number as saved in DMI.


Check grub-devel archives, there was proposed patch to access SMBIOS
information.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Accessing UEFI variables from GRUB

2014-07-08 Thread Andrey Borzenkov
В Wed, 9 Jul 2014 01:14:58 +
Michael Mohr michaelm...@hyvesolutions.com пишет:

 Good evening;
 
 Is it possible to read EFI variables from grub-efi (i.e. grubx64.efi) via the 
 configuration file?  I would like to change the behavior of a server (i.e. 
 boot order, kernel options, etc) based on one or more variables from EFI.
 

No, it is not implemented so far.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Debian squeeze on raid 0 and install grub2

2014-07-02 Thread Andrey Borzenkov
On Wed, Jul 2, 2014 at 10:25 AM, Damien Moity lebasqu...@hotmail.com wrote:
 Hello,

 I wrote a script that allows me to install the distribution debian squeeze
 on a RAID 0 but the script crashes when installing grub :
 ---
 grub-install --modules=raid mdraid part_gpt ext2 /dev/md0

Is it software MD raid or fake-raid (dmraid)? It appears pure software
raid, but just to be sure ...

 /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless
 disk.  This is a BAD idea..
 /usr/sbin/grub-setup: error: embedding is not possible, but this is required
 when the root device is on a RAID array or LVM volume.
 ---

 Grub version :
 ---
 update-grub -v
 grub-mkconfig (GRUB) 1.98+20100804-14+squeeze1

 grub-install -v
 grub-install (GRUB) 1.98+20100804-14+squeeze1
 ---

 First I boot on a System Rescue CD and I create 'logical raid0' with
 'mdadm' :
 ---
 mdadm -D /dev/md0
 /dev/md0:
 Version : 1.2
   Creation Time : Tue Jul  1 14:07:21 2014
  Raid Level : raid0
  Array Size : 52427776 (50.00 GiB 53.69 GB)
Raid Devices : 2
   Total Devices : 2
 Persistence : Superblock is persistent

 Update Time : Tue Jul  1 14:07:21 2014
   State : clean
  Active Devices : 2
 Working Devices : 2
  Failed Devices : 0
   Spare Devices : 0

  Chunk Size : 512K

Name : sysresccd:0  (local to host sysresccd)
UUID : 972ee921:bc2ecdb5:0c9b9350:14cbf787
  Events : 0

 Number   Major   Minor   RaidDevice State
0   800  active sync   /dev/sda
1   8   161  active sync   /dev/sdb
 ---

 I create raid0 partitions with 'gdisk' :
 ---
 root@sysresccd /root % gdisk -l /dev/md0
 GPT fdisk (gdisk) version 0.8.8

 Partition table scan:
   MBR: protective
   BSD: not present
   APM: not present
   GPT: present

 Found valid GPT with protective MBR; using GPT.
 Disk /dev/md0: 10482 sectors, 50.0 GiB
 Logical sector size: 512 bytes
 Disk identifier (GUID): 45EC12F7-47B7-4339-A219-199F35A51B5F
 Partition table holds up to 128 entries
 First usable sector is 34, last usable sector is 104855518
 Partitions will be aligned on 2048-sector boundaries
 Total free space is 2014 sectors (1007.0 KiB)

 Number  Start (sector)End (sector)  Size   Code  Name
12048   18431   8.0 MiB EF02  BIOS boot partition
2   1843241961471   20.0 GiBEF00  Linux filesystem
34196147244058623   1024.0 MiB  8200  Linux swap
444058624   104855518   29.0 GiB8300  Linux filesystem
 ---

 I make filesystem on created partitions :
 * part1 (md0p1) with mkfs.ext3 = bios_grub
 * part2 (md0p2) with mkfs.ext3 = /
 * part3 (md0p3) with mkswap = swap
 * part4 (md0p4) with mkswap = /srv

 I install debian distribution on md0p2 :
 * partimage -B=foo -b restore /dev/md0p2 my_image_debian
 * e2fsck -f -y /dev/md0p2
 * resize2fs -f /dev/md0p2

 I mount ressources :
 ---
 mount -l | grep md0
 /dev/md0p2 on /mnt/gentoo type ext3 (rw)
 /dev/md0p4 on /mnt/gentoo/srv type ext3 (rw)
 ---

 I init fstab and mtab with the new partitions.

 And now i want to install grub. I write disk on
 /mnt/gentoo/boot/grub/device.map :
 ---
 cat /mnt/gentoo/boot/grub/device.map
 (md0)   /dev/disk/by-id/md-uuid-972ee921:bc2ecdb5:0c9b9350:14cbf787
 (md0p2) /dev/disk/by-id/md-uuid-972ee921:bc2ecdb5:0c9b9350:14cbf787-part2
 (hd0)   /dev/disk/by-id/ata-VBOX_HARDDISK_VB4b33f8ee-87039d31
 (hd1)   /dev/disk/by-id/ata-VBOX_HARDDISK_VBc34d645e-16ef1e20
 ---

 I update grub with : chroot /mnt/gentoo /bin/bash update-grub and and after
 installation of grub crashes.

 Do you have any ideas on what could be wrong ? I read many forums but I have
 not found a solution.

 Thanks for your help.

 Damien.

 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Debian squeeze on raid 0 and install grub2

2014-07-02 Thread Andrey Borzenkov
On Wed, Jul 2, 2014 at 12:13 PM, Damien Moity lebasqu...@hotmail.com wrote:
 Is it software MD raid or fake-raid (dmraid)? It appears pure software
 raid, but just to be sure ...


 It is software raid create with 'mdadm'.


It's not going to work. You cannot install bootloader on software
raid0. You have to install it on each individual disk. You will need
to install it in MBR so it can be embedded.

 Le 02/07/2014 10:00, Andrey Borzenkov a écrit :

 On Wed, Jul 2, 2014 at 10:25 AM, Damien Moity lebasqu...@hotmail.com
 wrote:

 Hello,

 I wrote a script that allows me to install the distribution debian
 squeeze
 on a RAID 0 but the script crashes when installing grub :
 ---
 grub-install --modules=raid mdraid part_gpt ext2 /dev/md0

 Is it software MD raid or fake-raid (dmraid)? It appears pure software
 raid, but just to be sure ...

 /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless
 disk.  This is a BAD idea..
 /usr/sbin/grub-setup: error: embedding is not possible, but this is
 required
 when the root device is on a RAID array or LVM volume.
 ---

 Grub version :
 ---
 update-grub -v
 grub-mkconfig (GRUB) 1.98+20100804-14+squeeze1

 grub-install -v
 grub-install (GRUB) 1.98+20100804-14+squeeze1
 ---

 First I boot on a System Rescue CD and I create 'logical raid0' with
 'mdadm' :
 ---
 mdadm -D /dev/md0
 /dev/md0:
  Version : 1.2
Creation Time : Tue Jul  1 14:07:21 2014
   Raid Level : raid0
   Array Size : 52427776 (50.00 GiB 53.69 GB)
 Raid Devices : 2
Total Devices : 2
  Persistence : Superblock is persistent

  Update Time : Tue Jul  1 14:07:21 2014
State : clean
   Active Devices : 2
 Working Devices : 2
   Failed Devices : 0
Spare Devices : 0

   Chunk Size : 512K

 Name : sysresccd:0  (local to host sysresccd)
 UUID : 972ee921:bc2ecdb5:0c9b9350:14cbf787
   Events : 0

  Number   Major   Minor   RaidDevice State
 0   800  active sync   /dev/sda
 1   8   161  active sync   /dev/sdb
 ---

 I create raid0 partitions with 'gdisk' :
 ---
 root@sysresccd /root % gdisk -l /dev/md0
 GPT fdisk (gdisk) version 0.8.8

 Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

 Found valid GPT with protective MBR; using GPT.
 Disk /dev/md0: 10482 sectors, 50.0 GiB
 Logical sector size: 512 bytes
 Disk identifier (GUID): 45EC12F7-47B7-4339-A219-199F35A51B5F
 Partition table holds up to 128 entries
 First usable sector is 34, last usable sector is 104855518
 Partitions will be aligned on 2048-sector boundaries
 Total free space is 2014 sectors (1007.0 KiB)

 Number  Start (sector)End (sector)  Size   Code  Name
 12048   18431   8.0 MiB EF02  BIOS boot
 partition
 2   1843241961471   20.0 GiBEF00  Linux
 filesystem
 34196147244058623   1024.0 MiB  8200  Linux swap
 444058624   104855518   29.0 GiB8300  Linux
 filesystem
 ---

 I make filesystem on created partitions :
 * part1 (md0p1) with mkfs.ext3 = bios_grub
 * part2 (md0p2) with mkfs.ext3 = /
 * part3 (md0p3) with mkswap = swap
 * part4 (md0p4) with mkswap = /srv

 I install debian distribution on md0p2 :
 * partimage -B=foo -b restore /dev/md0p2 my_image_debian
 * e2fsck -f -y /dev/md0p2
 * resize2fs -f /dev/md0p2

 I mount ressources :
 ---
 mount -l | grep md0
 /dev/md0p2 on /mnt/gentoo type ext3 (rw)
 /dev/md0p4 on /mnt/gentoo/srv type ext3 (rw)
 ---

 I init fstab and mtab with the new partitions.

 And now i want to install grub. I write disk on
 /mnt/gentoo/boot/grub/device.map :
 ---
 cat /mnt/gentoo/boot/grub/device.map
 (md0)   /dev/disk/by-id/md-uuid-972ee921:bc2ecdb5:0c9b9350:14cbf787
 (md0p2) /dev/disk/by-id/md-uuid-972ee921:bc2ecdb5:0c9b9350:14cbf787-part2
 (hd0)   /dev/disk/by-id/ata-VBOX_HARDDISK_VB4b33f8ee-87039d31
 (hd1)   /dev/disk/by-id/ata-VBOX_HARDDISK_VBc34d645e-16ef1e20
 ---

 I update grub with : chroot /mnt/gentoo /bin/bash update-grub and and
 after
 installation of grub crashes.

 Do you have any ideas on what could be wrong ? I read many forums but I
 have
 not found a solution.

 Thanks for your help.

 Damien.

 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub




___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Extract memdisk from grub image

2014-06-26 Thread Andrey Borzenkov
В Thu, 26 Jun 2014 13:41:08 -0500
Robert Kliewer robert.klie...@gmail.com пишет:

 I was wondering if there is a way to extract an embedded memdisk from a
 grub boot image.  I am trying to recover a grub config embedded in a
 memdisk (this is the primary config, not the initial one used with the -c
 option) of a grub pxe image I created.  I couldn't find what I was looking
 for among the current utilities and and I went off into the weeds pretty
 quick looking at the grub-mkimage source to figure out how to disassemble
 the boot image.  Any help is appreciated.  Thanks.
 

Look at
https://github.com/arvidjaar/bootinfoscript/raw/master/bootinfoscript

It contains loop over all modules in core.img. Note that you cannot
pass file to it - scripts is intended to detect bootloaders installed
on a harddisk. I started at one point writing core.img parser based
on it, but got distracted.

Note that script expects that files starts with diskboot.img. You may
need to tweak it for PXE image.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Using Grub across architectures

2014-06-20 Thread Andrey Borzenkov
В Fri, 20 Jun 2014 11:00:07 +0100
David Goodenough david.goodeno...@btconnect.com пишет:

 If I have a host PC (say an Amd64) and I want to set up grub on a USB
 stick for use on another system (say an ARM or i386 system) how do I tell
 grub to use the version on the stick (assume that the USB stick already
 has a complete linux system including grub physically on the USB stick)
 rather than the host code?
 

If I understand your question correctly:

grub-install --directory=/path/to/grub/on/USB/arch ...

e.g.

grub-install --directory=/mnt/usb/usr/lib/grub/i386-pc ...

Not everything is really possible to cross-platform. In particular, any
actions that involve updating system NVRAM are obviously not possible
unless you are on this system.

You may also look at grub-mkrescue which creates bootable hybrid
ISO/USB image for all platforms present in /usr/lib/grub/platform (or
where it is installed).

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: PXE booting over IPv6

2014-06-20 Thread Andrey Borzenkov
В Thu, 19 Jun 2014 13:10:57 -0700
Michael Mohr michaelm...@hyvesolutions.com пишет:

 Good afternoon;
 
 I'm attempting to set up an IPv6-based PXE boot environment with iPXE 
 and GRUB.  I've updated the option ROM on an Intel network card using 
 the latest iPXE code (git rev 7fe0735) with IPv6 support enabled.  
 Booting from this card, iPXE is able to auto-configure both a link-local 
 IPv6 address as well as one from radvd (via SLAAC).  iPXE also 
 successfully requests additional parameters from a DHCPv6 server, 
 including the bootfile-url, which allows it to retrieve a copy of GRUB 
 generated as follows:
 
 michael@shuriken:~$ grub-mkimage --version
 grub-mkimage (GRUB) 2.02~beta2-9
 michael@shuriken:~$ grub-mkimage --format=i386-pc-pxe --output=grub.pxe 
 --prefix='(pxe)/boot/grub' \
   pxe tftp http cpuid echo gfxterm gzio minicmd normal png vbe
 
 iPXE successfully downloads the GRUB PXE image from a local HTTP server 
 and transfers control to it.  I am then dropped into a GRUB shell and 
 the boot process stops.  I've tried running net_ipv6_autoconf, which 
 initially reports error: couldn't autoconfigure PXE, but if I run it a 
 few times it is eventually able to configure the network interfaces (as 
 shown by net_ls_addr) with appropriate IPv6 addresses.
 

grub currently does not send SLAAC solicitation, it passively waits for
SLAAC advertisements, so it depends on how frequently your router sends
them.

 Clearly GRUB isn't able to retrieve its configuration file for some 
 reason.  I've placed one on the HTTP server specified in DHCP as 
 http://[ipv6::address]/boot/grub/grub.conf and am able to retrieve it 
 with a standard web browser.  I suspect that I'm missing something 
 fundamental here, so any enlightenment you can provide is appreciated.
 

As far as I can tell grub does not use square brackets when parsing
IPv6 address. Try using something like

(http,1:2::4:5)/path/to/file


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Updating CPU microcode possible?

2014-06-02 Thread Andrey Borzenkov
В Mon, 02 Jun 2014 13:39:42 +0300
Nikos Chantziaras rea...@gmail.com пишет:

 On 01/06/14 18:12, Andrey Borzenkov wrote:
  В Sat, 31 May 2014 12:18:06 +0300
  Nikos Chantziaras rea...@gmail.com пишет:
 [...]
  I'm using Grub 2.02 beta 2 to boot three operating systems on my machine
  (Gentoo, FreeBSD and Windows 8.1.) It would be nice if I could make Grub
  do a microcode update before booting any of those operating systems.
  Right now, I am only able to a microcode update in Linux, after the
  kernel is booted.
 
 
  Someone will need to write grub code to do it.
 
 I found this:
 
http://biosbits.org
 
 This seems to be a fork of Grub. I suppose there's no plans to merge any 
 of this in Grub?
 

You need to contact Intel and ask them to submit code upstream.

Note that they support microcode loading on PC BIOS platform only and
Linux can do it on both PC BIOS and UEFI. What is wrong with loading
microcode after Linux is booted?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: custom Authentication module

2014-06-02 Thread Andrey Borzenkov
В Mon, 2 Jun 2014 16:08:10 +
Buckeyne, Thomas tbucke...@ballytech.com пишет:

 On the:
 
 
  Do I need to request a module to be included when I run 
  grub-mkstandalone / grub-mkimage
 
 Not sure I understand this question. Do you mean - module that you are going 
 to build?
 
 
 My custom module is being included; I thought perhaps I needed to include 
 some module (other than cipher) to get the ecc support
   But your other answers explain why it is not being included (it is not 
 because it is not in the module include list; but because it is deliberately 
 excluded)
 
 As information; I removed the exclusion of ecc.c and it compiled correctly 
 but it did not link
  = it seems to need some function is a misc.c ; I removed the exclusion 
 for misc.c 
   but it does not compile for a variety of reasons (the 
 util/import_gcry.py does not seem to filter it at all comes across 
 unchanged = therefor it does not compile)
 
 With the expanding usage of ECDSA for authentication do you know if there are 
 any plans to include the ecc module in grub build (if or when)?
 

Not really, but if you could clean up build and offer a patch, it would
be helpful.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: custom Authentication module

2014-06-01 Thread Andrey Borzenkov
В Fri, 23 May 2014 16:32:57 +
Buckeyne, Thomas tbucke...@ballytech.com пишет:

 I am creating for my company a custom Authentication module (required to meet 
 regulatory requirements)
 Generally it locates file(s) on an SSD; authenticates them 
 with ECDSA; determines if/where to boot from
 
 I have most of the module complete but I need to access the
 
 1)  gcry_pk_verify in grub-core/lib/libgcrypt/ciper/pubkey.c
 
 2)  fill_in_curve in grub-core/lib/libgcrypt/cipher/ecc.c
 
 However neither of these seem to be built when grub is compiled
 Nor have I been able to find an option to cause them to be built
 

Those files are explicitly excluded when importing libgcrypt. See
util/import_gcry.py. I do not know the reason.


 Am I missing / overlooking a configuration option

No, you will need to patch util/import_gcry.py; you may need to extend
it to fix any build problems with these files in grub environment.

 Is there a patch or setup required to have these built

Not that I'm aware of.

 Are these supported for x86 32-bit computers

That's probably more for libgcrypt community. I do not see why not.

 Do I need to request a module to be included when I run grub-mkstandalone / 
 grub-mkimage

Not sure I understand this question. Do you mean - module that you are
going to build?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Updating CPU microcode possible?

2014-06-01 Thread Andrey Borzenkov
В Sat, 31 May 2014 12:18:06 +0300
Nikos Chantziaras rea...@gmail.com пишет:

 (I've tried posting this before I subscribed, since 
 http://www.gnu.org/software/grub/grub-mailinglist.html says that 
 subscription to the list is not required to post a question. But that 
 failed. So I'm trying again, after having subscribed...)
 
 
 Hello.
 
 Is it possible to update the CPU's microcode (an Intel CPU, in this 
 case) with Grub? Meaning before the operating system starts.
 

Not that I'm aware of.

 I'm using Grub 2.02 beta 2 to boot three operating systems on my machine 
 (Gentoo, FreeBSD and Windows 8.1.) It would be nice if I could make Grub 
 do a microcode update before booting any of those operating systems. 
 Right now, I am only able to a microcode update in Linux, after the 
 kernel is booted.


Someone will need to write grub code to do it.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Possible to Embed GRUB Font File into Binary?

2014-06-01 Thread Andrey Borzenkov
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

В Tue, 27 May 2014 19:28:39 -0400
SevenBits sevenbitst...@gmail.com пишет:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 05/27/2014 03:48 PM, Jordan Uggla wrote:
  On Sun, May 25, 2014 at 9:29 AM, SevenBits
  sevenbitst...@gmail.com wrote:
  Okay, so I've tried this out and I am having difficulties. GRUB
  does not seem to be able to access any of the commands in the
  included modules. When I boot into GRUB, a bunch of errors
  scrolls past on the screen too quickly to read (though they
  appear to be about missing commands) and then I end up in the
  GRUB normal prompt.
  
  I've using the exact same configuration file that I'm using with 
  grub-mkimage, except it doesn't work this time. I recall seeing 
  something a while ago saying that modules are not automatically
  loaded when using grub-mkstandalone. If that's the case, then how
  would I activate them? When I get dropped into the prompt and
  type something like `insmod linux` it responds by saying that the
  module Linux was not found, even though I gave the command for it
  to be included.
  
  I've attached my grub.cfg file that I'm using. Perhaps someone
  could advise me as to what I'm doing wrong?
  
  From your grub.cfg: set prefix=''
  
  $prefix is the variable used by grub to find its modules, by
  setting it to the empty string you prevent grub from being able to
  find the modules.
 
 Oh, duh. Not sure how that got in there.
 
 I'm having some additional issues now. Essentially, when GRUB is
 loaded from a memdisk in this manner, the root is set to the memdisk.
 Which is fine, except for one problem. I need to be able to get the
 device that the EFI executable file is currently residing on, because
 I need to set up loopback for an ISO file located in the same
 directory as the GRUB EFI image. When I generated the image using
 grub-mkimage, the root was set to this device, so this was not a problem.
 
 This URL ( https://wiki.archlinux.org/index.php/Grub#GRUB_Standalone )
  suggests using a variable called ${cmdpath} to solve this.
 Unfortunately, the variable is not defined in my configuration.
 

Which grub version do you use? cmdpath is available post-2.00 (should
be in 2.02beta2).

 I cannot hard-code the path to use (i.e hd1,msdos0) because this
 portable GRUB copy is meant to be put onto a USB stick and booted on
 users' computers. Hard-coding the path would be ineffective because my
 users could for example have multiple hard drives, meaning that my
 hard-coded path might not point to the USB that I want and instead
 point to some other drive entirely, or a non-existent drive.
 
 This is where my limited knowledge of GRUB internals is coming into
 play. Is there some easy way to get the device that the image being
 run is contained on?
 

That's the reason for cmdpath - to export this information. Note that
patch itself is rather trivial and can easily be backported. It is
commit 1fe26ab4a0fc6ec961b661cc7fc9227db822c9be.

 Should I do the same for the linux command as well, e.g should
 
 linux ${var} quiet splash ... --
 
 become
 
 linux ${var} quiet splash ... --
 

No. This will result in both grub and kernel getting single argument
which is probably not what you expect.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlOLShQACgkQR6LMutpd94yqHQCeJ0BlGQKrB8yVSIUj5bx+9u2C
1lgAoL2l9teYcowDVV+qFfbpF9oI0AWW
=p6Rg
-END PGP SIGNATURE-
___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: drivemap and uefi

2014-05-10 Thread Andrey Borzenkov
On Sat, May 10, 2014 at 4:27 AM, Francisco Franchetti nix...@gmail.com wrote:
 Thanks for the clarification.

 I solved my problem so this is just in case you are curious. I am used to
 mbr and in that context it's important to start the windows installers as
 follows: the disk to which one will install windows, which will remain in
 the computer after the install is gone, has to be hd0; the installer is in
 another (usb) disk that must be interpreted as being at hd1; however, most
 bios will set the booting device to hd0, so using grub I usually flip the
 order with map; in a nutshell this allows for the computer to boot properly
 after one has installed windows; there are other workarounds equivalent to
 update-grub in windows with the boot.ini but what I described is my
 preferred way of doing it and I don't have for the future a great way to
 deal with the problem. Will the problem not exist under uefi/win8?


I can't say how Windows will react to moving drive to different
physical path, sorry. Never tried it and I do not have any UEFI based
systems where I can test it.

 What I did was, since the disk with the win files was not gpt, and I had no
 flash drive of the appropriate size, I created a gpt partition at the end of
 the destination disk, then booted grub from the ubuntu installer,
 chainloaded to the gpt partition with the files, and the installer started
 and worked fine. But the point of this second paragraph is: the only disk
 was the destination one. If I had a gpt partitioned usb disk, I am not sure
 if the installer would like it to be sitting there in the hd0 position while
 installing, pushing the destination disk to hd1 during installf, but later
 becoming hd0. I don't know enough about uefi/win8 to know; I'll experiment
 in the future with that. For now, I'm out of the woods.

 Anyway, the most important aspect of the email is to say thank you for
 clarifying that drivemap is an mbr specific command.




 On Fri, May 9, 2014 at 3:09 PM, Andrey Borzenkov arvidj...@gmail.com
 wrote:

 On Wed, May 7, 2014 at 9:36 PM, Francisco Franchetti nix...@gmail.com
 wrote:
  I am not sure if the absence of the drivemap command is due to uefi mode
  booting or if it is due to the version of grub 2 that I have:
  2.02beta2-9
  from ubuntu installer.
 
  Anyone knows why the drivemap command is unavailable? Is it because on a
  normal uefi system the notion is irrelevant?
 

 Yes. drivemap manipulates BIOS drive numbers via BIOS entry points.
 Neither exists in case of UEFI.

  I am interested in the knowledge and the drivemap command in itself, but
  the
  practical application is to boot a win 8 installer and have the hd0 be
  the
  computer installer, which is showing as hd1 because hd0 is taken by the
  usb
  installer.

 I'm not sure I understand the problem. Could you explain it in more
 details?

 
  Help-grub mailing list
  Help-grub@gnu.org
  https://lists.gnu.org/mailman/listinfo/help-grub
 



___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: drivemap and uefi

2014-05-09 Thread Andrey Borzenkov
On Wed, May 7, 2014 at 9:36 PM, Francisco Franchetti nix...@gmail.com wrote:
 I am not sure if the absence of the drivemap command is due to uefi mode
 booting or if it is due to the version of grub 2 that I have: 2.02beta2-9
 from ubuntu installer.

 Anyone knows why the drivemap command is unavailable? Is it because on a
 normal uefi system the notion is irrelevant?


Yes. drivemap manipulates BIOS drive numbers via BIOS entry points.
Neither exists in case of UEFI.

 I am interested in the knowledge and the drivemap command in itself, but the
 practical application is to boot a win 8 installer and have the hd0 be the
 computer installer, which is showing as hd1 because hd0 is taken by the usb
 installer.

I'm not sure I understand the problem. Could you explain it in more details?


 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Partition labels in GRUB2 menu?

2014-05-09 Thread Andrey Borzenkov
On Thu, May 8, 2014 at 4:08 PM, Richard Owlett rowl...@cloud85.net wrote:
 Jordan Uggla wrote:

 On Tue, Apr 29, 2014 at 6:42 AM, Richard Owlett rowl...@cloud85.net
 wrote:

 During Debian installs I use manual partitioning.
 I give the partition being created a meaningful label.
 I would like that label to appear in Grub's menu.
 How?

 E.G.
 I currently have 4 flavors of Debian Wheezy installed (different
 desktops).
 Currently the menu shows long effectively meaningless string followed by
 cryptic partition designator (sa6, sa7, sa8, or sa9). I would like the
 designator to be meaningful (i.e. GNOME, KDE, LXDE, or XFCE).

 TIA


 Modify GRUB_DISTRIBUTOR= in each installation's /etc/default/grub ,
 whatever string you give for GRUB_DISTRIBUTOR will be used in the menu
 entry titles.
 http://www.gnu.org/software/grub/manual/grub.html#Simple-configuration


 That doesn't accomplish my goal.
 I've reread .../manual/grub.html. I suspect GRUB2 cannot, perhaps by design,
 do what I want.

 I wish, that after adding/deleting an OS, update-grub

Let's not mess things up. update-grub is program provided by your
distribution. Any comments about this command should be addressed to
your distribution, not to upstream list.

 
 yield a grub.cfg of
 form:

 ### BEGIN /etc/grub.d/10_linux ###

No, /etc/grub.d/10_linux as shipped by upstream grub does not support
what you want. As I already said, you can either modify it or disable
and add your own script that does what you want.


 There are three implied restrictions:
   1. the first OS listed on menu shall be the OS on /dev/sda1

First you complain that grub menu includes meaningless partition
numbers and now you suddenly want grub menu to be dependent on
meaningless partition number.

   2. the OS on /dev/sda1 shall be the default

You can set default menu entry as GRUB_DEFAULT. What is missing here?

   3. all additional OS shall be in partition number order


Additional OS are provided by os-prober which is not part of grub.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB_GFXMODE= 60 refresh how?

2014-05-04 Thread Andrey Borzenkov
On Sat, May 3, 2014 at 12:18 PM, Felix Miata mrma...@earthlink.net wrote:
 On 2014-05-03 12:00 (GMT+0400) Andrey Borzenkov composed:

 Sat, 03 May 2014 01:22:19 -0400 Felix Miata composed:


 On 2014-05-03 07:51 (GMT+0400) Andrey Borzenkov composed:


  Fri, 02 May 2014 18:37:44 -0400 Felix Miata composed:


  Fedora 20
  # man grub
  No manual entry for grub
  # man grub2
  No manual entry for grub2


  Searching with Google for GRUB_GFXMODE= where how to designate
  appropriate refresh
  rate comes up empty, always with either just HxV or HxVxBits. How does
  one get
  Grub2's boot menu to produce the Grub Legacy equivalent of having
  video=1024x768@60
  on boot stanza cmdline?


  Does adding video=1024x768@60 to kernel command line in grub2 not work?


 It works, but what is GRUB_GFXMODE for if not to take the place either it
 and/or vga=791?


 No, grub2 does not support setting refresh rate.


 If neither GRUB_GFXPAYLOAD_LINUX nor GRUB_GFXMODE can provide a known
 *supported* video mode to suit the user, why do they even exist?


Please provide reference to handover protocol that allows passing
refresh rate information between bootloader and linux kernel.

 Any idea why there is no man page on Fedora [19,20,21] for Grub, Grub2, or
 grub.cfg?

 --
 The wise are known for their understanding, and pleasant
 words are persuasive. Proverbs 16:21 (New Living Translation)

  Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

 Felix Miata  ***  http://fm.no-ip.com/

 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB_GFXMODE= 60 refresh how?

2014-05-03 Thread Andrey Borzenkov
В Sat, 03 May 2014 01:22:19 -0400
Felix Miata mrma...@earthlink.net пишет:

 On 2014-05-03 07:51 (GMT+0400) Andrey Borzenkov composed:
 
  Fri, 02 May 2014 18:37:44 -0400 Felix Miata composed:
 
  Fedora 20
  # man grub
  No manual entry for grub
  # man grub2
  No manual entry for grub2
 
  Searching with Google for GRUB_GFXMODE= where how to designate appropriate 
  refresh
  rate comes up empty, always with either just HxV or HxVxBits. How does one 
  get
  Grub2's boot menu to produce the Grub Legacy equivalent of having 
  video=1024x768@60
  on boot stanza cmdline?
 
  Does adding video=1024x768@60 to kernel command line in grub2 not work?
 
 It works, but what is GRUB_GFXMODE for if not to take the place either it 
 and/or vga=791?

No, grub2 does not support setting refresh rate.


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: PC BIOS EDD problem

2014-05-03 Thread Andrey Borzenkov
В Sun, 4 May 2014 01:50:33 +0200
Alexey Orishko alexey.oris...@gmail.com пишет:

 Hi all,
 
 Some time ago BIOS Enhanced Disk Drive specification got a new
 revision where device path was changed from 8 to 16 bytes.
 
 I see that the latest grub code in git has support for the latest 
 specification:
 include/grub/i386/pc/biosdisk.h:
 ...
 grub_uint8_t device_path[16];
 
 Are old BIOS versions supported somehow or simply abandoned?

The only information from INT13 0x48 used by grub is device size. Do
you observe real problem or is it theoretical question?

 Do I need to revert commit b828fb5d9c7575700a64751efbddd738e2b7c239 of
 Vladimir Serbinenko to get old BIOS working?
 Is there any difference between 32 and 64 bit version of grub in handling 
 BIOS?
 

There is no 64 bit grub for BIOS platform.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB_GFXMODE= 60 refresh how?

2014-05-02 Thread Andrey Borzenkov
В Fri, 02 May 2014 18:37:44 -0400
Felix Miata mrma...@earthlink.net пишет:

 Fedora 20
 # man grub
 No manual entry for grub
 # man grub2
 No manual entry for grub2
 
 Searching with Google for GRUB_GFXMODE= where how to designate appropriate 
 refresh 
 rate comes up empty, always with either just HxV or HxVxBits. How does one 
 get 
 Grub2's boot menu to produce the Grub Legacy equivalent of having 
 video=1024x768@60 
 on boot stanza cmdline?

Does adding video=1024x768@60 to kernel command line in grub2 not work? 

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Partition labels in GRUB2 menu?

2014-04-29 Thread Andrey Borzenkov
В Tue, 29 Apr 2014 08:42:13 -0500
Richard Owlett rowl...@cloud85.net пишет:

 During Debian installs I use manual partitioning.
 I give the partition being created a meaningful label.
 I would like that label to appear in Grub's menu.
 How?
 
 E.G.
 I currently have 4 flavors of Debian Wheezy installed (different 
 desktops).
 Currently the menu shows long effectively meaningless string 
 followed by cryptic partition designator (sa6, sa7, sa8, or 
 sa9). I would like the designator to be meaningful (i.e. GNOME, 
 KDE, LXDE, or XFCE).
 

You can simply edit grub.cfg. If you want grub.cfg to be generated
automatically, you can modify files under /etc/grub.d and make them do
whatever you want.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Problem with USB keyboard + ehci.mod

2014-04-28 Thread Andrey Borzenkov
В Mon, 28 Apr 2014 17:25:57 +0200
Richard Foltyn richard.fol...@gmail.com пишет:

 Dear listers,
 
 I have a USB hub/switch (ATEN US224) to share a USB keyboard / mouse
 between two computers.
 
 On one of these computers, the keyboard in the grub2 menu works only
 if I pre-load ehci.mod (independent of whether legacy USB support is
 enabled in BIOS or not).
 
 However, as soon as I load ehci.mod, the partitions present on the
 hard drive are no longer seen by grub2's ls

Yes; loading ehci explicitly disables native (BIOS) disk driver.

and I can no longer boot
 into Windows (Linux still works since it resides on LVM).
 I.e., BEFORE loading ehci, ls on the grub2 command line shows something like
 (hd0) (hd0,msdos1) (hd0,msdos2)  + some LVM volumes
 
 AFTER I load ehci I see
 (usb0a) (usb0b) (usb0c) (usb0d) + some LVM volumes
 

some LVM volumes is actually minor cosmetic bug here, but I'm not
sure how difficult it is to track all references.

I'm afraid this does not have easy solution. As I understand, native
driver is disabled because driver tells BIOS to relinquish USB control
and we do not know what is controlled - it could as well be hard disk
or other mass storage and we lose access to it (or worse crash system
when accessing it).

What you could try - try loading ahci driver (better via nativedisk
command if your version supports it - it will also load ehci among
others). Thus you will hopefully get native access (not via BIOS) to
the same disk.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Problem with USB keyboard + ehci.mod

2014-04-28 Thread Andrey Borzenkov
В Mon, 28 Apr 2014 18:54:57 +0200
Richard Foltyn richard.fol...@gmail.com пишет:

 On Mon, Apr 28, 2014 at 5:59 PM, Andrey Borzenkov arvidj...@gmail.com wrote:
  What you could try - try loading ahci driver (better via nativedisk
  command if your version supports it - it will also load ehci among
  others). Thus you will hopefully get native access (not via BIOS) to
  the same disk.
 
 Thanks for the suggestion. Unfortunately, 'nativedisk' never returns
 control and the HDD LED is continuously lit (I reset the PC after ~
 5min). Loading 'ahci' by itself works, but then executing 'ls' has the
 same effect.
 

Could you show full lspci -nnv?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Problem with USB keyboard + ehci.mod

2014-04-28 Thread Andrey Borzenkov
В Mon, 28 Apr 2014 20:17:18 +0200
Richard Foltyn richard.fol...@gmail.com пишет:

 On Mon, Apr 28, 2014 at 7:17 PM, Andrey Borzenkov arvidj...@gmail.com wrote:
  Could you show full lspci -nnv?
 
 Here it comes:
 
 # lspci  -nnv
 
 00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD/ATI]
 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] [1002:4391] (prog-if 01
 [AHCI 1.0])
 
 00:14.1 IDE interface [0101]: Advanced Micro Devices, Inc. [AMD/ATI]
 SB7x0/SB8x0/SB9x0 IDE Controller [1002:439c] (prog-if 8a [Master SecP
 PriP])

And which one drives your disk? You may try pata in case it is
the latter.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Booting from LVM on top of LUKS

2014-04-25 Thread Andrey Borzenkov
On Fri, Apr 25, 2014 at 7:22 AM, Kwesadilo X kwesad...@gmail.com wrote:
 Hi,

 I have been trying to set up GRUB to boot Linux from an LVM logical volume
 on top of a LUKS device. This is my system root partition, including /boot.
 I've read various places that GRUB2 supports booting from LVM or LUKS
 volumes, but nothing that seemed too official or that mentioned both at the
 same time. Is this a supported configuration?

 My current status is that I can boot GRUB, GRUB will ask for my encryption
 key, and show the boot menu (from grub.cfg stored in /boot) after I give my
 key. At this point, I can see from the GRUB shell that GRUB has mounted my
 LVM/LUKS volume, and I can see my kernel and initramfs in /boot. I can give
 the initrd and linux commands seemingly without error. But when I give the
 boot command, the system just hangs. Any ideas?


You could try set debug=all in grub shell before doing boot. This
may reveal whether it hangs in grub or after grub passed control to
kernel.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Low-level documentation

2014-04-13 Thread Andrey Borzenkov
В Sun, 13 Apr 2014 20:02:12 +0200 (CEST)
Fredrik Tolf fred...@dolda2000.com пишет:

 On Sat, 12 Apr 2014, Andrey Borzenkov wrote:
  Grub 2, on the other hand, seems to try to go the user-friendly way,
  with `grub-install' wanting to do all the work for me. This is fine, I
  guess, so long as the circumstances aren't too strange for it to work.
 
 
  Could you describe your configuration where grub-install fails?
 
 I can't say I have any case readily handy, or in fresh memory, but it has 
 usually been in cases where I'm repairing a broken system. Things like, 
 you know, having only one leg of a broken 0.9-metadata md mirror mounted 
 raw, or moving a disk from a broken system to another system with the 
 intention of moving it back, or having the device order out-of-whack due 
 to bootable USB sticks being mounted, or using unusual filesystems or 
 device remapping layers, or the like. Sometimes when the system is broken, 
 I just don't want grub-install to go scanning devices.
 

grub-install does not scan devices.

I do not expect grub-install to fail in any of the above cases.

 More importantly, however, I'd just generally like to know what is going 
 on. It is not very seldom that I find myself doing unusual things, like 
 experimenting with the boot structure, or setting up systems in unusual 
 ways due to various restrictions, or repartition disks later on, moving 
 partitions around; and I'd like to be able to know and control just what 
 happens.
 
 For instance, as you write about grub-bios-setup:
 
  It tries to embed core.img into either post-MBR gap or reserved area on
  partition if filesystem is known to have one. It the worst case it
  gives you a rope to use file on filesystem directly. In all cases it
  installs boot block (MBR or PBR) which points to the installed
  core.img. That's all.
 
 To me, this raises such questions as:
 
   * How do I know whether and where it embeds core.img?

Based on device name you used when calling it.

   * How can I control the same?
   * How can I tell it which device to address?

You pass device name to grub-install.

   * The Texinfo manual tells me that boot.img merely loads the first sector
 of core.img. Does this mean that boot.img and core.img are both patched
 with their own sets of block lists and device numbers?

Boot block only knows first sector where core.img is located (may be a
couple more, do not remember). First part of core.img is disk loader
which reads the rest. So yes, in this sense they both are patched to
contain actual location.

   * What does the --allow-floppy option do, more precisely?

It modifies boot.img to accept floppy as boot device when it gets from
BIOS.

   * Maybe I'm just blind, but I still haven't found how core.img actually
 finds the configuration file once it boots.

In most general case - by executing small script embedded in core.img on
grub startup which searches for filesystem that contains configuration.
There is shortcut when grub-install knows that core.img is located on
the same physical disk - then it just records partition number.

   * Is there any more detailed information on exactly what the various
 choices for the --format option to grub-mkimage actually do?
 

Probably not in the form you expect it.

 If you're up for simply answering those questions, that's great. The thing 
 is that I never really needed to ask them with grub-legacy, however.

The only thing you need to know about grub2 is grub-install (or
probably grub-mknetdir). It figures out everything you need
automatically and hides all gory details from you. It is there exactly
to avoid need for every user to become grub and boot expert.

  Is 
 there no documentation available other than reading through the source 
 code?
 

Do you volunteer to write and maintain this documentation?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Low-level documentation

2014-04-12 Thread Andrey Borzenkov
В Sat, 12 Apr 2014 05:28:04 +0200 (CEST)
Fredrik Tolf fred...@dolda2000.com пишет:

 Dear list,
 
 Grub 1 is obviously long dead by now, but one thing I always liked about 
 it was how transparent much of its low-level workings was. It made it easy 
 to make it work on systems that were broken in strange ways or where I had 
 to work under weird circumstances.
 
 Grub 2, on the other hand, seems to try to go the user-friendly way, 
 with `grub-install' wanting to do all the work for me. This is fine, I 
 guess, so long as the circumstances aren't too strange for it to work.
 

Could you describe your configuration where grub-install fails?

 What bothers me particularly is the actual installation step itself. 
 Building a core image and all seems documented enough, but the 
 `grub-bios-setup' utility isn't even so much as mentioned in the Texinfo 
 manual, and even less so what it actually does, in detail. Is there any 
 available information on this anywhere?
 

grub-bios-setup mostly corresponds to install command of grub legacy.
It tries to embed core.img into either post-MBR gap or reserved area on
partition if filesystem is known to have one. It the worst case it
gives you a rope to use file on filesystem directly. In all cases it
installs boot block (MBR or PBR) which points to the installed
core.img. That's all. 

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: error: embedding is not possible, but this is required for RAID and LVM install.

2014-04-12 Thread Andrey Borzenkov
В Sat, 12 Apr 2014 12:55:10 +0200
bl0 bl0-...@playker.info пишет:

 On Thursday 10 April 2014 23:43:13 bl0 wrote:
  On Thursday 10 April 2014 20:02:08 Andrey Borzenkov wrote:
31467  biosdisk part_msdos lvm minix
  
   This still should fit into 62 sectors. What is full grub.core size in
   your case?
 
  Do you mean core.img file? Yes it's between 30.5...31 KiB so it should
  fit but grub-setup refuses to write it. I'll try to debug this later.
 
 grub-setup limits core size to 2 sectors less than the offset of the first 
 partition. One sector for the MBR and one sector at the end I don't know 
 why.
 
 your embedding area is unusually small may be displayed instead of
 the usual your core.img is unusually large if the first partition starts 
 at offset  64 sectors (rather than 63).
 

This is fixed in current master (or 2.02~beta2). It was indeed at some
point set incorrectly and went this way into 2.00.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: error: embedding is not possible, but this is required for RAID and LVM install.

2014-04-10 Thread Andrey Borzenkov
В Thu, 10 Apr 2014 19:07:25 +0200
bl0 bl0-...@playker.info пишет:


 Does this mean that grub2 will only support hard disks partitioned
 recently and will not support hard disks which have been in use for
 a longer time?
   
bor@opensuse:~ LC_ALL=C ll /boot/grub2/i386-pc/core.img
-rw-r--r-- 1 root root 26480 Jan 14 22:06
/boot/grub2/i386-pc/core.img
  
   Some info where the size comes from:
 
  I know. I was replying to will not support hard disks which have been
  in use for a longer time. You really cannot squeeze every conceivable
  feature into 32K.
 
 Not every conceivable feature, only these features already supported in past 
 versions of grub2 such as 1.97. This could be seen as a regression.


If you are really concerned you could bisect it to find out when size
became too large. This could be starting point.

But returning to your example

 $ /opt/grub2/bin/grub-mkimage -O i386-pc [module ...] | wc -c
 31467  biosdisk part_msdos lvm minix

This still should fit into 62 sectors. What is full grub.core size in
your case?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Booting from a bootable ISO

2014-04-06 Thread Andrey Borzenkov
В Sun, 6 Apr 2014 23:09:40 +0530
Rustom Mody rustompm...@gmail.com пишет:

 On Sun, Apr 6, 2014 at 10:34 PM, Andrey Borzenkov arvidj...@gmail.comwrote:
 
  В Sun, 6 Apr 2014 22:10:25 +0530
  Rustom Mody rustompm...@gmail.com пишет:
 
   Many people -- in particular hardware vendors -- are nowadays supplying
   bootable ISO's.
   You have to
   1. Download the ISO
   2. Burn a CD
   3. Boot with it
   4. Follow the instructions (to (re)flash the motherboard/CP/Disk etc)
  
   Ive already been able to boot ubuntu from an iso on disk
   Next Ive done it with making a grub-bootable usb and loop-mounting the
  iso
   from there
  
   So now to boot from a general (ie non linux) bootable ISO?
  
 
  I do not think it is possible in general case. For a start, program
  that would be started from ISO may need access to CD/DVD which is
  possible only if system firmware (BIOS/EFI) actually see device.
 
 
 Sorry
 Maybe I focused on the wrong aspect -- hardware flashing.
 
 So to correct that:
 1. I believe that Isolinux can do this

You need resident driver providing emulated CD driver. grub does not
include one. For BIOS systems the easiest way is to use memdisk (which
is part of syslinux project indeed) which can be booted by grub. See
http://www.syslinux.org/wiki/index.php/MEMDISK 

For other platforms supported by GRUB - does not know.

 2. These ISOs are (often) under the control of FreeDos
 
 So maybe I rephrase my question as:
 How to boot a Freedos based system from grub2?


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: error: embedding is not possible, but this is required for RAID and LVM install.

2014-04-04 Thread Andrey Borzenkov
В Wed, 2 Apr 2014 12:47:33 +0200
bl0 bl0-...@playker.info пишет:

 On Monday 31 March 2014 18:22:57 Andrey Borzenkov wrote:
  В Mon, 31 Mar 2014 17:32:20 +0200
 
  bl0 bl0-...@playker.info пишет:
   On Sunday 30 March 2014 19:04:55 Andrey Borzenkov wrote:
Well, modern systems tend to start first partition on 1M boundary.
  
   Does this mean that grub2 will only support hard disks partitioned
   recently and will not support hard disks which have been in use for a
   longer time?
 
  bor@opensuse:~ LC_ALL=C ll /boot/grub2/i386-pc/core.img
  -rw-r--r-- 1 root root 26480 Jan 14 22:06 /boot/grub2/i386-pc/core.img
 
 Some info where the size comes from:

I know. I was replying to will not support hard disks which have been
in use for a longer time. You really cannot squeeze every conceivable
feature into 32K.

 $ /opt/grub2/bin/grub-mkimage -O i386-pc [module ...] | wc -c
 31467  biosdisk part_msdos lvm minix
 29941  biosdisk part_msdos lvm

It actually takes even less than I expected (note that it also pulls
in diskfilter).

 23047  biosdisk part_msdos
 22214  biosdisk
 20165  (kernel only)
 (minix smaller than tar or cpio on v2.00 but still doesn't fit)
 

You may be interested in
http://marc.info/?l=grub-develm=139175222350026w=2

 My filesystems is mainly zfs on lvm, but grub can store its data on a 
 separate lvm volume in any simple format it wants. I can't easily create 
 more msdos partition table entries because of the stupid limit
 of 11 partitions in some linux (kernel) versions.
 

With LVM you need just 2 partitions at most. And with zfs directly,
without LVM, you have enough space to store bootloader (128K).

  Good. So you have solution for your problem.
 
 Yes. With this in place, I'm happy with grub2 overall.
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: error: embedding is not possible, but this is required for RAID and LVM install.

2014-03-31 Thread Andrey Borzenkov
В Mon, 31 Mar 2014 17:32:20 +0200
bl0 bl0-...@playker.info пишет:

 On Sunday 30 March 2014 19:04:55 Andrey Borzenkov wrote:
  В Sun, 30 Mar 2014 16:49:54 +0200
 
  bl0 bl0-...@playker.info пишет:
   Hello,
  
   I try to install grub2 v2.00 to my hard disk. It fails with these 
   messages:
warning: your embedding area is unusually small.  core.img won't fit
in it..
  
   My first partition starts at sector 63. Is this unusual?
 
  Well, modern systems tend to start first partition on 1M boundary.
 
 Does this mean that grub2 will only support hard disks partitioned recently
 and will not support hard disks which have been in use for a longer time?
 

bor@opensuse:~ LC_ALL=C ll /boot/grub2/i386-pc/core.img 
-rw-r--r-- 1 root root 26480 Jan 14 22:06 /boot/grub2/i386-pc/core.img

error: embedding is not possible, but this is required for RAID and
LVM install.
  
   So, embedding is required but not possible. From this, it's clear to me
   that it is not possible to use grub2 on my system configuration? Should
   I start looking for another bootloader?
 
  It depends on your disk configuration. If you provide more information,
  someone may have an idea how to use grub2 in your case.
 
 When I searched the web for this error message, most of the time the problem
 was solved by moving data around (sometimes large amounts of data) to
 accomodate grub. I expect software to accomodate the user for the user's
 convenience rather than have the user jump through hoops to accomodate the
 software for the developers convenience.
 
 From my perspective it's clear what to do. A bootloader which does not fit
 in the 31 KB embedding area needs to be loaded into memory by another
 bootloader which does fit in that area. My current setup is grub2 v2.00
 loaded using 'multiboot' from an lvm volume by another bootloader,
 grub2 v1.99, which does fit in the embedding area (with tar module instead
 of ext2).
 
 Using v1.99 alone is an option but it removes the ability to install future
 versions of grub with new features. I prefer to keep grub2 v1.99 for the
 sole purpose of loading a later version of grub. Really this is the only
 sure way I can see to use future versions of grub which will probably
 continue to grow bigger if fitting into 31 KB is no longer a design goal.
 

Good. So you have solution for your problem.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Booting iso's via grml-rescueboot gen'd GRUB2 config files

2014-03-31 Thread Andrey Borzenkov
В Mon, 31 Mar 2014 12:40:17 -0700 (PDT)
Firstname Lastname technoi...@yahoo.com пишет:

 
 Fundamentally, the 'iso_path' does not include the '(disk,part)' designation, 
 which has actually been assigned to 'root' [root='hd0,msdos7']; but is not 
 being used. So, give me some feedback. Why has the '(disk,part)' not been 
 included into the 'iso_path', and thus the 'loop' statement identifier?

Because if path name does not include device designation, value of
$root is implicitly used as device.

  Is the current value of 'iso_path' a robust enough source identifier,
 otherwise? (i.e. can they be found at boot time)? If so, then what
 else can be wrestled with to get this feature working with newly
 downloaded iso's, and Grub2 tools?
 
 Sláinte,
 
 odoncaoa


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Failed to boot Linux from USB stick

2014-03-13 Thread Andrey Borzenkov
В Thu, 13 Mar 2014 13:43:11 +0100
Alexey Orishko alexey.oris...@gmail.com пишет:

 Hi guys,
 
 I can't boot Linux on Intel Atom 32-bit from USB stick on one
 motherboard, but I can do it on another on the same type with
 different BIOS version. I've read BIOS release notes and found
 nothing relevant to the problem neither seen anything significantly
 different in BIOS menu.
 
 GRUB version 2.0
 
 grub.cfg:
 set default=0
 set timeout=3
 insmod ext2
 set root=(hd0,1)
 menuentry Default {
 linux /boot/vmlinuz-3.10.28
 root=UUID=d768c1f0-79c9-45c4-b604-8d0735a71242
 rootfstype=ext4 ro rootdelay=6
 initrd /boot/initrd.img-3.10.28
 }
 
 On the failed system grub is capable to show boot menu, but while
 selecting it, it fails with message:
 error: failure reading sector 0x57f650 from 'hd0'.
 
 if I drop to grub command prompt from boot menu (without initially
 selecting entry), and do some commands:
 grub ls
 (hd0) (hd0,msdos1)
 grub insmod ext2
 grub ls (hd0,1)/boot
 error: failure reading sector 0x802 from 'hd0'
 grub ls
  # now ls output is empty line
 grub date
 error: no such partition.
 grub
 
 - If I connect the same USB stick to the motherboard with old BIOS,
   it boots ok.
 - I can boot from SATA HDD with exactly the same root fs as USB stick
   (I've copied root partition with cpio and updated UUID value in grub
   and fstab).
 - I can boot from USB stick only if it has FAT32, for example MSDOS
   boot disk or Ubuntu install disk made by Universal-USB-Installer.exe.
 
 I wonder, what else do I need to check in order to get to the bottom
 of this problem? Any help would be appreciated.
 

Could you try current GIT master? I remember there were some USB
related patches.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Managing multi grub installs

2014-03-10 Thread Andrey Borzenkov
В Mon, 10 Mar 2014 08:40:53 +0530
Rustom Mody rustompm...@gmail.com пишет:

 Hi
 
 My earlier thread
 http://lists.gnu.org/archive/html/help-grub/2011-01/msg00017.html
 
 Thanks to help from Jordan Ugla there, in particular, the suggestion
 to use 'configfile',  things have been mostly working for the last 2-3
 years. Recently it stopped working so this mail. More details below.
 
 My blkid excerpts
 
 /dev/sda2: LABEL=Boot500G UUID=... TYPE=ext2
 /dev/sda5: LABEL=Debian500G UUID=... TYPE=ext4
 /dev/sda6: LABEL=Ubuntu500G UUID= TYPE=ext4
 /dev/sda7: LABEL=DebOld UUID=... TYPE=ext4
 
 In short I have multiple linuxes with their own /boots in sda5,6,7
 And a /boot standalone in sda2.
 The mbr points to sda2.
 sda2 is not mounted in any OS so it does not get meddled with on upgrades
 
 It contains entries written by hand like
 menuentry Debian  configfile chaining {
 search --set --label Debian500G
 configfile /boot/grub/grub.cfg
 }
 
 And this was working for about a year.
 
 IOW: the respective OSes would only upgrade their own boots under
 their respective filesystems.  They would not stomp on each others'
 toes and my handwritten boot would configfile-chain to them.
 

Why do not simply chainload each bootloader? I.e.

menuentry Debian bootloader {
  search --set --label Debian500G
  multiboot /boot/grub/i386-pc/core.img
}

(adjust platform and paths as needed). Or simply configure each OS to
install bootblock in respective partition and use

chainloader +1

The problem with configfile approach is, it is not clean environment.
You still get at least $prefix which refers to original grub2. Using
bootloader chaining will give you clean bootloader instance for each OS.

 Then (small nuisance!) after upgrading the debian started introducing a
 load_video function that would error out when chained with configfile.
 
 No issue: I'd just delete that line after an upgrade and things kept
 running smoothly.
 
 But after my most recent debian-testing upgrade it just stopped working:
 the second configfile just does not reach and the machine keeps rebooting.
 
 As a current hack Ive made a new entry that works
 menuentry Debian 500 handedited {
 linux (hd0,5)/boot/vmlinuz-3.12-1-686-pae root=LABEL=Debian500G ro
 initrd (hd0,5)/boot/initrd.img-3.12-1-686-pae
 }
 
 How do I keep configfile working??
 
 Thanks
 Rusi
 
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Questing on New Network Stack

2014-02-12 Thread Andrey Borzenkov
В Tue, 11 Feb 2014 17:24:44 -0500
Cheng Cheng ccheng@gmail.com пишет:

 Hi,
 
 As noticed, there is a big change for GRUB 2.00 in the network stack from 
 previous GRUB 1.99. I upgraded to GRUB 2.00 today, however, the PXE booting 
 stops working.
 
 I use following command to generate a PXE bootable image:
 grub-mkimage --format=i386-pc-pxe --output=grub.pxe  
 --prefix=‘(tftp)/boot/grub’ pxe tftp normal
 
 After I boot into GRUB console, I have to manually trigger network 
 configuration by “net_bootp”. I then can use “net_ls_addr” to verify my 
 network configuration succeeds.
 
 However, GRUB console still cannot communicate to TFTP server to fetch 
 additional modules. For example, I tried:
 insmod (tftp, XXX.XXX.XXX.XXX)/boot/grub/halt.mod
 But returned “error: File not found”. For GRUB 1.99, I can do the same thing 
 by:
 insmod (pxe:XXX.XXX.XXX.XXX)/boot/grub/halt.mod
 
 Can anyone share some hints on how to use the new network stack? I also 
 interests in trying HTTP protocol.
 

Please try grub-mknetdir to create grub image and directory structure
suitable for netboot. Does it work?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: grub2 mdraid

2014-02-10 Thread Andrey Borzenkov
On Mon, Feb 10, 2014 at 12:33 PM, Oleg lego12...@yandex.ru wrote:
   Hi, all.

 I have the problem with an installing grub on a mdraid device.

 I install a new system with a help of my bootable usb flash. I have x86 system
 on the usb flash and want to install a x86_64 system on a hdd. My steps:

 1. Boot from the usb flash (/dev/sda);
 1.1. Create a raid device on partitions (prepared with fdisk) with:

  mdadm -C /dev/md0 -l1 -n2 --bitmap=internal /dev/sdb1 /dev/sdc1
 1.2. Make a raid partition and a fs on it:

  fdisk /dev/md0
  mkfs.ext4 /dev/md0p1
 1.3. Install a system:

  mount /dev/md0p1 /mnt
  debootstrap --arch=amd64 --foreign --include=grub2,mdadm wheezy /mnt 
 http://ftp.debian.org/debian
 1.4. Install grub:

  grub --modules=part_msdos raid mdraid1x --root-directory=/mnt /dev/sdb
  grub --modules=part_msdos raid mdraid1x --root-directory=/mnt /dev/sdc


Upstream does not have this command, you need to ask your
distribution. Also in general grub2 is intelligent enough to figure
out what modules it needs; you need to have very good reasons and
understanding of grub internals to manually specify them.

Try using

grub-install --boot-directory=/mnt/boot /dev/sdb
grub-install --boot-directory=/mnt/boot /dev/sdc

if it does not work, full output of

grub-install --debug --boot-directory /mnt/boot /dev/sdb

would be interesting.

 2. Boot from hdd and get:

error: no such disk.
Entering rescue mode...
grub rescue

 2.1. I do insmod part_msdos, raid, mdraid1x. But when i do insmod normal i 
 get:

  error: no such disk.

 Now as a workaround i install a system (x86_64) to a different single disk and
 booted from it i install a system (x86_64) on a mdraid and do grub-install 
 from
 a chroot. And this is work. But this is a strange method.

 Can anyone point me to the right section of the
 http://www.gnu.org/software/grub/manual/html_node/index.html
 to resolve my problem?

 Thanks.

 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: grub2 mdraid

2014-02-10 Thread Andrey Borzenkov
On Mon, Feb 10, 2014 at 1:59 PM, Oleg lego12...@yandex.ru wrote:
 On Mon, Feb 10, 2014 at 12:50:25PM +0400, Andrey Borzenkov wrote:
 
   grub --modules=part_msdos raid mdraid1x --root-directory=/mnt 
  /dev/sdb
   grub --modules=part_msdos raid mdraid1x --root-directory=/mnt 
  /dev/sdc
 

 Upstream does not have this command, you need to ask your
 distribution. Also in general grub2 is intelligent enough to figure

   Sorry, this is a typo - must be grub-install instead of grub.

 out what modules it needs; you need to have very good reasons and
 understanding of grub internals to manually specify them.

 Try using

 grub-install --boot-directory=/mnt/boot /dev/sdb
 grub-install --boot-directory=/mnt/boot /dev/sdc

 This commands complains:

 touch: cannot touch '/boot/grub/grub2-installed': Read-only file system
 Installation finished. No error reported.


This is either downstream patch or command is wrapper around real
grub-install. In upstream grub-install never attempts to touch this
file.

 But now the system is booting ok. I test:

 grub-install --root-directory=/mnt /dev/sdb

 and the system boot again.

 Ugh... Now i can't understand anything. Early i tried various versions of 
 grub2
 and various command options and now i confuse myself.

 What is the difference between --boot-directory and --root-directory in my 
 case?


--root-directory is deprecated in current upstream, but that's
basically all. There should be no differences if using upstream
sources. As for your specific case, I do not know :)

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB2 Booting from ISO on LVM

2014-01-28 Thread Andrey Borzenkov
On Tue, Jan 28, 2014 at 2:55 PM, Jorge Fábregas
jorge.fabre...@gmail.com wrote:
 Hi everyone,

 Fedora 20 here.  I'm using GRUB2 to boot an ISO stored on one of my
 ext4 partitions. This works perfectly fine.  However, I can't make it work
 from an ext4 over LVM.  GRUB2 boots the ISO but something is wrong
 with the findiso kernel parameter.  When the CD boots I get a bunch of:

 modprobe: module LVM2_member not found in modules.dep
 modprobe: module swap not found in modules.dep


This has nothing to do with grub. Your initrd must expect and support
access to LVM. It should include necesssary kernel modules, LVM user
space components as well as scripts to activate LVs.

You need to ask on Fedora list whether they support it and if yes, how
to activate this feature.

 Here's my configuration:

 http://fpaste.org/71588/

 The first menuentry is the one that works followed by the LVM one where
 I even tried findiso=$isofile but didn't work.

 Any help will be appreciated.

 Thanks,
 Jorge

 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: pxechainloader problems

2014-01-23 Thread Andrey Borzenkov
On Thu, Jan 23, 2014 at 11:18 PM, Deepak Chawla dcha...@gmail.com wrote:
 Hi,

 In my current setup, I have a diskless client that PXE boots a grub2 image
 and then offers choices to load different ISOs. This setup is working great.

 I now have a need for grub to PXE boot another (custom) PXE loader and it
 looks like the pxechainloader command would do just that. Unfortunately, as
 soon as I try to PXE boot the next image (I've tried both the custom PXE
 loader and the pxegrub image as well), the system resets. The pxechainloader
 in the stock grub-2.00 refused to even load the images. The pxe grub I built
 from the git repo is able to load the image, but not switch to it. Here's

What exactly does it mean? Any error message, what happens at all?

 the menuentry I have for reloading pxegrub.

 menuentry reload pxegrub {
 set kern=/boot/grub/pxegrub.0
 echo -n Loading ${root}$kern: 
 pxechainloader $kern
 boot
 }

 I did an extensive google search on pxechainloader and the closest info I
 found on this was from a 3+ year old email trail
 (http://lists.gnu.org/archive/html/grub-devel/2010-09/msg00049.html).

 Am I missing something? Any suggestions on how to proceed with this?


You should report it on grub-devel and/or file GRUB bug (see on
Savannah project page link to bugs). It is good time as new release is
not far of and it is better fixed before it.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Booting from NVMe controller enters GRUB rescue

2014-01-22 Thread Andrey Borzenkov
On Wed, Jan 22, 2014 at 4:18 PM, vinayak holikatti
vinholika...@gmail.com wrote:
 On Tue, Jan 21, 2014 at 1:50 PM, Andrey Borzenkov arvidj...@gmail.com wrote:
 On Tue, Jan 21, 2014 at 12:14 PM, vinayak holikatti
 vinholika...@gmail.com wrote:
 On Mon, Jan 13, 2014 at 11:51 PM, Jordan Uggla jordan.ug...@gmail.com 
 wrote:
 On Thu, Jan 9, 2014 at 10:53 PM, vinayak holikatti
 vinholika...@gmail.com wrote:
 Hi All,

 We have developed Legacy OptionROM for NVMe controller device. We are
 able to boot to all Windows 7 and later OS. But we are facing issue in
 booting Fedora 20 x86_64 OS. Fedora 20 gets installed successfully on
 NVMe device. While booting from NVMe device we are observing error as
 follows and enters grub rescue. We are clueless about what is
 happening here. We would like to know how to over come this issue and
 boot to Fedora 20 OS from our controller.

 error : no such device: 44d1bf09-4e8a-4f46-aea6-09e364abf5cb.
  Entering rescue mode...
  grub_rescue

 Please run ls at the rescue prompt and post the output.

 The ls command at grub_rescue shows as below

 grub_rescuels
 (hd0)

 And set command output as below

 grub_rescueset
 prefix = (hd0)/grub2
 root = hd0

 I think the information of prefix and root are wrongly set. It should be

 prefix = (hd0,1)/grub2
 root = (hd0,2)

 /boot partition corresponds to /dev/nvme0n1p1
 / paration corresponds to /dev/nvme0n1p2


 Which grub version do you use? Could you test current GIT master? If
 it still puts prefix wrong, please
 show output of grub-install --verbose /dev/path-to-boot-block
 (/dev/nvme0n1 or /dev/nvme0n1p1 or wherever).


 We are using grub2. Do you want us to install grub and not grub2?

grub2 is name which is used by some distributions to allow concurrent
install of grub legacy and current grub. Upstream has only grub and
grub legacy.

 As grub2-install doesn't have verbose option.


Sorry, it is --debug option, not --verbose.

 We will try latest grub from git repo. Should we try grub or grub2?


There is only grub.

 I would not be surprised if grub is confused by non-standard disk
 naming, but there were many changes recently so it may be fixed
 already.



 --
 Regards,
 Vinayak Holikatti

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Booting from NVMe controller enters GRUB rescue

2014-01-21 Thread Andrey Borzenkov
On Tue, Jan 21, 2014 at 12:14 PM, vinayak holikatti
vinholika...@gmail.com wrote:
 On Mon, Jan 13, 2014 at 11:51 PM, Jordan Uggla jordan.ug...@gmail.com wrote:
 On Thu, Jan 9, 2014 at 10:53 PM, vinayak holikatti
 vinholika...@gmail.com wrote:
 Hi All,

 We have developed Legacy OptionROM for NVMe controller device. We are
 able to boot to all Windows 7 and later OS. But we are facing issue in
 booting Fedora 20 x86_64 OS. Fedora 20 gets installed successfully on
 NVMe device. While booting from NVMe device we are observing error as
 follows and enters grub rescue. We are clueless about what is
 happening here. We would like to know how to over come this issue and
 boot to Fedora 20 OS from our controller.

 error : no such device: 44d1bf09-4e8a-4f46-aea6-09e364abf5cb.
  Entering rescue mode...
  grub_rescue

 Please run ls at the rescue prompt and post the output.

 The ls command at grub_rescue shows as below

 grub_rescuels
 (hd0)

 And set command output as below

 grub_rescueset
 prefix = (hd0)/grub2
 root = hd0

 I think the information of prefix and root are wrongly set. It should be

 prefix = (hd0,1)/grub2
 root = (hd0,2)

 /boot partition corresponds to /dev/nvme0n1p1
 / paration corresponds to /dev/nvme0n1p2


Which grub version do you use? Could you test current GIT master? If
it still puts prefix wrong, please
show output of grub-install --verbose /dev/path-to-boot-block
(/dev/nvme0n1 or /dev/nvme0n1p1 or wherever).

I would not be surprised if grub is confused by non-standard disk
naming, but there were many changes recently so it may be fixed
already.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: alloc magic is broken at... error

2014-01-20 Thread Andrey Borzenkov
В Mon, 20 Jan 2014 09:59:40 -0500
SevenBits sevenbitst...@gmail.com пишет:

 On Jan 19, 2014, at 9:23 PM, Andrey Borzenkov arvidj...@gmail.com wrote:
 
  В Sun, 19 Jan 2014 19:45:23 -0500
  SevenBits sevenbitst...@gmail.com пишет:
  
  Not sure whether to post this in this bug-grub list or here, so feel free 
  to correct me if perhaps this is in the wrong spot. I’m not sure if the 
  issue I’m having is due to a fault in setup or a bug within GRUB.
  
  I’m the developer of a tool called Mac Linux USB Loader, and some of my 
  users are reporting errors with my compiled copy of GRUB. Specifically, 
  after loading the kernel, GRUB spits out the following error message:
  
  alloc magic is broken at 0x81493ca0: 207d007d68746170
  Aborted. Press any key to exit.
  
  The hexadecimal values vary slightly, but generally speaking this is what 
  the error looks like. The kernel loading operation with GRUB’s linux 
  command is followed by the initrd command to load the RAM disc, and that 
  operation never occurs, so I know that the operation never completes.
  
  This error never seems to occur with Ubuntu-based distributions. It also 
  seems to occur if the kernel can’t be found - but in that case, shouldn’t 
  the linux command fail with an error instead of something like this?
  
  I can’t post my GRUB config at the moment, as I’m not on the machine where 
  it is stored, but any advice that you can give me without it would be 
  appreciated, such as under what conditions this error occurs.
  
  Thanks,
  
  — SevenBits
  
  Well, the first thing to try would be upstream HEAD to verify whether
  problem is still present there.
 
 Sorry, just realized my previous reply didn’t get posted.
 
 The GRUB build I’m using is compiled straight from the current git 
 repository. It might be a week or two old, but unless something really 
 changed in the last two to three weeks I don’t think it’ll differ.
 

In this case you need to post to gurb-devel. Is there any way to get
output to serial console?

 I can try an older release of GRUB, like the latest stable and see if that 
 does anything though.



signature.asc
Description: PGP signature
___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: alloc magic is broken at... error

2014-01-20 Thread Andrey Borzenkov
В Mon, 20 Jan 2014 10:30:33 -0500
SevenBits sevenbitst...@gmail.com пишет:

 On Jan 20, 2014, at 10:27 AM, Andrey Borzenkov arvidj...@gmail.com wrote:
 
  В Mon, 20 Jan 2014 09:59:40 -0500
  SevenBits sevenbitst...@gmail.com пишет:
  
  On Jan 19, 2014, at 9:23 PM, Andrey Borzenkov arvidj...@gmail.com wrote:
  
  В Sun, 19 Jan 2014 19:45:23 -0500
  SevenBits sevenbitst...@gmail.com пишет:
  
  Not sure whether to post this in this bug-grub list or here, so feel 
  free to correct me if perhaps this is in the wrong spot. I’m not sure if 
  the issue I’m having is due to a fault in setup or a bug within GRUB.
  
  I’m the developer of a tool called Mac Linux USB Loader, and some of my 
  users are reporting errors with my compiled copy of GRUB. Specifically, 
  after loading the kernel, GRUB spits out the following error message:
  
  alloc magic is broken at 0x81493ca0: 207d007d68746170
  Aborted. Press any key to exit.
  
  The hexadecimal values vary slightly, but generally speaking this is 
  what the error looks like. The kernel loading operation with GRUB’s 
  linux command is followed by the initrd command to load the RAM disc, 
  and that operation never occurs, so I know that the operation never 
  completes.
  
  This error never seems to occur with Ubuntu-based distributions. It also 
  seems to occur if the kernel can’t be found - but in that case, 
  shouldn’t the linux command fail with an error instead of something like 
  this?
  
  I can’t post my GRUB config at the moment, as I’m not on the machine 
  where it is stored, but any advice that you can give me without it would 
  be appreciated, such as under what conditions this error occurs.
  
  Thanks,
  
  — SevenBits
  
  Well, the first thing to try would be upstream HEAD to verify whether
  problem is still present there.
  
  Sorry, just realized my previous reply didn’t get posted.
  
  The GRUB build I’m using is compiled straight from the current git 
  repository. It might be a week or two old, but unless something really 
  changed in the last two to three weeks I don’t think it’ll differ.
  
  
  In this case you need to post to gurb-devel. Is there any way to get
  output to serial console?
 
 No, I don’t think so, unless there’s some GRUB trick that I don’t know about. 
 Once this happens GRUB crashes to a stop and I can’t do anything.
 

You could change to serial console before running this command and
enable debugging.

  
  I can try an older release of GRUB, like the latest stable and see if that 
  does anything though.
 



signature.asc
Description: PGP signature
___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: alloc magic is broken at... error

2014-01-19 Thread Andrey Borzenkov
В Sun, 19 Jan 2014 19:45:23 -0500
SevenBits sevenbitst...@gmail.com пишет:

 Not sure whether to post this in this bug-grub list or here, so feel free to 
 correct me if perhaps this is in the wrong spot. I’m not sure if the issue 
 I’m having is due to a fault in setup or a bug within GRUB.
 
 I’m the developer of a tool called Mac Linux USB Loader, and some of my users 
 are reporting errors with my compiled copy of GRUB. Specifically, after 
 loading the kernel, GRUB spits out the following error message:
 
 alloc magic is broken at 0x81493ca0: 207d007d68746170
 Aborted. Press any key to exit.
 
 The hexadecimal values vary slightly, but generally speaking this is what the 
 error looks like. The kernel loading operation with GRUB’s linux command is 
 followed by the initrd command to load the RAM disc, and that operation never 
 occurs, so I know that the operation never completes.
 
 This error never seems to occur with Ubuntu-based distributions. It also 
 seems to occur if the kernel can’t be found - but in that case, shouldn’t the 
 linux command fail with an error instead of something like this?
 
 I can’t post my GRUB config at the moment, as I’m not on the machine where it 
 is stored, but any advice that you can give me without it would be 
 appreciated, such as under what conditions this error occurs.
 
 Thanks,
 
 — SevenBits

Well, the first thing to try would be upstream HEAD to verify whether
problem is still present there.


signature.asc
Description: PGP signature
___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: cmdline options getting \x20?

2014-01-17 Thread Andrey Borzenkov
В Fri, 17 Jan 2014 10:06:06 +1000
Michael D. Setzer II mi...@kuentos.guam.net пишет:

 I have a project that can pass run time options via the /proc/cmdline, and it 
 has worked fine with syslinux, grub4dos, and grub for a long time, but just 
 run into an issue with a new install of Fedora 20? 
 
 The spaces in the option are being replaced with \x20 with the grub of 
 Fedora 20?

As far as I can tell, upstream grub does not do it. You probably should
ask on Fedora list.

Same option of previous fedoras hadn't noticed this, though most 
 systems where version 17, so it could have also been with 18 or 19?
 
 Was able to resolve it by having my project use sed to replace \x20 in the 
 command line with spaces, but wondering when this change occurred with 
 grub2, since none of the other boot loaders seem to do this.
 
 Found a mention of this in fedora 18 bugzilla, but the message was 
 commented with EOL for 18, so there was no resolution of the issue?
 
 
 +--+
   Michael D. Setzer II -  Computer Science Instructor  
   Guam Community College  Computer Center  
   mailto:mi...@kuentos.guam.net
   mailto:msetze...@gmail.com
   http://www.guam.net/home/mikes
   Guam - Where America's Day Begins
   G4L Disk Imaging Project maintainer 
   http://sourceforge.net/projects/g4l/
 +--+
 
 http://setiathome.berkeley.edu (Original)
 Number of Seti Units Returned:  19,471
 Processing time:  32 years, 290 days, 12 hours, 58 minutes
 (Total Hours: 287,489)
 
 BOINC@HOME CREDITS
 ROSETTA 10045530.779504   |   SETI17491770.047084
 ABC 16613838.513356   |   EINSTEIN15323134.109852
 
 
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: wrong hdX designation in grub.cfg

2014-01-12 Thread Andrey Borzenkov
В Sun, 12 Jan 2014 15:59:46 -0700
Chris Murphy li...@colorremedies.com пишет:

 A normally working grub.cfg contains this entry:
 
 search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 
 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  
 d7bc9d0e-7706-44f9-b1a7-ff24b7c360a7
 
 hd0,gpt4 seems to be wrong.

It is just a hint anyway.

  At a grub prompt, there is one hd0 entry, and multiple hd1,gptY
  entries. These correspond to the partitionless Firewire drive, and the
  internal drive respectively. It seems like the firmware presents the
  Firewire drive to grub first and therefore is hd0 in grub. But once
  booted to linux, the internal drive ends up being treated as hd0 by
  grub-mkconfig.
 
 Firmware bug? Or grub bug?
 

Neither. Nobody ever said firmware would enumerate devices in the same
order as kernel. This is exactly why grub2 stopped relying on it and is
using search instead.

Is it BIOS or UEFI system?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: wrong hdX designation in grub.cfg

2014-01-12 Thread Andrey Borzenkov
On Mon, Jan 13, 2014 at 7:13 AM, Chris Murphy li...@colorremedies.com wrote:

 On Jan 12, 2014, at 7:19 PM, Andrey Borzenkov arvidj...@gmail.com wrote:

 В Sun, 12 Jan 2014 15:59:46 -0700
 Chris Murphy li...@colorremedies.com пишет:

 A normally working grub.cfg contains this entry:

search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 
 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  
 d7bc9d0e-7706-44f9-b1a7-ff24b7c360a7

 hd0,gpt4 seems to be wrong.

 It is just a hint anyway.

 At a grub prompt, there is one hd0 entry, and multiple hd1,gptY
 entries. These correspond to the partitionless Firewire drive, and the
 internal drive respectively. It seems like the firmware presents the
 Firewire drive to grub first and therefore is hd0 in grub. But once
 booted to linux, the internal drive ends up being treated as hd0 by
 grub-mkconfig.

 Firmware bug? Or grub bug?


 Neither. Nobody ever said firmware would enumerate devices in the same
 order as kernel. This is exactly why grub2 stopped relying on it and is
 using search instead.

 Fair enough. Is the most important reference the fs UUID?

Yes

 Would that alone work,

Yes

 or do the hints make finding it by UUID faster?

Yes (as long as hints were guessed correctly of course). If you know
boot time device order and are sure it is reliable, you can always
force this particular order in device.map. This is basically the only
thing this file is good for today.



 Is it BIOS or UEFI system?

 Technically neither, it's a Mac. So it's in some Apple zombie land between 
 Intel EFI and UEFI.

 Chris Murphy


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Multiboot mixed width O/Ss

2014-01-05 Thread Andrey Borzenkov
В Сб, 04/01/2014 в 22:25 -0600, coifed48...@mypacks.net пишет:
 GRUB Gurus,
 I realize the answer to my question ultimately may be determined by
 the Intel and AMD architectures. Is it possible to boot alternately to
 a 32bit OS and a 64bit OS with GRUB 2 and a 64 bit processor? 
 

Yes, it should be possible.

 http://en.wikipedia.org/wiki/GNU_GRUB mostly refers to Grub legacy and
 http://www.gnu.org/software/grub/grub-faq.html states  
 The current release is working on Intel/AMD PCs, OpenFirmware-based
 PowerPC machines (PowerMac and Pegasos), EFI-based PC (IntelMac) and
 coreboot (formerly, LinuxBIOS), and is being ported to UltraSparc.
 without reference to processor width. 
 
 I also checked https://help.ubuntu.com/community/Grub2; but found no
 reference to CPU width.  
 
 Thanks,
 R
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub




___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Progress indicator on loading images

2014-01-01 Thread Andrey Borzenkov
В Чт, 02/01/2014 в 04:09 +0100, Bertho Stultiens пишет:
 Hi,
 
 The old grub (v1) displayed a set of dots while loading kernel and
 initrd files from disk. However, it seems that it is impossible to get
 this behavior enabled in grub2.
 
 I am booting on an old machine from usb (v1.1) and it takes ages to get
 the 20MB loaded. An indication of activity and where it is in the
 process would be nice.
 
 Is there a way to configure a progress-bar or the old dots while the
 kernel and initrd are being loaded from disk in grub2?
 
 BTW, this is on a machine with xubuntu 12.04 lts.
 

Current grub2 (2.02 beta2 at the moment) includes progress module that
is supposed to display current percentage and estimated speed. Somehow
it does not for me, but may be it just loads too fast. You could try to
build it (may be it is packaged already). You will need to do insmod
progress before loading files.


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB2 plain dm-crypt support

2013-12-15 Thread Andrey Borzenkov
On Sun, Dec 15, 2013 at 7:54 PM, joe fresh dzrdm...@gmx.com wrote:
 Hi, thanks for the quick response.

 Unfortunately, I didn't find anything related to plain dm-crypt searching
 through the recent grub-devel archives.

OK it was not on the list but on GIT branch :p

http://git.savannah.gnu.org/cgit/grub.git/log/?h=peter/devmapper

Disclaimer - did not try it myself and no idea in which state it is.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Why the --skip-fs-probe option does not prevent file system check during installation?

2013-11-20 Thread Andrey Borzenkov
On Wed, Nov 20, 2013 at 12:09 PM, Wang Weber mail.weber.w...@gmail.com wrote:
 Hi,

 I failed to install grub-1.99

grub 1.99 is very old. Please use at least 2.00 or preferably recent
development snapshot.

 on a hard disk and I found the reason is
 because GRUB thought that there was a ext2 filesystem installed on that disk
 due to garbage data. The error messages are listed below.

 # grub-setup --directory=/mnt/root/mnt2/boot/grub /dev/sdc
 grub-setup: warn: Attempting to install GRUB to a disk with multiple
 partition labels or both partition label and filesystem.  This is not
 supported yet..
 grub-setup: warn: Embedding is not possible.  GRUB can only be installed in
 this setup by using blocklists.  However, blocklists are UNRELIABLE and
 their use is discouraged..
 grub-setup: error: will not proceed with blocklists.

 I also tried the following command and used gdb to confirm this.

 bash-3.00# grub-probe -t fs -d /dev/sdc
 ext2

 Then I checked the grub-setup help doc and saw that there is a
 --skip-fs-probe option. The description for this option is below.

   -s, --skip-fs-probeDo not probe for filesystems in DEVICE

 I tried this option but it still promoted the same error messages. Finally I
 checked the source code, it seems that this operation is not doing what I am
 expecting. It does not prevent GRUB from detecting the filesystem and GRUB
 refuses to do installation if some garbage data was found.

 Is this behavior correct? What's the workaround if I want GRUB to do the
 installation without checking the existence of filesystem?

 Thanks,
 Weber

 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: When will the OS_PROBER be fixed

2013-11-15 Thread Andrey Borzenkov
В Fri, 15 Nov 2013 15:03:15 +
Dan Priest d...@wessexcomputers.com пишет:

 
 Hi just a quick one,
 
 I was wondering when GRUB's os_prober function will be fixed as when I 
 install any linux distro with GRUB, it will boot windows 8 properly on a 
 computer with UEFI Secure Boot with GPT partitioning, this includes Fedora 
 and Ubuntu. The only way to get it to work is by running boot-repair which 
 you have to disable secure boot for it to work and then this causes the 
 shimx64.efi to stop loading. This is a real big problem at the moment for the 
 Linux community as everyone is confusing the issue to be with secure boot 
 when in actual fact it is GRUB's configuration that seems to be at fault. 
 Please correct me if I am wrong.

Currenty grub does not offer native implementation for EFI secure
boot. Both distros you mention should carry out-of-tree patches that
enable it. If it does not work, please report it to your distribution.

It definitely should work in openSUSE 12.3 and above, EFI
implementation quirks withstanding.

 
 Would just like to know if this is a problem you know about and if so do you 
 know how long it will be before it is fixed???
 
 Regards Dan Priest
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD

2013-11-14 Thread Andrey Borzenkov
В Thu, 14 Nov 2013 19:53:10 +0100
Jacek Konieczny jaj...@jajcus.net пишет:

 On Thu, 14 Nov 2013 22:07:25 +0400
 Andrey Borzenkov arvidj...@gmail.com wrote:
  В Tue, 12 Nov 2013 17:19:11 +0100
  Jacek Konieczny jaj...@jajcus.net пишет:
  
 FS2: Alias(s):CD20e0a1b:;BLK8:
 
   PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x4,0x0,0x0)/CDROM(0x1)/HD(1,MBR,0x,0x1,0x855A1)
  
   FS2 is the contents of a partition of the El-Torito image on the CD.
   
  
  Yes, grub explicitly skips over such paths.
 
 Any good reason for such behaviour?
 

It was before my time :) One reason I could think of is to avoid
ghost hard disks appearing in grub.


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD

2013-11-12 Thread Andrey Borzenkov
On Tue, Nov 12, 2013 at 11:50 AM, Jacek Konieczny jaj...@jajcus.net wrote:
 Could you give example how your image is seen in EFI shell?

 What EFI shell command should I use for that?


Using map would be a good start. You may use map -b to paginate.
Could you dump it to a file (use e.g. USB stick for it) and attach?

Assuming that fs2: refers to writable partition

fs2:
map -v  map.out


 It is not forbidden in any way; it is just that such CD will not be
 directly bootable by EFI.

 The strange thing is – my previous 'prototype', with EFI shell and
 ELILO, was bootable. And GRUB loads too, it just cannot see the other
 files on the image.


Could you please describe step by step how you build your CD? Exact
command line(s) would be helpful.


 Would [grub] see the files on ESP when it was a proper EFI El-Torito image,
 as defined by the specs (unpartitioned, no emul)? If not, would it still
 be possible to chainload any other EFI application from this image?


Not without special arrangements. grub-mkrescue is using xorriso which
builds hybrid ISO image containing extra partition table(s) which
results in GRUB being able to access El-Torito boot image as normal
HDD partition.


 I wanted to be able to chain-load other EFI applications (like the EFI
 shell) from the GRUB, so I wanted files to be available via the EFI
 services – putting the files on the 'ESP' FAT file system made them
 available to any EFI application. I could not use the 'standard CD' this
 way, as EFI cannot read ISO9660 file system directly.


Makes sense. Hmm ... it sounds like extending grub-mkrescue to allow
adding arbitrary content to ESP will be the most easy solution in your
case.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB doesn't recognize partitions on El-Torito image during EFI boot from CD

2013-11-11 Thread Andrey Borzenkov
В Mon, 11 Nov 2013 18:58:20 +0100
Jacek Konieczny jaj...@jajcus.net пишет:

 
 Hi,
 
 I have a system as a disk image. It can be booted directly from an USB
 stick both via legacy BIOS and EFI. I wanted the same image to be usable
 on a CD.
 
 For EFI boot it should be straightforward – use the disk image as
 a hard-disk-emulation El-Torito EFI boot image.

Do you mean - in addition to EFI boot image? Because EFI requires ESP
in no emulation mode to boot.

I have done that with
 other EFI boot loaders and it worked right.
 

 With GRUB there is a problem – it is unable to find the boot partition.
 In rescue mode I can see only:
 
 (hd0) (cd0)
 
 however, I would expect too see (hd0,msdos1) too – with the first
 partition of the El-Torito image.
 

Why msdos? El-Torito CD does not have standard DOS label, so it would
be wrong name. And if you place whole image of partitioned disk there,
it becomes nested partition (dos label in El-Torito partition).

Something like (cd,eltorito0,msdos1) probably.

 Is it a bug? Am I doing something wrong?
 

No. As it stands currently grub does not expose El-Torito image as 
partition of CD media. It is completely invisible unless you use hybrid
CD which contains other partition labels referring to it.

 I made a workaround by using GRUB loopback in the embedded config for
 the EFI loader:
 
 echo starting grub
 search.fs_uuid 8101-917C root
 set prefix=($root)/grub
 configfile $prefix/go_normal.cfg
 echo boot partition not found falling back to loopback device
 search.fs_uuid 2013-11-11-18-32-41-96 cd
 loopback loop ($cd)/pld-nr-32.img
 set root=(loop,msdos1)
 set prefix=($root)/grub
 
 It works, but I don't like this.

But you need to place image on CD either way. Are you using this image
for anything else, like directly booting on non-EFI?

  GRUB should be able to see the El-Torito
 contents, shouldn't it?
 

So far there was not any use case. But yes, technically EFI does expose
it as partition so grub probably should too.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: error: core image is too big (0xXXXXXX 0x78000)

2013-11-09 Thread Andrey Borzenkov
В Thu, 7 Nov 2013 20:37:53 -0600
Glenn Washburn developm...@efficientek.com пишет:

 This only happens on i386-pc and i386 pxe.
 
 Can anyone explain or point to documentation as to why the core image
 can't be larger than 0x78000 for i386?
 
 It appears that this check is to prevent grub from occupying some of
 the upper memory area.  Why can't grub use the upper memory?  Why
 doesn't grub use unreal mode to access the extended memory?  If it does
 use these memory regions, why is there this limit?
 

grub does use protected mode, but core.img is loaded very early in real
mode, where available memory is quite limited. For this reason core.img
should be as small as possible and contain just enough to access the
rest of grub modules which can be loaded later after switch to
protected mode.

I do not know where exact number comes from; but absolute limit is 640k
anyway and part of it is already taken.

 Any insight is appreciated,
 Glenn
 
 
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Chainloading to an isofile embedded bootloader

2013-11-04 Thread Andrey Borzenkov
В Mon, 04 Nov 2013 16:12:13 +0100
Arbiel (gmx) arbiel.perlacre...@gmx.fr пишет:

 Hi
 
 Using grub2, booting a PC from an iso file is rather straightforward 
 when the file's bootloader is grub2 itself or that the 
 /boot/grub/loopback.cfg file exists.

Do not assume everyone knows what loopback.cfg does :) Could you
explain what you are trying to do? Without referring to any third-party
implementation.

 When this is not the case, one has to write such a 
 /boot/grub/loopback.cfg file, and this may require a lot of expertise. A 
 way to avoid this rather cumbersome task would be to have grub2 
 chainload to the loopbacked file-embedded bootloader.
 
 1) does such a chainload operation work ?
 2) in the case it works, can you please inform me which block address 
 and length are to be used ?
 3) else, would it be possible to include this development into grub's 
 future plans ?
 
 Thanks
 
 Arbiel
 
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Grub is not showing Windows 7 when booting my laptop

2013-10-25 Thread Andrey Borzenkov
В Fri, 25 Oct 2013 10:59:45 -0500
Daniel - Asterisk earohua...@gmail.com пишет:

 Hello all,
 
 I'm completely novice with grub and I have a problem, I was re-installing
 ArchLinux (/dev/sda2) in my laptop with existing Windows 7 (/dev/sda1), but
 after re-installing grub and running following commands I lost Windows at
 boot time. I think Windows is still there and I want to recover it.
 
- grub-install --target=i386-pc --recheck=/dev/sda
- grub-mkconfig -o /boot/grub/grub.cfg
- exit
- poweroff
 

Unless Arch has something special, grub-mkconfig calls os-prober to
get list of foreign OS. What is output of os-prober (as root)?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Grub is not showing Windows 7 when booting my laptop

2013-10-25 Thread Andrey Borzenkov
В Fri, 25 Oct 2013 11:30:29 -0500
Daniel - Asterisk earohua...@gmail.com пишет:

 It shows:
 
 No volume groups found
 /dev/sda1: Windows 7(loader): Windows:chain
 

OK, so what do you mean lost? Not present in grub menu?

 Chento
 
 
 
 On Fri, Oct 25, 2013 at 11:18 AM, Andrey Borzenkov arvidj...@gmail.comwrote:
 
  В Fri, 25 Oct 2013 10:59:45 -0500
  Daniel - Asterisk earohua...@gmail.com пишет:
 
   Hello all,
  
   I'm completely novice with grub and I have a problem, I was re-installing
   ArchLinux (/dev/sda2) in my laptop with existing Windows 7 (/dev/sda1),
  but
   after re-installing grub and running following commands I lost Windows at
   boot time. I think Windows is still there and I want to recover it.
  
  - grub-install --target=i386-pc --recheck=/dev/sda
  - grub-mkconfig -o /boot/grub/grub.cfg
  - exit
  - poweroff
  
 
  Unless Arch has something special, grub-mkconfig calls os-prober to
  get list of foreign OS. What is output of os-prober (as root)?
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB 2.0 not loading config file

2013-10-20 Thread Andrey Borzenkov
В Sun, 20 Oct 2013 01:40:25 -0600
Chris Murphy li...@colorremedies.com пишет:

 
 Temporary confusion. The core.img is in gpt2, but it's looking for /boot/grub 
 within the fs on gpt1. So it looks like the prefix is right, except there's 
 no hdX designation before the comma, is that normal?

Yes. This simply means - first partition on boot disk. It makes it more
robust as it works even if disk order is changed for whatever reason.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB 2.0 not loading config file

2013-10-19 Thread Andrey Borzenkov
В Sat, 19 Oct 2013 11:02:42 +0200
Ortwin Glück o...@odi.ch пишет:

 Hi,
 
 Symptoms:
 - GRUB 2.0 starts in command-line mode. The boot menu is not loaded.
 - on the command-line: configfile /boot/grub/grub.cfg properly loads the 
 config 
 file, surprisingly.
 - GRUB 0.9 works fine.
 
 HW: Samsung laptop that I boot in legacy (non-EFI) mode. Have not tried EFI.
 
 grub-install creates the image like so:
 /usr/bin/grub2-mkimage -d /usr/lib/grub/i386-pc -O i386-pc 
 --output=/boot/grub/i386-pc/core.img --prefix=(,gpt1)/boot/grub biosdisk ext2 
 part_gpt
 

prefix here is used only as fallback; grub will search for it at
runtime. So check values of $root and $prefix immediately after
starting grub.

Your description suggests that $prefix for whatever reason is wrong but
$root is correct.

 
 Partition tables:
 MBR:
 Disk /dev/sda: 126.0 GB, 126035288064 bytes, 246162672 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0x3eb19e87
 
 Device Boot  Start End  Blocks   Id  System
 /dev/sda1   1   246162671   123081335+  ee  GPT
 
 
 GPT:
 Disk /dev/sda: 246162672 sectors, 117.4 GiB
 Logical sector size: 512 bytes
 Disk identifier (GUID): 6A7696BC-D860-44B9-87E9-6AAECD6C9E4F
 Partition table holds up to 128 entries 
 
 First usable sector is 34, last usable sector is 246162638 
 
 Partitions will be aligned on 2-sector boundaries 
 
 Total free space is 0 sectors (0 bytes) 
 
  
 
 Number  Start (sector)End (sector)  Size   Code  Name 
 
 12048   246162638   117.4 GiB   8300  primary 
 
 2  342047   1007.0 KiB  EF02  BIOS boot partition
 
 
 Any ideas?
 
 Ortwin
 
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB 2.0 not loading config file

2013-10-19 Thread Andrey Borzenkov
В Sat, 19 Oct 2013 22:07:47 -0600
Chris Murphy li...@colorremedies.com пишет:

  
  GPT:
  Disk /dev/sda: 246162672 sectors, 117.4 GiB
  Logical sector size: 512 bytes
  Disk identifier (GUID): 6A7696BC-D860-44B9-87E9-6AAECD6C9E4F
  Partition table holds up to 128 entries 
  First usable sector is 34, last usable sector is 246162638 
  Partitions will be aligned on 2-sector boundaries 
  Total free space is 0 sectors (0 bytes) 
  
  Number  Start (sector)End (sector)  Size   Code  Name 
12048   246162638   117.4 GiB   8300  primary 
2  342047   1007.0 KiB  EF02  BIOS boot partition
 
 At the grub command line, issue the set command and report the result for 
 prefix. Above it looks like it's setting the prefix to (,gpt1)/boot/grub 
 which is wrong. It should be (hd0,gpt2) based on the GPT you've posted,

Based on GPT it should be gpt1. 

 but it's unusual that the partition numbers are reversed given the
 LBAs being used. The BIOS boot partition is first.


There is no requirement that partition numbers correspond to relative
partition positions on disk. At least I am not aware of it - do you
have reference?
 
 It might be worth using gdisk to reorder the partitions and write out the GPT 
 again and then re-installing grub.
 
 Chris Murphy
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Unable to boot after moving partition

2013-10-17 Thread Andrey Borzenkov
В Thu, 17 Oct 2013 13:46:12 -0400
Chris Jones cjns1...@gmail.com пишет:

 I had to move a partion using gparted to make room for something else
 and I am no longer able to boot that system.
 
 I get the following error messages:
 
 | error no such device c07cc7e9-1c06-47fe-99b6-16c5145fbc4f
 | error HD1 cannot get C/H/S values

Is it really HD1 (upper case)? GRUB names hard disks hdX (lower case).
How many hard disks do you have?

 | error you need to load the kernel first
 
 Checked the uuid on line 1.. and that's in sync with grub.cfg.
 
 So it looks like line 2 is telling me that grub is still pointing to the
 old location..?
 
 Tried to run grub-install, hoping this would refresh grub's pointers but
 still getting the same error.
 
 Please advise.
 
 CJ
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Unable to boot after moving partition

2013-10-17 Thread Andrey Borzenkov
В Thu, 17 Oct 2013 16:39:02 -0400
Chris Jones cjns1...@gmail.com пишет:

 On Thu, Oct 17, 2013 at 01:46:12PM EDT, Chris Jones wrote:
 
 I'm not entirely sure it was HD1 rather than hd1... since I wrote it by
 hand.
 
 The message apparently comes from biosdisk.mod -- but that does not have
 the particular disk, only a %s variable that gets replaced by the
 actual value before it is printed.
 
 I have two disks, known as sda  sdb under linux.
 

The error simply means that BIOS returned an error when asked about
second disk. There is nothing grub can do here.

Did you replace disk probably with different disk? What disk size?

 The partition is somewhere near the end of the second disk - i.e.
 /dev/sdb7.
 
 Thanks,
 
 CJ
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB 2.00 conditional structures (statements) syntax

2013-10-16 Thread Andrey Borzenkov
В Tue, 15 Oct 2013 12:20:16 +0200
sas...@freenet.de пишет:

 Dear all, 
 
 unfortunately i was not able to find any documentation on usage of 
 conditional statements in grub configuration files.
 
 According to the “GNU GRUB Manual 2.00~rc1” found on http://www.gnu.org/ the 
 words 'if', 'fi', 'case', 'esac', 'in' and so on are reserved.
 Furthermore the scripting language is referred to as “Shell-like”.
 
 Simple “if [ $condition ]; then #dosomething; fi”-statements are not 
 problematic.
 But I wasn't able to find a functional syntax for the case-statements.
 

grub does not support case statement, at least as of now.

 To make it short: I would like to compare strings in the grub cli.
 
 Is there any more or less exhaustive documentation about the syntax or am I 
 just too dumb to use google?
 

What part is unclear?

case can in almost all cases be replaced with if. Actually, perl
never had case too. That said, if someone implements it, I guess it
will be accepted.

To compare patters you can use regexp command. Current trunk contains a
bit more complete list of available commands. 

 The most recent version I used to test stuff was the 2.00 that comes shipped 
 with arch linux.
 
 
 What I'm trying to do:
 
 I want to implement a grub configuration file that automatically generates 
 menu entries.
 
 For en example: 
 The following procedure should create entries for (small) files to be loaded 
 with memdisk ( from the syslinux project).
 /boot/memsik is our kernel.
 Our file is the initrd.
 We assume that the files can be PREFIX_*.* or just *.* or README*.
 (e.g. README || FLOPPY_dellbiosupdate.img || freedos.img)
 The README*-files should not be processed.
 For files with a prefix, the prefix should be appended as a kernel-parameter.
 For files without there are no parameters to append.
 
 I supposed that this would be “shell-like” (file=$img):
 
 [code source=”/boot/grub/grub.cfg”]
 . ..
 insmod ext2
 insmod regexp
 . ..
 set pathtoimages=”/boot/images”
 . ..
 for img in ${pathtoimages}/*; do
   set appendstr=””
   ...
   case ${img} in
 */README*)  continue  ;;
 */FLOPPY_*) set appendstr=${appendstr} floppy ;;
   …
   esac
   menuentry “MEMDISK - $img” “$img” “$appendstr” {
 linux16 /boot/memdisk ${3}
 initrd16 ${2}
   }
 done
 . ..
 [/code]
 
 I also tried to use other quoting notations with no success.
 Futhermore I also tried “if [[ ${img} == */FLOPPY_* ]]; ...”.
 
 
 
 Thank you very much in advance!
 
 
 
 With kind regards, 
 Sasha B.
 
 
 
 P.S.: Sorry if something's misspelled, English isn't my native tongue.
 
 
 
 ---
 Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! 
 http://email.freenet.de/basic/Informationen
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Question about LVM or RAID on /boot

2013-10-15 Thread Andrey Borzenkov
В Wed, 16 Oct 2013 09:13:05 +0800
Kun Huang gar...@unitedstack.com пишет:

 Sorry, why does that limitation stay in BIOS stage? In whole grub progress,
 we have no chance to scan all disks?
 

As long as grub is using BIOS to access them - no. It is possible to
use native grub disk drivers which bypasses BIOS and directly accesses
hard disk controller. On BIOS platforms that would be AHCI. 


 On Tuesday, October 15, 2013, Chris Murphy wrote:
 
 
  On Oct 14, 2013, at 10:22 PM, Kun Huang 
  gar...@unitedstack.comjavascript:_e({}, 'cvml', 
  'gar...@unitedstack.com');
  wrote:
 
  Hi all
 
  When searching why we couldn't use LVM or RAID on /boot, the most of
  answers are that couldn't be support. But I would like get to know more
  details. In grub.conf file, we could use (hd0,0) to specify root=. In
  another words, grub in stage2 actually could find data in all of disks. Is
  this right? If grub could find all partitions of all disks, what other
  reasons stop we find out information of LVM or RAID about and in disks?
 
 
  Works fine with GRUB2 for the past ~2 years at least. Probably longer.
 
  The limitation is BIOS seeing all of the disks, not a GRUB limitation. I
  think there's work that needs to be done to update the GRUB LVM code when
  it comes to LVM integrated raid levels 10, 5, and 6; and also thin
  provisioning. Except for raid0, 1, 10, I think the rest is a bit esoteric
  for /boot, and is probably more trouble than it's worth if there are device
  failures.
 
  I don't actually know off hand if GRUB2's md raid code can rebuild data
  chunks from parity on the fly, e.g. if there's a 1 disk failure of a raid5
  array. If not, yeah, all the more reason I'd keep /boot simple.
 
 
  Chris Murphy
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: grub2-mkconfig with root on rootfs

2013-10-11 Thread Andrey Borzenkov
В Thu, 10 Oct 2013 00:27:45 +0400
Peter Volkov p...@gentoo.org пишет:

OK so do I understand it correctly - you are running purely from
initramfs and do not have any additional filesystems?
   
   yup.
   
On which device do you install grub? Where is your /boot/grub located?

Please show full command line and its output used to install grub.
   
   I have single hard drive /dev/sdc with two partitions. First partition
   is formatted with ext4 (second partition is unformatted yet). To install
   grub I mount it to /mnt/root/ directory
  
  This was not present in mntinfo output. How should others guess it?
 
 Well, I thought that grub2-mkconfig should work even without /boot 
 (in my case /mnt/root) mounted. So full output is at the end of this mail.
 
 
   and then I run:
   
   grub2-install /dev/sdc --boot-directory=/mnt/root/
   
   Then my /boot/grub is located at (hd0, msdos1)/grub.
   
  
  You did not show any output from this command, so I assume this command
  completes without error?
 
 Yes, without any errors.
 
 # grub2-install /dev/sdc --boot-directory /mnt/root/
 Installation finished. No error reported.
 
 And even more, grub2 works correctly if I put grub.cfg into /mnt/root/grub/ 
 and reboot.
 The problem is that grub2-mkconfig fails at grub2-probe:
 
 # /usr/sbin/grub2-probe --target=device /
 /usr/sbin/grub2-probe: error: failed to get canonical path of `rootfs'.
 

OK, I see. Well, may be grub-mkconfig should support --boot-directory
option as well. I suggest you post it to grub-devel, where someone may
pick it up. If you could send patch, this would be even better :)

As for you case - why do not you simply mount /dev/sda1 on /boot? It
*is* your /boot after all, is not it?

 32 1 8:1 / /mnt/root rw,noatime - ext4 /dev/sda1 rw,data=ordered
 

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: query screen resolution for font sizes and theme parameters?

2013-10-08 Thread Andrey Borzenkov
В Tue, 8 Oct 2013 12:12:33 +0200
Ronny Standtke ronny.stand...@fhnw.ch пишет:

 Hi all
 
 I'm using grub2 as the bootloader for a live system. That means that the
 system is booted on a very diverse range of systems with a very diverse
 range of graphic boards and monitors.
 
 I'm using set gfxmode=auto in the grub configuration and it works
 (mostly) fine. There is only one remaining problem: On different
 resolutions I would like to use different font sizes or theme parameters.
 
 Is there any way to query grub for the screen resolution that was selected?
 

As far as I know, there is no way. This was already asked recently.

Exporting currently set info would not be hard. Something like
gfxmode_current probably.

Just needs someone to implement ... :)

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Help with custom Grub2 menu

2013-10-06 Thread Andrey Borzenkov
В Sat, 05 Oct 2013 12:34:42 -0500
Richard Owlett rowl...@cloud85.net пишет:

 
 Andrey Borzenkov replied on  3 Oct 2013 but I did not receive it 
 from the list ;(
 
 When using grub-mkconfig menu is built using scripts in /etc/grub.d.
  They are run sequentially and their output put into grub.cfg. You can
  modify or remove any of them, or do not use grub-mkconfig at all and
  maintain grub.cfg manually.
 
 I had understood that much.
 In grub.cfg, I'm not comfortable changing more than the text of 
 the displayed menu line.
 After all it does say DO NOT EDIT THIS FILE ;/
 

Because it is autogenerated and changes will be overwritten. But if you
are not using grub-mkconfig to generate it, you are free to do whatever
you want.

 Is there more descriptive information on the files in /etc/grub.d 
 than the included (very brief) comments?
 

Not really; probably having high level overview in grub documentation
would be helpful. But all settings that can influence behavior of these
scripts are documented.

  There are several attempts to create different tools to maintain grub.cfg.
 
 Thank you
 
 
 
 
 
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Help with custom Grub2 menu

2013-10-02 Thread Andrey Borzenkov
В Wed, 02 Oct 2013 14:48:55 -0500
Richard Owlett rowl...@cloud85.net пишет:

 I have a machine set aside for experimenting with OS 
 installs/configuration.
 
 I'm currently experimenting with Debian Squeeze and Wheezy.
 Debian's installer defaults to
1. making the last install the default when booting - can be 
 bad idea if
   you mess up the installation. I want the first OS installed 
 to be loaded
   by default.
2. creating menu title from id of installed kernel. As 
 multiple installs may
   use the same kernel, I wish to use meaningful label.
 
 Is there a tool /or documentation to make life simpler?
 

When using grub-mkconfig menu is built using scripts in /etc/grub.d.
They are run sequentially and their output put into grub.cfg. You can
modify or remove any of them, or do not use grub-mkconfig at all and
maintain grub.cfg manually. There are several attempts to create
different tools to maintain grub.cfg.


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: grub2-mkconfig with root on rootfs

2013-10-01 Thread Andrey Borzenkov
On Tue, Oct 1, 2013 at 1:51 AM, Peter Volkov p...@gentoo.org wrote:
 Hi!

 We are using may be strange but rather convenient scheme of booting
 linux where real system root is all inside initramfs (/init is symlink
 to /sbin/init). Everything works fine but grub2-mkconfig that ends out
 the error:

 /usr/sbin/grub2-probe: error: failed to get canonical path of `rootfs'.

 Sure with root on rootfs this grub2-probe is not supposed to work.

 # mount | grep ' / '
 rootfs on / type rootfs (rw)


Could you show full /proc/mounts (or even better, /proc/self/mountinfo)?

 But what can we do with that? Any suggestions to fix this?

 I'm not CC'ed to the list. Please add me to the answers.

 --
 Peter.



 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: grub2-mkconfig with root on rootfs

2013-10-01 Thread Andrey Borzenkov
On Tue, Oct 1, 2013 at 3:41 PM, Peter Volkov p...@gentoo.org wrote:
 В Вт, 01/10/2013 в 10:59 +0400, Andrey Borzenkov пишет:
 On Tue, Oct 1, 2013 at 1:51 AM, Peter Volkov p...@gentoo.org wrote:
  We are using may be strange but rather convenient scheme of booting
  linux where real system root is all inside initramfs (/init is symlink
  to /sbin/init). Everything works fine but grub2-mkconfig that ends out
  the error:
 
  /usr/sbin/grub2-probe: error: failed to get canonical path of `rootfs'.
 
  Sure with root on rootfs this grub2-probe is not supposed to work.
 
  # mount | grep ' / '
  rootfs on / type rootfs (rw)

 Could you show full /proc/mounts (or even better, /proc/self/mountinfo)?

 Yup, here is /proc/self/mountinfo:
 1 1 0:1 / / rw - rootfs rootfs rw

OK so do I understand it correctly - you are running purely from
initramfs and do not have any additional filesystems? On which device
do you install grub? Where is your /boot/grub located?

Please show full command line and its output used to install grub.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: grub2-mkconfig with root on rootfs

2013-10-01 Thread Andrey Borzenkov
В Wed, 02 Oct 2013 00:13:29 +0400
Peter Volkov p...@gentoo.org пишет:

 В Вт, 01/10/2013 в 17:18 +0400, Andrey Borzenkov пишет:
  On Tue, Oct 1, 2013 at 3:41 PM, Peter Volkov p...@gentoo.org wrote:
   В Вт, 01/10/2013 в 10:59 +0400, Andrey Borzenkov пишет:
   On Tue, Oct 1, 2013 at 1:51 AM, Peter Volkov p...@gentoo.org wrote:
We are using may be strange but rather convenient scheme of booting
linux where real system root is all inside initramfs (/init is symlink
to /sbin/init). Everything works fine but grub2-mkconfig that ends out
the error:
   
/usr/sbin/grub2-probe: error: failed to get canonical path of `rootfs'.
   
Sure with root on rootfs this grub2-probe is not supposed to work.
   
# mount | grep ' / '
rootfs on / type rootfs (rw)
  
   Could you show full /proc/mounts (or even better, /proc/self/mountinfo)?
  
   Yup, here is /proc/self/mountinfo:
   1 1 0:1 / / rw - rootfs rootfs rw
  
  OK so do I understand it correctly - you are running purely from
  initramfs and do not have any additional filesystems?
 
 yup.
 
  On which device do you install grub? Where is your /boot/grub located?
  
  Please show full command line and its output used to install grub.
 
 I have single hard drive /dev/sdc with two partitions. First partition
 is formatted with ext4 (second partition is unformatted yet). To install
 grub I mount it to /mnt/root/ directory

This was not present in mntinfo output. How should others guess it?

 and then I run:
 
 grub2-install /dev/sdc --boot-directory=/mnt/root/
 
 Then my /boot/grub is located at (hd0, msdos1)/grub.
 

You did not show any output from this command, so I assume this command
completes without error?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Question: skip menu, but enter by keypress

2013-09-29 Thread Andrey Borzenkov
В Sun, 29 Sep 2013 08:58:20 +0400
Aleksey Midenkov mide...@gmail.com пишет:

 Is it possible as in LILO to make such configuration:
 
 don't show menu, don't do timeout, run default menu entry unless SHIFT
 key is pressed.
 
 If SHIFT menu is pressed, then enter menu.
 

Something like this should work

set timeout=0
if keystatus --shift ; then
  set timeout=5
fi

 Why I'm asking, because how it's done in Grub -- enter to menu is
 possible only if timeout is set to  0 is something I don't like. I
 don't want to spend 1 more sec on each reboot just because it is
 required for the ability to enter menu.
 
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Booting to UEFI from Bios Boot Partition

2013-09-28 Thread Andrey Borzenkov
В Sat, 28 Sep 2013 13:23:53 -0300
luminair lumin...@gmail.com пишет:

 Hi there!  I'd like to know if GRUB2 installed to BBP and booted in BIOS
 mode can then load a UEFI boot partition 

No, it is not possible. EFI binary requires EFI runtime and it is not
available after BIOS was loaded.

  (in my case pointing to an install
 of Windows 8) on a GPT disk.  I ask because I'd like to boot a UEFI GPT
 disk in a Hyper-V gen1 VM which only supports BIOS mode booting.  GRUB2 (or
 another bootloader) may provide a workaround for me!
 
 I've tried to do this already with the version of GRUB2 that comes with the
 latest version of Ubuntu, but the chainloader throws an error when pointed
 at the UEFI boot partition.
 
 Thanks!


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: xnu_kernel64: Unable to boot into Mountain Lion

2013-09-26 Thread Andrey Borzenkov
В Thu, 26 Sep 2013 13:53:20 +0300
Mihai Draghicioiu mihai.draghici...@gmail.com пишет:

 Hello everyone!
 
 I'm trying to get a triple boot 64-bit Intel PC going correctly. There are
 Windows 8, Debian 7 and OSX Mountain Lion on it.
 
 Windows 8 and Debian boot fine from Grub, but the only way I got Mountain
 Lion to boot was via chainloading the Chameleon bootloader. The other
 option is using the xnu_* commands available, and update-grub generates the
 proper menu entries, however, when I choose the 32 bit menu entry it says
 there is no suitable kernel for 32 bit, and when I choose the 64 bit entry,
 it hangs for 1-2 seconds and then reboots. I've managed to place echo's in
 the boot sequence, and every command is executed before the reboot takes
 place. There is no output, the machine reboots before reaching the Apple
 logo loading screen.
 
 If this is a bug, and not a misuse on my part, please mention so I can
 submit it to the grub and debian bug trackers (personally I think it's
 already a Debian bug).
 

Yes, apparently grub xnu loader cannot boot modern OS/X versions. I was
able to boot it by directly chainloading OS/X EFI bootloader. Path
was /usr/standalone/i386/boot.efi if I'm not mistaken. This avoids need
to use third-party programs.

 Also, perhaps there are some debug flags I can turn on to see what's
 happening?
 
 I've found a similar situation on this webpage
 http://www.insanelymac.com/forum/topic/282748-grub2-xnu-kernel/
 
 Now I'm going to provide as much info as I can, please specify if more is
 needed to get a proper idea why this doesn't work:
 
 OS X version is Mountain Lion 10.8
 
 HDD is 1TB
 Partition table (MBR):
   Primary 200G NTFS (Win 8)
   Primary 100G HFS+ (OSX) Active
   Extended
 Linux 20G
 Swap 5G
 600G NTFS (Storage)
 
 # fdisk /dev/sda
 
 The device presents a logical sector size that is smaller than
 the physical sector size. Aligning to a physical sector (or optimal
 I/O) size boundary is recommended, or performance may be impacted.
 
 Command (m for help): p
 
 Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 4096 bytes
 I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 Disk identifier: 0xfa12c820
 
Device Boot  Start End  Blocks   Id  System
 /dev/sda12048   419432447   2097152007  HPFS/NTFS/exFAT
 /dev/sda2   *   419432448   629147647   104857600   af  HFS / HFS+
 /dev/sda3   629147648  1953525167   6621887605  Extended
 /dev/sda5   629149696   67109273520971520   83  Linux
 /dev/sda6   671094784   681580543 5242880   82  Linux swap / Solaris
 /dev/sda7   681582592  1953525167   6359712887  HPFS/NTFS/exFAT
 
 
 
 Here are a few menu entries that generate this behavior:
 
 This I got from some webpage - it seems minimal
 menuentry Mac OS X {
   set root=(hd0,2)
   insmod video
   insmod vbe
   gfxmode=1280x800x32
   xnu_kernel /mach_kernel rd=disk0s2
   if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ];
 then
  xnu_mkext /System/Library/Extensions.mkext
   else
  xnu_kextdir /System/Library/Extensions
   fi
 }
 
 
 This is generated by update-grub:
 
 menuentry Mac OS X (64-bit) (on /dev/sda2) --class osx --class darwin
 --class os {
 insmod part_msdos
 insmod hfsplus
 set root='(/dev/sda,msdos2)'
 search --no-floppy --fs-uuid --set=root 689f9c8a6b4f3520
 load_video
 set do_resume=0
 if [ /var/vm/sleepimage -nt10 / ]; then
if xnu_resume /var/vm/sleepimage; then
  set do_resume=1
fi
 fi
 if [ $do_resume = 0 ]; then
xnu_uuid 689f9c8a6b4f3520 uuid
if [ -f /Extra/DSDT.aml ]; then
   acpi -e /Extra/DSDT.aml
fi
xnu_kernel64 /mach_kernel boot-uuid=${uuid} rd=*uuid
if [ /System/Library/Extensions.mkext -nt
 /System/Library/Extensions ]; then
   xnu_mkext /System/Library/Extensions.mkext
else
   xnu_kextdir /System/Library/Extensions
fi
if [ -f /Extra/Extensions.mkext ]; then
   xnu_mkext /Extra/Extensions.mkext
fi
if [ -d /Extra/Extensions ]; then
   xnu_kextdir /Extra/Extensions
fi
if [ -f /Extra/devprop.bin ]; then
   xnu_devprop_load /Extra/devprop.bin
fi
if [ -f /Extra/splash.jpg ]; then
   insmod jpeg
   xnu_splash /Extra/splash.jpg
fi
if [ -f /Extra/splash.png ]; then
   insmod png
   xnu_splash /Extra/splash.png
fi
if [ -f /Extra/splash.tga ]; then
   insmod tga
   xnu_splash /Extra/splash.tga
fi
 fi
 }
 
 And, finally, this is what I'm using which 

Re: What is the license of grub-crypt(8) command?

2013-09-23 Thread Andrey Borzenkov
В Mon, 23 Sep 2013 11:11:21 +0900
Hiroshi Umehara zinrai0...@gmail.com пишет:

 The license is not specified in the grub-crypt(8) command.
 What is the license of grub-crypt(8) command?
 

There is no such command in grub sources. You need to ask your
distribution which probably provides this add-on.

 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Famous Your embedding area is unusually small however my embedding area looks like just the right size

2013-09-07 Thread Andrey Borzenkov
В Fri, 06 Sep 2013 21:28:39 -0700
Mike Power mpo...@alumni.calpoly.edu пишет:

 I am trying to reinstall grub on my system.  Grub was installed before 
 but I have had hard drive troubles, so one of the drives does not have 
 grub on it.  I have a lvm on top of a mirror raid.
 
 
 I run the following command
 
 $sudo grub-install /dev/sda
 [sudo] password for mpower:
 /usr/sbin/grub-setup: warn: Your embedding area is unusually small. 
 core.img won't fit in it..
 /usr/sbin/grub-setup: error: embedding is not possible, but this is
 required when the root device is on a RAID array or LVM volume.
 
 This seems odd since it has grub on it.  I really should have tried sdb 
 first.  But none the less if I look at sda it has 62 unused sectors on 
 the front.  From what I have read that is the right amount

bor@opensuse:~ grub2-mkimage -O i386-pc -o /tmp/core.img ext2 mdraid1x lvm 
search_fs_uuid
bor@opensuse:~ LC_ALL=C ll /tmp/core.img
-rw-r--r-- 1 bor bor 32099 Sep  7 11:32 /tmp/core.img

That exceeds 31KiB (31744B).


 
 $ sudo fdisk -l /dev/sda
 
 Disk /dev/sda: 500.1 GB, 500107862016 bytes
 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0x00018e76
 
 Device Boot  Start End  Blocks   Id  System
 /dev/sda1  63   976768064   488384001   fd  Linux raid
 autodetect
 
 Any idea what broke?
 
 Some additional info:
 
 $ sudo pvdisplay
--- Physical volume ---
PV Name   /dev/md0
VG Name   vg
PV Size   465.76 GiB / not usable 888.00 KiB
Allocatable   yes (but full)
PE Size   4.00 MiB
Total PE  119234
Free PE   0
Allocated PE  119234
PV UUID   wS9qYc-jWkT-FR3Z-bi0H-cY8I-wLS6-2Z1dPl
 
 $ sudo vgdisplay
--- Volume group ---
VG Name   vg
System ID
Formatlvm2
Metadata Areas1
Metadata Sequence No  3
VG Access read/write
VG Status resizable
MAX LV0
Cur LV2
Open LV   2
Max PV0
Cur PV1
Act PV1
VG Size   465.76 GiB
PE Size   4.00 MiB
Total PE  119234
Alloc PE / Size   119234 / 465.76 GiB
Free  PE / Size   0 / 0
VG UUID   QwDeNr-aQvO-5uYv-ImDP-C8eJ-uKyi-ZHYWtk
 
 $ sudo lvdisplay
--- Logical volume ---
LV Name/dev/vg/swap_1
VG Namevg
LV UUIDhxn1wt-EcJP-8rfO-3lCc-X3OM-gG3f-uuR3WK
LV Write Accessread/write
LV Status  available
# open 2
LV Size7.45 GiB
Current LE 1907
Segments   1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device   253:0
 
--- Logical volume ---
LV Name/dev/vg/root
VG Namevg
LV UUIDtjmJkA-njlJ-VuDz-mBvY-5hpB-bsMD-ftKMXP
LV Write Accessread/write
LV Status  available
# open 1
LV Size458.31 GiB
Current LE 117327
Segments   1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device   253:1
 
 $ sudo mdadm -D /dev/md0
 /dev/md0:
  Version : 1.2
Creation Time : Wed Jan 11 20:30:26 2012
   Raid Level : raid1
   Array Size : 488383352 (465.76 GiB 500.10 GB)
Used Dev Size : 488383352 (465.76 GiB 500.10 GB)
 Raid Devices : 2
Total Devices : 2
  Persistence : Superblock is persistent
 
  Update Time : Fri Sep  6 21:26:31 2013
State : clean
   Active Devices : 2
 Working Devices : 2
   Failed Devices : 0
Spare Devices : 0
 
 Name : petros:0  (local to host petros)
 UUID : dea84e95:1a6753ea:2982d49d:b812ff86
   Events : 2204266
 
  Number   Major   Minor   RaidDevice State
 2   810  active sync   /dev/sda1
 3   8   171  active sync   /dev/sdb1
 
 $ grub-install -v
 grub-install (GRUB) 1.99-12ubuntu5.1
 
 $ lsb_release -a
 No LSB modules are available.
 Distributor ID:

Re: GRUB netboot with HTTP download

2013-08-30 Thread Andrey Borzenkov
В Wed, 28 Aug 2013 19:38:16 +0200
Daniel Dehennin daniel.dehen...@baby-gnu.org пишет:

 Hello,
 
 I try to setup a DHCP/TFTP/HTTP netboot but always get the rescue shell.
 

Are you using current trunk?

 I start with grub-mknetdir:
 
   /usr/sbin/grub-mknetdir --net-directory=tftp --subdir=grub --modules=http
 
 I would like to make grub use HTTP to download files, so I modify the
 grub image to include http and set the prefix:
 
 grub-mkimage -d /usr/lib/grub/x86_64-efi -O x86_64-efi \
 --output=tftp/grub/x86_64-efi/core.efi \
 --prefix='(http,10.0.0.1)/grub' \
 tftp http efinet
 
 This result in the following:
 
 error: no server is specified.
 grub rescue set
 net_default_server=
 prefix=(http,10.0.0.1)/grub
 pxe_default_server=
 root=http,10.0.0.1
 grub rescue ls
 (hd0) (hd1)
 
 The error message seems to come from grub-core/net/net.c[1] resulting of
 a miss-match[2] of my “prefix”.
 
 I looked for documentation on how to use grub modules but only found
 explanation on PXE[3] and device syntax[4].
 
 I should have done something wrong but I do not see what, any hints?
 
 Regards.
 
 Footnotes: 
 [1]  
 http://bzr.savannah.gnu.org/lh/grub/trunk/grub/annotate/head:/grub-core/net/net.c#L1279
 
 [2]  
 http://bzr.savannah.gnu.org/lh/grub/trunk/grub/annotate/head:/grub-core/net/net.c#L1262
 
 [3]  https://www.gnu.org/software/grub/manual/grub.html#Network
 
 [4]  https://www.gnu.org/software/grub/manual/grub.html#Device-syntax
 



signature.asc
Description: PGP signature
___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: What updates the Grub2 Device map?

2013-08-18 Thread Andrey Borzenkov
В Sat, 17 Aug 2013 19:14:01 -0700
Upscope upsc...@nwi.net пишет:

 In removed an unused disk from my system. Afterward I Looked at 
 the partitioner and it does not show there. Also does not show in 
 grub-menu, os-prober or system info but it still shows in grub2 
 device map. Ran the update for grub2.  It still shows in the 
 device map. I could just edit the device map but I may screw
  something up doing that.
 

grub2 does not change device.map. It may be created or updated by your
system management programs (e.g. openSUSE YaST2 will update device.map)
or manually if required. grub2 will use device.map if present but will
never change it itself.

 An ideas where to look?
 
 Thanks!
  
 Russ
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: chainloader grub1 to grub2

2013-08-14 Thread Andrey Borzenkov
В Wed, 14 Aug 2013 14:02:58 -0300
robert verge robert.ver...@gmail.com пишет:

 The only thing old me back from upgrading from grub1 to grub2 is loading a
 chainloader config which loads directly from the drive. I have not found
 the equivalent in grub2. Any suggestions ?
 
 This is the current configuration that works in grub1
 
 title   ESXI on (hd2)
 chainloader (hd2)+1
 root(hd2)

menuentry ESXI on (hd2) {
  set root=hd2
  chainloader ($root)+1
}

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Using grub, is it possible to use if, while during booting (before loading normal.mod)?

2013-08-13 Thread Andrey Borzenkov
В Tue, 13 Aug 2013 07:33:28 -0700
Binh Minh binhminhmatt...@gmail.com пишет:

 It is a security feature requires my implementation to ask for the user's
 input and compare the input before we process information in grub.cfg.  It
 is proprietary so I can't discuss more than that.  If I include modules
 echo, sleep, read during grub-mkimage, I was able to have those commands in
 myconfig.cfg, and this works before normal.mod is loaded.  But how come
 if statement is unknown?  The grub documentation on this web site
 http://www.gnu.org/software/grub/manual/html_node/Embedded-configuration.htmlhas
 an example showing using if statement is possible.  What kind of
 built-in script parser is used when processing the config file that was
 linked into core.img?
 

normal.mod. Quoting documentation:

To do this, include the `configfile' and `normal' modules in the core
image,

 
 On Tue, Aug 13, 2013 at 2:39 AM, Andrey Borzenkov arvidj...@gmail.comwrote:
 
  On Tue, Aug 13, 2013 at 9:10 AM, Binh Minh binhminhmatt...@gmail.com
  wrote:
   I am trying to read in a user's input, compare the user's input to X.  If
   the user's input matches X, proceed to load normal.mod; otherwise loop
  back
   to get user's input.
  
  
 
  And why you cannot do it after normal.mod is loaded?
 
   On Mon, Aug 12, 2013 at 7:39 PM, Andrey Borzenkov arvidj...@gmail.com
   wrote:
  
   В Mon, 12 Aug 2013 13:39:24 -0700
   Binh Minh binhminhmatt...@gmail.com пишет:
  
My computer has grub installed. During booting before normal.mod is
loaded,
I need to be able to run if and while commands in my config file which
has
been linked into core.img (using grub-mkimage -c myconfig.confg). In
myconfig.config, I have an if statement and I kept getting unknown
command
if during booting.  I saw an example in
   
   
  http://www.gnu.org/software/grub/manual/html_node/Embedded-configuration.htmland
looks like I just need to include search, test, and normal modules.
Am
I missing something?  Thanks
  
   It is not possible. Those commands are provide by normal.mod. The only
   purpose of core.img is normally to load normal.mod.
  
   What are you trying to do?
  
  
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Using grub, is it possible to use if, while during booting (before loading normal.mod)?

2013-08-13 Thread Andrey Borzenkov
В Tue, 13 Aug 2013 09:38:19 -0700
Binh Minh binhminhmatt...@gmail.com пишет:

 I included the normal and configfile modules in grub-mkimage and still
 system does not recognize if

Yes, documentation apparently is wrong here. Embedded config is parsed
before normal.mod is loaded so it supports only what is available in
rescue mode.  



 On Aug 13, 2013 9:15 AM, Andrey Borzenkov arvidj...@gmail.com wrote:
 
  В Tue, 13 Aug 2013 07:33:28 -0700
  Binh Minh binhminhmatt...@gmail.com пишет:
 
   It is a security feature requires my implementation to ask for the user's
   input and compare the input before we process information in grub.cfg.
   It
   is proprietary so I can't discuss more than that.  If I include modules
   echo, sleep, read during grub-mkimage, I was able to have those commands
  in
   myconfig.cfg, and this works before normal.mod is loaded.  But how come
   if statement is unknown?  The grub documentation on this web site
  
  http://www.gnu.org/software/grub/manual/html_node/Embedded-configuration.htmlhas
   an example showing using if statement is possible.  What kind of
   built-in script parser is used when processing the config file that was
   linked into core.img?
  
 
  normal.mod. Quoting documentation:
 
  To do this, include the `configfile' and `normal' modules in the core
  image,
 
  
   On Tue, Aug 13, 2013 at 2:39 AM, Andrey Borzenkov arvidj...@gmail.com
  wrote:
  
On Tue, Aug 13, 2013 at 9:10 AM, Binh Minh binhminhmatt...@gmail.com
wrote:
 I am trying to read in a user's input, compare the user's input to
  X.  If
 the user's input matches X, proceed to load normal.mod; otherwise
  loop
back
 to get user's input.


   
And why you cannot do it after normal.mod is loaded?
   
 On Mon, Aug 12, 2013 at 7:39 PM, Andrey Borzenkov 
  arvidj...@gmail.com
 wrote:

 В Mon, 12 Aug 2013 13:39:24 -0700
 Binh Minh binhminhmatt...@gmail.com пишет:

  My computer has grub installed. During booting before normal.mod
  is
  loaded,
  I need to be able to run if and while commands in my config file
  which
  has
  been linked into core.img (using grub-mkimage -c myconfig.confg).
  In
  myconfig.config, I have an if statement and I kept getting
  unknown
  command
  if during booting.  I saw an example in
 
 
   
  http://www.gnu.org/software/grub/manual/html_node/Embedded-configuration.htmland
  looks like I just need to include search, test, and normal
  modules.
  Am
  I missing something?  Thanks

 It is not possible. Those commands are provide by normal.mod. The
  only
 purpose of core.img is normally to load normal.mod.

 What are you trying to do?


   
 
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Using grub, is it possible to use if, while during booting (before loading normal.mod)?

2013-08-13 Thread Andrey Borzenkov
В Tue, 13 Aug 2013 07:33:28 -0700
Binh Minh binhminhmatt...@gmail.com пишет:

 It is a security feature requires my implementation to ask for the user's
 input and compare the input before we process information in grub.cfg. 

If you are concerned about tampering with on-disk file - current trunk
supports (mandatory) signature verification. So you load trusted
minimal grub.cfg which then loads another script for final processing.


  It
 is proprietary so I can't discuss more than that.  If I include modules
 echo, sleep, read during grub-mkimage, I was able to have those commands in
 myconfig.cfg, and this works before normal.mod is loaded.  But how come
 if statement is unknown?  The grub documentation on this web site
 http://www.gnu.org/software/grub/manual/html_node/Embedded-configuration.htmlhas
 an example showing using if statement is possible.  What kind of
 built-in script parser is used when processing the config file that was
 linked into core.img?
 
 
 On Tue, Aug 13, 2013 at 2:39 AM, Andrey Borzenkov arvidj...@gmail.comwrote:
 
  On Tue, Aug 13, 2013 at 9:10 AM, Binh Minh binhminhmatt...@gmail.com
  wrote:
   I am trying to read in a user's input, compare the user's input to X.  If
   the user's input matches X, proceed to load normal.mod; otherwise loop
  back
   to get user's input.
  
  
 
  And why you cannot do it after normal.mod is loaded?
 
   On Mon, Aug 12, 2013 at 7:39 PM, Andrey Borzenkov arvidj...@gmail.com
   wrote:
  
   В Mon, 12 Aug 2013 13:39:24 -0700
   Binh Minh binhminhmatt...@gmail.com пишет:
  
My computer has grub installed. During booting before normal.mod is
loaded,
I need to be able to run if and while commands in my config file which
has
been linked into core.img (using grub-mkimage -c myconfig.confg). In
myconfig.config, I have an if statement and I kept getting unknown
command
if during booting.  I saw an example in
   
   
  http://www.gnu.org/software/grub/manual/html_node/Embedded-configuration.htmland
looks like I just need to include search, test, and normal modules.
Am
I missing something?  Thanks
  
   It is not possible. Those commands are provide by normal.mod. The only
   purpose of core.img is normally to load normal.mod.
  
   What are you trying to do?
  
  
 


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Using grub, is it possible to use if, while during booting (before loading normal.mod)?

2013-08-12 Thread Andrey Borzenkov
В Mon, 12 Aug 2013 13:39:24 -0700
Binh Minh binhminhmatt...@gmail.com пишет:

 My computer has grub installed. During booting before normal.mod is loaded,
 I need to be able to run if and while commands in my config file which has
 been linked into core.img (using grub-mkimage -c myconfig.confg). In
 myconfig.config, I have an if statement and I kept getting unknown command
 if during booting.  I saw an example in
 http://www.gnu.org/software/grub/manual/html_node/Embedded-configuration.htmland
 looks like I just need to include search, test, and normal modules.
 Am
 I missing something?  Thanks

It is not possible. Those commands are provide by normal.mod. The only
purpose of core.img is normally to load normal.mod.

What are you trying to do? 

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: detecting disks and disk size

2013-08-08 Thread Andrey Borzenkov
В Thu, 8 Aug 2013 20:33:57 +
Loving, Kent kent.lov...@boeing.com пишет:

 Hello,
 I am using GRUB on a CD to boot a specialized live linux on the CD. I would 
 like to customize the GRUB menu based on the number of hard disks that are 
 installed in the machine that is booting the CD. I would also like to 
 customize based on the size of the installed disks.
 
 I've searched GUB manual, and tried every command at the GRUB prompt that I 
 hope would work. But nothing I've tried is helping.
 
 I tried to use ls to check (hd0) and (hd1), but ls always returns 0, even if 
 it prints an error.
 
 Once the linux is booted I can use something like cat /sys/block/sda/size 
 but that's no help in GRUB.
 
 Is there a command I am missing, or maybe a 'diskinfo' module?
 

It sounds similar to
http://lists.gnu.org/archive/html/help-grub/2013-06/msg00039.html


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Format option for chainloading GRUB from BOOTMGR

2013-08-07 Thread Andrey Borzenkov
В Wed, 7 Aug 2013 13:23:18 -0400
Alexei Podtelezhnikov apodt...@gmail.com пишет:

 On Wed, Aug 7, 2013 at 12:16 PM, Andrey Borzenkov arvidj...@gmail.comwrote:
 
 
  Alexei Podtelezhnikov apodt...@gmail.com пишет:
 
   
How is location of /boot/grub relevant here? To change it you update
grub2.img and if I understand you correctly, BCD does not need to be
updated for it?
   
  
   Correct. BCD needs to know the location of grub2.img only, not what's
   inside.
  
   It is too bad that UUID cannot be given in --prefix. The search_fs_uuid
   stuff is not for the end user.
 
  grub-mkimage (or grub-probe for that matter) are not end user tools.
  End user should use grub-install which does search for UUID and
  creates image that looks for it.
 
  How about making this a part of
  i386-pc-lnx
   format execution together with automatic appending lnxboot.img?
 
  I think if you send patch to grub-devel we'll see. It should likely go
  into grub-install. It may even be generalized by allowing multiple boot
  methods for a single platform.
 
 
 I have no idea how the interface should look like so that grub-install
 puts the image onto an NTFS bootmgr partition root rather than
 its boot sector.
 

I would say, just

grub-install --target i386-pc-lnx /path/to/image

 My initial post was to fill the gap: while there is a lot
 of information on how to chainload BOOTMGR from GRUB,
 there is no information on chainloading GRUB from BOOTMGR.


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Format option for chainloading GRUB from BOOTMGR

2013-08-06 Thread Andrey Borzenkov
В Mon, 5 Aug 2013 13:30:04 -0400
Alexei Podtelezhnikov apodt...@gmail.com пишет:

 Hi all,
 
 Thanks to ideas in [1], I managed to chainload GRUB2 core.img from Windows
 7 BOOTMGR. Here is the three steps.
 
 1) Create core.img with **full** direct unmounted path to grub directory
 starting from partition, for example
 
 grub2-mkimage --output=./core.img --format=i386-pc --prefix=*(hd0,1)*/grub2
 biosdisk part_msdos ext2
 

More robust is to use embedded config to search for partition UUID.
Hard disk enumeration may change between reboots.

 2) Concatenate lnxboot.img
 
 cat /boot/grub2/i386-pc/lnxboot.img ./core.img  ./grub2.img
 
 3) Place ./grub2.img onto windows boot partition and configure BCD with
 bcdedit.exe under Windows to load the file as a BOOTSECTOR application.
 
 It turns out that ./grun2.img can be larger than 512 bytes. BOOTMGR will
 load it just fine. Now, to be honest, the second step is just annoying. Do
 you have a format option for grub2-mkimage that would automatically include
 lnxboot.img? It would make the whole process so much smoother and more
 logical. Just a suggestion.
 

Adding something like i386-pc-lnx is relatively trivial from technical
PoV. The main problem is that we need to keep boot code and /boot/grub
directory in think - i.e. both must be updated in one step. Does BCD
configuration need update after grub2.img gets updated?

 Thanks,
 Alexei
 
 
 [1]
 http://blog.mudy.info/2010/08/boot-grub2-stage2-directly-from-windows-bootmgr-with-grub4dos-stage1/


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: new install not booting - solved, but questions remain

2013-08-03 Thread Andrey Borzenkov
В Sat, 03 Aug 2013 15:34:12 -0400
Miles Fidelman mfidel...@meetinghouse.net пишет:

 Hi Folks,
 
 Just installed Debian Wheezy onto a remote server, and encountered some 
 problems getting grub to boot properly.  Figured it out through trial 
 and error, but an explanation of what's going on would be very much 
 appreciated.  Note, most of my familiarity is with grub-legacy, this is 
 my first time working through things with grub 2.
 
 Basic setup:
 - remote install via IPMI console and later via ssh
 - PXEboot into the installer
 - partition and configure 4 disk drives into md devices for boot, swap, 
 root, LVM
 - USB drive shows up as /dev/sda during install - with hard drives as 
 /dev/sdb-e
 - after install hard drives show up as /dev/sda-d, usb drive as /dev/sde
 - pretty standard install process until the end
 - had to fiddle a bit to install MBR into hard drives (default would 
 have put it on the USB)
 - attempt to boot, end up at grub prompt on the remote console
 - type boot and get error: no kernel loaded
 - did some googling, based on what I found, tried the following (from 
 the grub prompt)
 -- set prefix=(md/0)/boot/grub
 -- set root=(md/2)
 -- boot
 -- still get error: no kernel loaded
 -- noted that ls (md/0)/ showed System.map, config-, vmlinuz, initrd as 
 well as grub
 -- tried the command linux (md/0)/vmlinuz... - let it autocomplete the 
 full file name
 - got error: file not found  #THIS IS CONFUSING - SINCE LS AND 
 AUTOCOMPLETE FOUND THE FILE
 -- insmod normal
 -- insmod
 -- now I get a boot screen, and after the timeout, everything booted 
 normally
 - reboot brought be back to the grub prompt
 - this time, after booting:
 -- ran update-grub and grub-install on all four drives, and and on 
 /dev/md0 (boot) and /dev/md2 (root) for good measure
 -- rebooted - everything came up fine So problem is solved but 2 questions
 
 But I'm left with two questions:
 - What exactly is going on? (WHY did the above fix the problem?)

core.img generated during installation contained wrong reference
to /boot/grub directory (most likely incorrect disk designation). It is
impossible to say more with information you provided. When you rebuilt
it, it apparently picked up the working one (again, I won't say
correct one because we do not know it).

 - Why didn't the install set things up properly? (This one is really a 
 question for the debian-boot list, and perhaps a bug report - but I'd 
 kind of like to understand what's going on with grub, and what should be 
 installed, before focusing on the installer.)
 
 Thanks very much,
 
 Miles Fidelman
 
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 https://lists.gnu.org/mailman/listinfo/help-grub


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB2, GPT, mdadm LVM

2013-07-19 Thread Andrey Borzenkov
В Fri, 19 Jul 2013 11:25:54 +0200
Sander Smeenk ssme...@freshdot.net пишет:

 Quoting Andrey Borzenkov (arvidj...@gmail.com):
 
  Yes. MD array will appear in the list as soon as at least one member
  was seen, but we need enough members so it becomes ready and can be
  scanned for LVM. May be extending ls so it can show diskfilter volume
  states would be useful.
  
  So the first think to check is how many physical disks are visible at
  grub prompt.
 
 Only the first 8 disk (on the first controller?) show up in grub:
 

OK that explains why LVM never appears.

 grub rescue ls
 (md/0) (hd0) (hd0,gpt2) (hd0,gpt1) (hd1) (hd1,gpt2) (hd1,gpt1) (hd2)
 (hd2,gpt2) (hd2,gpt1) (hd3) (hd3,gpt2) (hd3,gpt1) (hd4) (hd4,gpt2)
 (hd4,gpt1) (hd5) (hd5,gpt2) (hd5,gpt1) (hd6) (hd6,gpt2) (hd6,gpt1) (hd7)
 (hd7,gpt2) (hd7,gpt1)
 
 There should be another 8 disks. Now i wonder if this is GRUB at fault
 or the controller not publishing its disks properly(?). I'll look into
 the controller settings...
 

grub is at mercy of (controller) BIOS here. It can only access devices
that are presented by BIOS. 

Are they all on the same controller or on different ones? If you have
two different controllers, may be you need to enable BIOS (option ROM or
however is it called) on the second one.

If your controller is AHCI compliant (I assume it is unlikely to be
IDE) you could try to use ahci instead of biosdisk as physical disk
driver. You need to build different image for it.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB2, GPT, mdadm LVM

2013-07-18 Thread Andrey Borzenkov
В Thu, 18 Jul 2013 13:56:21 +0200
Sander Smeenk ssme...@freshdot.net пишет:

 Hi,
 
 I'm having issues getting GRUB to boot from my setup. It drops to an
 rescue shell stating it can't find the LVM root for my system. Similar
 'stacked' setups (md raid5/6 lvm, root on lvm) work fine: difference
 seems to be GPT.
 
 Setup is:
 16x 3TB disks with GPT partitions:
 | 1   2048 4095   1024.0 KiB  EF02  BIOS boot partition
 | 2   4096   5860533134   2.7 TiB FD00  Linux RAID
 
 Next i created an mdadm /dev/md0 with raid6:
 | md0 : active raid6 sda2[0]  [ .. ]  sdp2[2]
 |  41021865472 blocks super 1.2 level 6, 64k chunk, algorithm 2 [16/16] 
 []
 |  [==..]  resync = 10.1% (296747044/2930133248) 
 finish=985.3min speed=44540K/sec
 
 The entire /dev/md0 is a Physical Volume for LVM on which two Logical
 Volumes were created, one for / and one for swap. This setup works just
 fine when activated from within a LiveCD like GRML:
 | # lvdisplay | grep LV Name
 |   LV Namehost_root
 |   LV Namehost_swap
 |
 | # mount /dev/mapper/fdi-host_root /tgt
 |
 | # ls /tgt/boot/
 | System.map-3.8.0-26-generic  abi-3.8.0-26-generic config-3.8.0-26-generic
 | grub/  initrd.img-3.8.0-26-generic vmlinuz-3.8.0-26-generic
 
 
 During installation no errors are logged. GRUB embeds fine in the BIOS
 boot partition and the generated grub.cfg shows 'insmod lvm' and 'insmod
 raid6rec' amongst others. The BIOS starts GRUB just fine, it's GRUB
 where it seems to fail:
 
 
 During boot, GRUB starts and drops to 'grub rescue' stating Error:
 disk lvm/fdi-host_root not found. Typing 'ls' in the rescue shell shows
 the '(md/0)' device, but LVM is never started by GRUB.
 Much more than 'ls' isn't available in the rescue shell. Typing 'insmod
 lvm' just returns without error, typing 'insmod thisdoesnotexist'
 complains GRUB can't find the disk 'lvm/fdi-host_root'.
 
 
 Could someone please advise where i am going wrong?
 
 
 I tried (re)creating the core.img like so:
 | # grub-mkimage -o /boot/grub/core_lvm.img -O i386-pc \
 | part_gpt part_msdos mdraid09 mdraid1x raid6rec \
 | diskfilter lvm ext2
 

Your image is lacking physical disk driver. This will be biosdisk on PC
BIOS platform.

 And put that in all the disks:
 | # grub-bios-setup -b i386-pc/boot.img -c core_lvm.img /dev/sdX
 
 Alas, to no avail.
 
 
 Thanks!
 -Sndr


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Obtaining the UUID of the system for a PXE boot

2013-07-18 Thread Andrey Borzenkov

I guess further discussion should be really moved to grub-devel

В Thu, 18 Jul 2013 12:39:44 +0200
Holger Goetz holg...@hgsys.de пишет:

 On 17.07.2013 16:31, Andrey Borzenkov wrote:
  On Wed, Jul 17, 2013 at 3:19 PM, Holger Goetzholg...@hgsys.de  wrote:
  Hello all,
 
  i've started to use grub.efi as boot loader for UEFI based systems and am
  getting slowly familiar w/ grub2.Now i've come across a problem w/ 
  assigning
  individual boot configurations to target system identification.
  The BIOS line of systems gets booted through pxelinux and get their PXE
  configuration through files w/ names based on the individual UUID of the
  system.
  The same should be possible for UEFI booted systems, but i couldn't find a
  way to get hold of the system-UUID yet. The MAC addresse(s) is/are not
  available and possibly have changed since the definition of the
  configuration, so even the lately introduced net_default_mac variable
  doesn't work here. Having the UUID as unique system identifyer across NICs
  which can be changed would be of big help.
 
  Any pointer/help would be greatly appreciated.
 
  So, you need to fetch system GUID used by PXE, right? To be honest, I
  do not even know how (if it is possible at all) to obtain it. The only
  words about PXE GUID in EFI allow to switch between using GUID and MAC
  for client identification, but that's all:
 
  ===
  SendGUIDThis field is used to change the Client Hardware Address
  (chaddr) field in the DHCP and Discovery packets. Set to TRUE to send
  the SystemGuid (if one is available).
  ===
 
  Do you know how to get this information?
 
 
 Hi Andrey,
 
 the system UUID is part of the SMBIOS structure which can be searched 
 between 0xf000 and 0x10 in memory. It has a signature string _SM_.
 With in the SMBIOS table (memory block)  the table type 1 identifys the 
 UUID table and it contains a 16byte binary number which typically is 
 returned in a form like 00112233-4455-6677-8899-AABBCCDDEEFF. See the 
 SMBIOS specs here: http://www.dmtf.org/standards/smbios.
 


David Michael posted patch to grub-devel which provides access to SM
BIOS information. You may be interested in checking to which extent it
could be used in your case. Thread title is

[PATCH/RFC] cpuid.c: Provide CPU model information

 Also in the spec is some discussions around byte swappig parts of the 
 uuid, for consistency probably a byte by byte representation as a string 
 would be best.
 
 One implementation can be found in eg. syslinux's core/dmi.c - including 
 a rudimentary validation check.
 Other implementations under Linux (eg. dmidecode) often take 
 /proc/efi/systab or /sys/firmware/efi/systab as starting points to the 
 SMBIOS structure, but that's obviously not available at the time grub 
 starts ;-)
 

I'm still not sure what exactly you need. There are three steps in
booting grub2 over network

1. Firmware loads core.img using PXE. At this point it may provide MAC
or GUID as client identification

2. core.img loads normal.mod which loads grub.cfg. This is done using
location hardcoded in core.img.

3. Finally grub.cfg loads other files, loads OS kernel and executes it.
It is using whatever features and commands grub2 provides and may
decide location dynamically.

Now, at which step exactly you need to know and use system GUID from SM
BIOS?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB2, GPT, mdadm LVM

2013-07-18 Thread Andrey Borzenkov
В Thu, 18 Jul 2013 20:35:43 +0200
Sander Smeenk ssme...@freshdot.net пишет:

 Quoting Chris Murphy (li...@colorremedies.com):
 
   During boot, GRUB starts and drops to 'grub rescue' stating Error:
   disk lvm/fdi-host_root not found.
  
  This means it's not finding normal.mod or grub.cfg.
 
 Yep. ;)
 
 
  [..] So it's a bit curious that it's looking for its files on an lvm
  root rather than on /boot. 
 
 I could have stated that clearer indeed.
 /boot and everyting else is on the /dev/mapper/fdi-host_root LV.
 
 I checked with 'set', the prefix= and root= settings seem correct:
 
 root='lvm/fdi-host_root'
 prefix=(lvm/fdi-host_root)/boot/grub
 
 But please note that doing 'ls' in the rescue shell does NOT show a
 'device' named lvm/fdi-host_root or anything that would indicate it might
 be the LVM LV i need. Only (md/0) and all the (hdX/gptY) 'devices' show.
 
 
   Typing 'ls' in the rescue shell shows
   the '(md/0)' device, but LVM is never started by GRUB.
  Only if /boot/grub files are also on LVM is that needed, in which case
  lvm.mod needs to have been baked into the core.img. But the fact that
  you're getting this message sounds like it's not loading lvm.mod.
 
 So it seems. Yet, if i type 'insmod lvm' in the grub rescue shell, there
 is no error returned. This would indicate to me that the .mod was
 (already?) loaded correctly, because if i type 'insmod foobar' instead,
 grub complains it can't read/find the host_root LV, which is correct
 since 'foobar' isn't in core.img so grub would have to load it from
 disk..
 
 
  I forget, but lsmod might work in the grub rescue shell to list what
  modules are available in core.img.
 
 It seems my core.img doesn't support lsmod. :(
 
 
   I tried (re)creating the core.img like so:
   | # grub-mkimage -o /boot/grub/core_lvm.img -O i386-pc \
   | part_gpt part_msdos mdraid09 mdraid1x raid6rec \
   | diskfilter lvm ext2
   And put that in all the disks:
   | # grub-bios-setup -b i386-pc/boot.img -c core_lvm.img /dev/sdX
  You might be better off using grub-install --debug and figuring out
  how it identifies the various parts.
 
 Meh. Why didn't i think of doing that ;)
  'No errors reported.', okay then, that's not my problem!  :P
 
 But all seems fine from the start:

Please paste exact command invocation and full output.

 | + abstractions=diskfilter mdraid1x raid6rec lvm
 | + grub_device=/dev/mapper/fdi-host_root
 | + devabstraction_module=diskfilter mdraid1x raid6rec lvm 
 | + prefix_drive=(lvm/fdi-host_root)
 
 There is a small bug in the process where part_gpt gets added to the
 'modules=' list for each disk in my system, resulting in:
 | + /usr/bin/grub-mkimage -d /usr/lib/grub/i386-pc -O i386-pc \
 |   --output=/boot/grub/i386-pc/core.img 
 --prefix=(lvm/fdi-host_root)/boot/grub \
 |  biosdisk ext2 part_gpt part_gpt part_gpt part_gpt part_gpt part_gpt \
 |  part_gpt part_gpt part_gpt part_gpt part_gpt part_gpt part_gpt \
 |  part_gpt part_gpt part_gpt diskfilter mdraid1x raid6rec lvm
 being called. However i would assume this is harmless...
 
 Then grub-bios-setup runs. It scans all disks and logs:
 | info: Inserting hostdisk//dev/sdX into md/0 (mdraid1)
 for each of my disks. It's not actually raid1, but raid6,
 i'm not sure wether 'mdraid1' is an all purpose mdraid module?
 This *might* be an issue?
 
 grub-setup continues nonetheless:
 | info: Scanning for lvm devices on disk md/0.
 | info: Found array fdi.
 | info: Inserting md/0 into fdi (lvm)
 |  [..]
 | info: guessed root_dev `lvm/fdi-host_root' from dir `/boot/grub/i386-pc'.
 | info: setting the root device to `lvm/fdi-host_root'.
 | info: the first sector is 2048,0,512.
 perfectly true. It saves the sectors from 2048 to 2183, which seems the
 size of core.img and logs 'Installation finished. No error reported.'
 
 
 I'm at a loss :)
 
 Thanks for your time,
 -Sndr.


___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: GRUB2, GPT, mdadm LVM

2013-07-18 Thread Andrey Borzenkov
В Thu, 18 Jul 2013 20:37:49 +0200
Sander Smeenk ssme...@freshdot.net пишет:

 Quoting Andrey Borzenkov (arvidj...@gmail.com):
 
   I tried (re)creating the core.img like so:
   | # grub-mkimage -o /boot/grub/core_lvm.img -O i386-pc \
   | part_gpt part_msdos mdraid09 mdraid1x raid6rec \
   | diskfilter lvm ext2
  Your image is lacking physical disk driver.
  This will be biosdisk on PC BIOS platform.
 
 Unfortunately, adding biosdisk to the list doesn't give me a working
 GRUB either. Device (md/0) shows but (lvm/fdi-host_root) doesn't.
 

Could you test current trunk? There were some changes in how grub scans
for multilayer devices; it may have fixed it.

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


Re: Obtaining the UUID of the system for a PXE boot

2013-07-17 Thread Andrey Borzenkov
On Wed, Jul 17, 2013 at 3:19 PM, Holger Goetz holg...@hgsys.de wrote:
 Hello all,

 i've started to use grub.efi as boot loader for UEFI based systems and am
 getting slowly familiar w/ grub2.Now i've come across a problem w/ assigning
 individual boot configurations to target system identification.
 The BIOS line of systems gets booted through pxelinux and get their PXE
 configuration through files w/ names based on the individual UUID of the
 system.
 The same should be possible for UEFI booted systems, but i couldn't find a
 way to get hold of the system-UUID yet. The MAC addresse(s) is/are not
 available and possibly have changed since the definition of the
 configuration, so even the lately introduced net_default_mac variable
 doesn't work here. Having the UUID as unique system identifyer across NICs
 which can be changed would be of big help.

 Any pointer/help would be greatly appreciated.


So, you need to fetch system GUID used by PXE, right? To be honest, I
do not even know how (if it is possible at all) to obtain it. The only
words about PXE GUID in EFI allow to switch between using GUID and MAC
for client identification, but that's all:

===
SendGUIDThis field is used to change the Client Hardware Address
(chaddr) field in the DHCP and Discovery packets. Set to TRUE to send
the SystemGuid (if one is available).
===

Do you know how to get this information?

___
Help-grub mailing list
Help-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/help-grub


  1   2   >