Re: efi linux booting on macbook pro fails with grub2 1.97

2009-10-26 Thread Michael Evans
I think that grub2 still uses the same hd0 == sda ; hd1 == sdb ; ... ;
hd(N-1) =sd(N) scheme, but stops counting partitions within drives from 0
and instead uses the same number as otherwise (maybe they mapped 'partition
0' to the whole devices as a default argument; that would make sense to me).

So you need to modify your grub-config to read

menuentry Debian GNU/Linux {
   root=(hd0,3)
   fakebios
   linux   /boot/vmlinuz root=/dev/sda3 ro video=efifb
}

(Or something...)

Ubuntu 9.10, which is likely based off debian, automatically attemtps to
regenerate the grub-configuration file based on the files in /etc/grub/ (or
something like that, the system I was testing 9.10 on isn't installed
anymore and my laptop's not going to be upgraded until I can re-install this
weekend.)

running update-grub2 should regenerate the file; if you want to add your own
code you can control where it goes in that file with the first two
characters (alpha-numeric sorting in effect).


On Mon, Oct 26, 2009 at 7:26 AM, Soeren Sonnenburg so...@debian.org wrote:

 Dear list,

 I am trying to boot linux of a MacBookPro5,3 using grub2 1.97, refit and
 efi booting and well it doesn't work :/

 What I did

 ./configure --with-platform=efi
 make

 mount the vfat partition that contains the EFI dir to /mnt/efi
 ./grub-mkimage -d . -o grub.efi part_gpt hfsplus fat ext2 normal sh chain
 boot configfile loadbios fat chain appleldr fixvideo
 sudo cp grub.efi *.mod *.lst /mnt/efi/EFI/GRUB/


 When I reboot I select grub.efi from the refit shell and grub2 starts up
 (I see a list of kernels to choose from).

 The entry I am trying to boot is

 menuentry Debian GNU/Linux {
root=(hd1,3)
fakebios
linux   /boot/vmlinuz root=/dev/sda3 ro video=efifb
 }

 but I am being thrown back to the selection when selecting that entry.
 When issuing manually linux /boot/vmlinuz on the command prompt I don't
 see the usual image of size output but just nothing. And when I type
 linux again grub2 says unknown command from now on...

 Standard bios based booting via refit+grub works, what surprises me is
 that in the bios based setup I have to boot with root=(hd0,3) though.

 Any ideas what I could possibly be doing wrong?
 Soeren
 --
 For the one fact about the future of which we can be certain is that it
 will be utterly fantastic. -- Arthur C. Clarke, 1962

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


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


Re: Grub2: Where's the grub-update executable???

2009-11-29 Thread Michael Evans
Maybe your problem is that /boot wasn't yet mounted?

On Mon, Nov 23, 2009 at 7:37 PM, Tom H tomh0...@gmail.com wrote:
 I'm running grub version 1.97.
 What am I doing wrong?


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


Re: Help-grub Digest, Vol 23, Issue 5

2009-12-18 Thread Michael Evans
On Fri, Dec 18, 2009 at 10:40 AM,  ya...@teksavvy.com wrote:

 Hi Bill,

 Each Linux install partitions has /boot and /boot/grub of their own.
 I do not have a separate boot partition.

 I had replaced root commands in all my boot stanzas with uuid lines 
 because with disks added/removed root (hdm,n) spec becomes a moving target, 
 and boot process often fails.

 I always thought that in line e.g. kernel /boot/vmlinuz-2.6.24-24-generic, 
 the path is relative to the device declared as root either by a root 
 (hdm,n) line, or by a uuid  line.

 Am I wrong? If so what is the right way of specifying my kernel/initrd lines?

 Thanks.

 -Original message-
 Date: Thu, 17 Dec 2009 14:29:22 -0500
 From: Bill Marcum marcumb...@bellsouth.net
 Subject: Re: Two GRUB setup can boot one each of two installs, but not
       the other, why?
 To: help-grub@gnu.org
 Cc: help-grub@gnu.org
 Message-ID: 20091217192922.ga3...@lark.localnet
 Content-Type: text/plain; charset=us-ascii

 On Thu, Dec 17, 2009 at 08:27:50AM -0500, ya...@teksavvy.com wrote:
 
  Hi,
 
 [my info removed, for brevity]
 
 Does each have its own /boot directory, or do you have a /boot partition?
 If they are separate directories, I think each grub is looking for the
 kernel and initrd.img files in its own /boot directory.
 I notice that each stanza has root hd() commented out.






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


I believe whenever you see a filename loaded by grub (kernel or initrd
for example) that it's relative to the hd(n,p) you've specified.  I do
not believe that grub (but possibly grub2 does, I've not read enough
about it to know for sure) understands uuids; merely the software it
loads may.


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


Re: error: no such disk

2009-12-25 Thread Michael Evans
On Fri, Dec 25, 2009 at 9:51 AM, Nick Martin njmarti...@gmail.com wrote:
 Changing the lines you mentioned didn't help. I think those lines were
 correct as that section refers to directories on my root partition
 (/dev/sdb4 - hd1,4).

 Doing another grub-install with a live cd didn't give any errors either.

 2009/12/24 Tom H tomh0...@gmail.com:
 I'm having trouble getting grub 2 to work. I've tried installing 2
 different distros of Linux (Fedora 12  Ubuntu 9.10), but grub hasn't
 worked on either. I'm getting error: no such disk, followed by a
 grub rescue prompt. When I do ls at this prompt, I see this:

 (hd0) (hd0,1) (hd0,2) (hd1,1) (hd1,2) (hd1,3) (hd1,4)

 This seems perfectly reasonable. My setup is as follows:

 2 ATA hard drives:
 /dev/sda (hd0) master
    /dev/sda1 (hd0,1) fat32 - Windows XP backup partitionDisk
 /dev/sda: 40.0 GB, 40020664320 bytes
    /dev/sda2 (hd0,2) ntfs - Windows XP
 /dev/sdb (hd1) slave
    /dev/sdb1 (hd1,1) ntfs - storage space
    /dev/sdb2 (hd1,2) ext2 - /boot - 
 uuid=d53965e1-bcb1-4158-8531-193af32d52e7
    /dev/sdb3 (hd1,3) swap
    /dev/sdb4 (hd1,4) ext4 - / - uuid=17a9cefd-3754-4048-9aa9-93dc7967a107

 Output from fdisk -l:

 Disk /dev/sda: 40.0 GB, 40020664320 bytes
 255 heads, 63 sectors/track, 4865 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 Disk identifier: 0xe156a499

 Device Boot      Start         End      Blocks   Id  System
 /dev/sda1               1         595     4779306    b  W95 FAT32
 /dev/sda2   *         596        4865    34298775    7  HPFS/NTFS

 Disk /dev/sdb: 251.0 GB, 251000193024 bytes
 255 heads, 63 sectors/track, 30515 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 Disk identifier: 0x43393f15

 Device Boot      Start         End      Blocks   Id  System
 /dev/sdb1               1       28684   23040    7  HPFS/NTFS
 /dev/sdb2   *       28685       28708      192780   83  Linux
 /dev/sdb3           28709       28890     1461915   82  Linux swap / Solaris
 /dev/sdb4           28891       30515    13052812+  83  Linux

 GRUB is installed on the mbr of hd0, which is the drive the BIOS boots
 from. I've attached my grub.cfg and device.map file. The device.map
 file looks correct to me. At the start of the cfg file, grub seems to
 be setting up the graphics, for which it needs a font on /dev/sdb4,
 which is ext4. I see it uses insmod ext2. Is this right?

 I've tried to fix the problem with a liveCD by chrooting into those
 partitions and doing update-grub, then grub-install /dev/sda. I'm
 using GNU GRUB 1.97~beta4.

 The set root=(hd1,4) and search --no-floppy --fs-uuid --set
 17a9cefd-3754-4048-9aa9-93dc7967a107 lines at the top of your
 grub.cfg are incorrect.

 They should be set root=(hd1,2) and search --no-floppy --fs-uuid
 --set d53965e1-bcb1-4158-8531-193af32d52e7 (like within the menuentry
 entries).


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



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


While your thought process is logical the result is not valid.  You
have a separate /boot partition which is the 'root device' for the
grub-files; just as what you see as / after startup is the 'root
device' for your Linux OS.

As specified earlier, you must inform grub of /grub's root device/ not
the /linux root device/.  That would be (hd1,2) in grub2 and (hd1,1)
in grub 0.9x .


### BEGIN /etc/grub.d/10_linux ###
menuentry Ubuntu, Linux 2.6.31-14-generic {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd1,2)
search --no-floppy --fs-uuid --set d53965e1-bcb1-4158-8531-193af32d52e7
linux   /vmlinuz-2.6.31-14-generic
root=UUID=17a9cefd-3754-4048-9aa9-93dc7967a107 ro   quiet splash
initrd  /initrd.img-2.6.31-14-generic
}


You'll notice that this section the root device is set to (hd1,2) and
then two files are specified which would be under /boot/ when your
system normally operates; you'll also see that /boot should have a
symlink such that /boot/boot/ has the same files as /boot/ (literally
cd /boot ; ln -s . boot ), this is to aid you, so that you can still
specify /boot/ before files without breaking the install.


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


Re: grub-setup: error: no mapping exists for ... in GRUB2 v1.97.1 on fake (IMSM) RAID

2009-12-28 Thread Michael Evans
On Sun, Dec 27, 2009 at 5:50 PM, Lapohos Tibor tibor.lapo...@rogers.comwrote:

 Thanks for your reply.

 What the OROM says is that both of my volumes are bootable.
 /dev/md126 corresponds to Volume0, and its first partition (ext4) has the
 boot flag set.

 My problem is that I cannot get grub2 installed on the device at all. I did
 try, as you suggested, to set

 (hd0) /dev/md126

 in the  device.map file and then issue

  grub-install --modules=raid /dev/md126

 but I still get the same error message(s):

 grub-probe: error: no mapping exists for 'md126'
 grub-setup: error: no mapping exists for 'md126'

 What is interesting is that, at the grub shell, I can do

 grub probe -l (hd0,1)

 it returns OS which is the label I set for it, so the device can, under
 certain circumstances, definitely be detected. Nevertheless, grub-install
 does not seem to behave the same way.

 Thanks,
 Tibor

 --- On *Sun, 12/27/09, Michael Evans mjevans1...@gmail.com* wrote:


 From: Michael Evans mjevans1...@gmail.com
 Subject: Re: grub-setup: error: no mapping exists for ... in GRUB2 v1.97.1
 on fake (IMSM) RAID
 To: Lapohos Tibor tibor.lapo...@rogers.com
 Cc: help-grub@gnu.org
 Date: Sunday, December 27, 2009, 7:26 PM


  On Sat, Dec 26, 2009 at 5:33 AM, Lapohos Tibor 
 tibor.lapo...@rogers.comhttp://ca.mc882.mail.yahoo.com/mc/compose?to=tibor.lapo...@rogers.com
  wrote:

Hello All,

 I have 2 SATA disks in an Intel Matrix RAID setup. It contains two
 volumes, one in RAID1, the other in RAID0 configuration. These I created
 using the Option ROM of the motherboard,  partitioned using cfdisk, and
 finally assembled into RAID devices using mdadm v3.0.3. As such, I obtained
 the following devices:

 /dev/md127 (the container to which /dev/md/imsm0 is pointing)
 /dev/md126 (the RAID1 Volume0 pointed at by /dev/md/Volume0)
 /dev/md126p1 (the first partition intended to serve as the root fs)
 /dev/md126p2 (intended for user space)
 /dev/md126p3 (intended for swap)
 /dev/md125 (the RAID0 Volume1 pointed at by /dev/md/Volume1)
 /dev/md125p1 (intended for user scratch space)
 /dev/md125p2 (itended for swap)

 (the long names came from mdadm v 3.0.3).

 If I boot from my USB memory stick, and make a stop at the grub shell, I
 can see all these partitions listed as (hd1) (hd1,[123]), (hd2) and
 (hd2,[12]), while my USB stick comes up under (hd0) and (hd0,[12]).
 Therefore, I would dare to say that grub does detect these devices.

 I tried to install grub 1.97.1 on /dev/md126 by countless ways without
 success. The command

 $ grub-install --modules=raid /dev/md126

 for example returns the error message

 $ grub-setup: error: no mapping exists for md126

 The /boot/grub folder got created correctly, but the device.map file
 does not mention any virtual RAID devices. It reads:

 (hd0) /dev/sda (SATA1)
 (hd1) /dev/sdb (SATA2)
 (hd2) /dev/sdc (USB flash memory stick)

 which, by the way, does not resemble what the
 sh: grub ls
 command returns before booting (see the list described before).

 Do I need to give up using fake RAID and turn to pure SW RAID to get the
 system up and running, or is there a way to install GRUB2 in this
 configuration?

 Your help is much appreciated. Thanks ahead,
 Tibor


 ___
 Help-grub mailing list
 Help-grub@gnu.orghttp://ca.mc882.mail.yahoo.com/mc/compose?to=help-g...@gnu.org
 http://lists.gnu.org/mailman/listinfo/help-grub

 If you -know- that given drives will be in some positions during startup
 then you can edit the device.map file your self to tell grub where things
 will be on reboot.

 You should only provide the containers; however a very important question
 exists.  Are you able to select one of those containers as your boot volume
 within the bios?  If so make it like that and tell grub that the volume is
 'hd0' instead of /dev/sda.  Then you can do the usual setup/install and it
 should work when using that device.map.

 -Inline Attachment Follows-


 ___
 Help-grub mailing list
 Help-grub@gnu.orghttp://ca.mc882.mail.yahoo.com/mc/compose?to=help-g...@gnu.org
 http://lists.gnu.org/mailman/listinfo/help-grub

 I have yet to do a manual install of grub2; however grub I'd manually
install using the grub shell.  You should try performing a manual install,
or somehow increasing the verbosity so that you can see where it fails.
___
Help-grub mailing list
Help-grub@gnu.org
http://lists.gnu.org/mailman/listinfo/help-grub


Re: Booting on VT6306 (VIA Fire II)

2010-01-29 Thread Michael Evans
On Fri, Jan 29, 2010 at 3:09 AM, Kevin Roettger fly...@mac.com wrote:

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


Grub has to be loaded before it can be effective; even then grub uses
the bios calls to access the data on whatever drive it's configured to
address (via bios drive instance) to load the kernel, initrd, or do
anything else.

If your bios can 'boot' off the drive in question, or your add-in card
has sufficient support for that, then configure your system so that it
reads from the drive you want.  You /may/ have to inform grub that
it's installed on (hd0) at whatever the 'in configuration system'
block device file via a device.map (as I elaborated only a few hours
ago in another reply).

On the other hand, if your bios can't bootstrap off the drive you want
there's obviously no way that /grub/ could help with that.

 Hi,

 Thanks for your reply. At least I will stop trying then, indeed the BIOS has 
 no clue about the device... so I guess I'll stick to using the drive on the 
 IDE port internally.

 Cheers
 Kevin


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


It is /possible/ your add-on card has boot support; allow your bios to
boot other chipsets and disable any built in raid/extra 'support'
features.  It /might/ (maybe) work.


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


Re: bootrecord on extended partitiion

2010-02-26 Thread Michael Evans
On Fri, Feb 26, 2010 at 7:21 PM, Arand Nash ienor...@gmail.com wrote:
 I've been using grub-legacy to boot grub via the bootrecord of an extended
 partition, since having a multiboot setup where all other primary
 partitions, including the mbr, are dedicated otherwise and I need the
 bootrecord of grub on a primary partition to be able to use it with the
 somewhat weird setup I've got (one button boots the mbr, another button
 boots the grub-associated bootrecord)

 In grub legacy it was a simple matter of specifying to install to (hd0,3)
 (or sda4). But in the new grub2 this no longer works and just gives
 grub-setup: error: no such partition or Invalid device `/dev/sda4'.
 I've tried grub-setup with --force but no luck.
 Is there any way to use the grub tools to do this, and if not, are there any
 way to do it in a more manual fashion and create the bootrecord image
 correctly and then simply dd the image onto sda4?


 This is the fdisk output, goal is to have the mbr (br) on sda4 boot grub
 files from sda6

 Disk /dev/sda: 320.1 GB, 320072933376 bytes
 255 heads, 63 sectors/track, 38913 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 Disk identifier: 0x0080

    Device Boot  Start End  Blocks   Id  System
 /dev/sda1   1    2550    20482843+  c7  Syrinx
 /dev/sda2    2551    6375    3072    7  HPFS/NTFS
 /dev/sda3    6375   10836    35837098    7  HPFS/NTFS
 /dev/sda4   *   10837   38913   225528502+   f  W95 Ext'd (LBA)
 /dev/sda5   10837   35726   199928893+   7  HPFS/NTFS
 /dev/sda6   35727   38427    21695751   83  Linux
 /dev/sda7   38428   38913 3903763+  82  Linux swap / Solaris


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



Have you tried using (hd0,6) and installing to the area at the start
of your linux filesystem?


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


Re: grub-mkimage error on mac mini

2010-03-21 Thread Michael Evans
On Sun, Mar 21, 2010 at 9:42 AM, Николай Широковский
nshyrokovs...@gmail.com wrote:
 Hello.
 I've builded grub-1.97.2 on mac mini.
 Just ./configure and make. The last has errors on install stage - install-sh
 had 644 permissions, so i change to 755 and make seems to complete his job
 after it.
 Then i ran grub-mkimage as described in mac wiki page and get an error:
 unresolved symbol memcmp.
 How can i fix it?
 ___
 Help-grub mailing list
 Help-grub@gnu.org
 http://lists.gnu.org/mailman/listinfo/help-grub



memcmp should be part of the standard c library; included via string.h

As part of the standard library, this should only go wrong if you lack
the -dev packages for it or are not compiling against the same target
platform as your libraries.


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


Re: booting from a raid1

2010-10-08 Thread Michael Evans
On Fri, Oct 8, 2010 at 9:34 AM, lee l...@yun.yagibdah.de wrote:
 On Fri, Oct 08, 2010 at 10:30:23AM -0500, Chris Weber wrote:
  Now I can boot from /dev/sdd, but the kernel panics because it can't
  mount the root filesystem (/dev/md0p2). Entries in /etc/fstab on md0p2
  are correct. I take it the md-devices aren't up/accessible in time.
 
  Any idea what's missing? Like there's no RAID support in grub?
 
  ___
  Help-grub mailing list
  Help-grub@gnu.org
  http://lists.gnu.org/mailman/listinfo/help-grub
 
 
  Have you made a new initrd that has md and/or raid support?  I ran

 I'm guessing that you might need an extra module for raid support and
 maybe some extra lines in init, but maybe this will help get you
 started.

 All that's needed for booting is compiled into the kernel, I'm not
 using initrd at all. Not using initrd makes things a lot easier ...

 The question probably is why the kernel doesn't seem to know about the
 RAID devices. If I understand things correctly, those might be started
 only after the root partition has been mounted. If that is true,
 having the root partition on a software RAID device would be generally
 impossible --- unless grub (or whatever else) does something to make
 them available to the kernel so that the root partition can be
 mounted.

 Now I can speculate that when having a root partition on a software
 RAID device that is not partitioned, the boot process is cheating in
 that the kernel first mounts the root partition from one of the
 physical disks the RAID device is made from and later somehow changes
 to the actual RAID device. That might explain why it's not possible to
 boot from a RAID5.

 Does anyone know how this works?

 There have been Debian installers that asked the user who created RAID
 devices during the installation which devices would have to be brought
 up at boot time. Recent installers don't seem to ask that
 anymore. This leads to wondering why the partition type raid
 autodetect is deprecated and wheather it is nevertheless required
 when the root partition is on a RAID device or not.

 In any case, before the root partition is mounted,
 /etc/mdadm/mdadm.conf cannot be read. So how can the software RAID
 devices be brought up before the root partition is mounted?

 How does one tell grub to bring up the software RAID devices? It seems
 that the modules raid and mdraid are required, and I've put them
 into the grub.cnf. Perhaps I also need to put some information into
 grub.cnf about what physical devices/partitions to use to bring up the
 RAID devices. But how do I do that?

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


If you're doing root off of software raid under Linux one of two
things is happening:

Thing 1: Kernel + initrd; md can be module or compiled in; some method
for adding devices to raid arrays (I typically pull in a full mdadm
for my custom initrds, but more minimal options exist that don't
provide as many disaster recovery tools).  Part of the pre-root
environment will setup the basic system devices and then transfer
control to them when the initrd/initramfs is complete.

Thing 2: Older deprecated; using md 0.90 labels in kernel (not as
module) auto assembly.

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