Arch 0.7 ISO -- Grub Install Bug?

I only encountered two odd issues during the installation of Arch using the 0.7 final ISO. One of them was that when I attempted to install grub to the root partition, the installer only gave me a list of existing partitions up to dev/hda9 as possible options. Although there were several more (including the arch root and home partitions), the list would not scroll down past that hda9 partition.
I submitted to the will of the installer, and instead edited the lilo.conf file by changing the boot directory to boot=/dev/discs/disc0/part12, which is where I would have installed grub if given the option. But lilo installed fine of course using this method and all is well.
I would have preferred grub, but lilo is fine and I am familiar with using it as a bootloader so in the end it's no big deal. I just wondered if this might be a bug in the installer ... or ... horror, an operator error.

That was a bug in the installer.  Fixed for the next release.
Thanks!

Similar Messages

  • [SOLVED] grub-install command failing for UEFI

    I downloaded the 8/2013 iso and burned it with dd. I have an ASUS Rampage IV Extreme motherboard. I was booted into efi mode on both the ISO and in the chroot (the /sys/firmware/efi directory did exist).
    I followed the instructions in the Beginner's Guide, but with a 512 MB EFI partition as sda1, 50 GB root as sda2, the rest of my 256 GB SSD as /home, and a 100 GB space on my HDD as /tmp. Everything was ext4 and the EFI partition was a fat32. The EFI partition was mounted on /boot of the new install, as the beginner's guide stated it should be
    Everything worked until I get to the part of installing GRUB. Before installing, I again confirmed that /sys/firmware/efi existed. When booting, on the motherboard boot selection screen, it showed 2 options for my USB, one with the name of my drive and another with [UEFI] in front of the drive name. I selected the UEFI option, so I was booted into UEFI mode, and the USB's bootloader also gave options to boot into a UEFI shell instead of the standard Arch ISO bootloader I get on MBR computers (though I did not try those EFI shell options). I looked into te /sys/firmware/efi/efivars directory and it had 2 items in it
    Going back to the chroot's / directory, I did the first command in the guide for installing grub (after installing grub and efibootmgr with pacman).
    umount /sys/firmware/efi/efivarsk
    This gave the error that the directory was not mounted
    modprobe -r efivars and modprobe efivars worked correctly (or at least they didn't output any errors).
    When I got to
    grub-install --efi-directory=/boot --bootloader-id=arch_grub --recheck
    it gave this error:
    Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
    I searched around on the interwebs and for every other person this problem was occuring because they were booted into BIOS mode instead of UEFI mode, and booting the USB into UEFI mode fixed the problem for them. However, the /sys/firmware/efi directory exists and I made sure to boot into EFI mode in the BIOS.
    Are there any other reasons that this could be happening?
    Also, is there really any advantage to GPT/EFI booting over GPT/BIOS booting other than a 1-2 second shorter boot time?
    Last edited by subraizada3 (2013-08-23 21:10:37)

    You burnt it to CD?DVD, right? Not dd? Because that won't create an EFI bootable USB key, for example.
    modprobe efivars never gives errors (that I've seen). The question is whether the directories are populated. It isn't enough for /sys/firmware/efi to exist. /sys/firmware/efi/vars/ should be full of a *lot* of stuff. In fact /sys/firmware/efi/efivars/ should have lots of stuff before you umount it.
    Did you modprobe before arch-chroot? That's essential if the installed kernel is different from the one on the installer (which is very likely).
    I think you are confused. There's no such thing as GPT/MBR booting.
    GPT and MBR are 2 ways of partitioning disks. GPT has various advantages explained on the wiki page.
    EFI and BIOS are 2 ways of booting.
    In my personal opinion, if BIOS booting works for you, I'd stick with BIOS. EFI is buggy - why be a guinea pig if you can help it?
    Also in my personal opinion, if you can only use GPT in EFI mode, it is worth the hassle to use EFI to reap the benefits of GPT.
    At least, those are the decisions I made. Nothing will convince my laptop to boot BIOS mode with a GPT disk. MBR+BIOS is fine but GPT+BIOS is a non-starter. So I use GPT+EFI.  On machines that don't care, I prefer BIOS+GPT.
    If you are dual booting Windows, I believe BIOS+GPT may not be an option but I'm not certain of this.
    Your kilometres may vary.
    By the way, you almost certainly do not want a partition for /tmp unless you are extraordinarily short of RAM and even then...

  • GRUB-install weirdness

    When I installed Arch I decided not to install its GRUB in the MBR, leaving that to Mepis, which I have on another partition. Now I've decided to get rid of Mepis; before doing that, I want to install Arch's GRUB in the MBR.
    I followed the directions in my Knoppix book for reinstalling GRUB in the MBR. Using a Knoppix disk I mounted my Arch partition (hda6) and tried to run grub-install:
    root@1[root]# mount -o dev,rw /mnt/hda6
    root@1[root]# chroot /mnt/hda6 grub-install /dev/hda
    /dev/hda: Not found or not a block device.
    Then on a whim I tried reinstalling Mepis' GRUB (Mepis is hdb1) in the MBR:
    root@1[root]# mount -o dev,rw /mnt/hdb1
    root@1[root]# chroot /mnt/hdb1 grub-install /dev/hda
    Installation finished. No error reported.
    This is the contents of the device map /boot/grub/device.map.
    Check if this is correct or not. If any of the lines is incorrect,
    fix it and re-run the script `grub-install'.
    (hd0) /dev/hda
    (hd1) /dev/hdb
    (hd2) /dev/sda
    Why this discrepancy--why the /dev/hda error in the first case but not the second? Is this a GRUB bug or am I missing something? I also tried this with the Mepis CD, with the same results. Thanks.

    I tried mount --bind dev/proc but it did not solve the problem. I got an error message stating that /dev/hda was not a valid BIOS drive. When I Googled the error message I found a post on the Mandriva forums from a person with the same problem, who found that it was caused by the lack of (hdx) info in /boot/grub/device.map.
    Sure enough, I looked in my Arch device.map and found no hd info. I was wondering if this had something to do with udev--I'm still not very udev-savvy. Other distros I have installed that don't use udev (like the Mepis I partition) had device.map listings with hd mapping. Anyway, I added (hd0) /dev/hda to Arch's device.map and GRUB installed in the MBR like I wanted. Just wondering, though, will this mess with udev?

  • [SOLVED]Grub-Install can't Find Kernel and/or initrd, mkinitcpio Fails

    Hi all,
    I have recently installed Arch on my new build (with UEFI firmware). I successfully set up xorg, alsa/pulseaudio, xfce, etc... things were looking pretty good. Then, I tried to blacklist the pcspkr in order to silence the annoying beep every time I selected "Log Out" inside xfce. I executed
    mkinitcpio -p linux
    and was presented with the following errors:
    ==> Building image from preset: 'default'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    ==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
    ==> Building image from preset: 'fallback'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    ==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux`
    There were no such files anywhere on /boot. I tried doing
    find / -name vmlinuz-linux
    and nothing was found. I wasn't quite sure why that was happening, but I tried uninstalling/reinstall grub (grub-common and grub2-efi-x86_64). I installed grub to /boot using
    grub-install --directory=/usr/lib/grub/x86_64-efi --target=x86_64-efi --efi-directory=/boot --bootloader-id="Arch Linux" --boot-directory=/boot --recheck --debug
    and then generated /boot/grub/grub.cfg. I tried rebuilding the initramfs again but got the same error. I was tired and frustrated so I removed the old grub efi entry with
    efibootmgr -b 0 -B
    and then went to sleep.
    I didn't have the chance to turn the computer back on until tonight... I was then presented with a grub2 shell. Since I didn't know where the kernel/initrd were located I tried
    set root=(hd1,gpt1)
    chainloader +1
    but grub told me
    error: invalid EFI file path
    So that's about it. It appears that grub-mkconfig is having trouble locating the kernel/initrd so it doesn't make any entries, dropping me right into a shell. I've tried booting up with my installation USB and chrooting in and reinstalling grub again but nothing seems to work. So what I'd like to try to do is just boot up into my system and then modify add the grub boot entries entries I want... but I just can't figure out what's causing all these issues.
    Sorry if I mess up any terminology... still learning the ropes here. Thanks for any input.
    Last edited by cogeary (2012-09-17 05:35:51)

    DSpider wrote:
    ==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
    Probably because you have a separate boot partition (not just the 512 MB "UEFISYS" FAT32 partition), which you forgot to mount (in fstab).
    Post your /etc/fstab.
    Thank you for your reply!
    However, I do not have a separate boot partition apart from the "UEFISYS" partition. Here is my fstab:
    # UUID=3ec307aa-0ead-4d33-b292-42bbe783d6ee
    /dev/sda2 / ext4 rw,relatime,data=ordered 0 1
    # UUID=B192-6C57
    /dev/sda1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
    When I first looked at the fstab I saw that both of the entries repeated themselves. This was because I had even tried reformatting /boot so I had to generate a new fstab, but for some reason I used ">> /mnt/etc/fstab" rather than "> ..."
    So I executed
    genfstab /mnt > /mnt/etc/fstab
    and reinstalled grub, but still no difference... mkinitcpio fails and I reboot to a grub shell.
    Last edited by cogeary (2012-09-16 18:15:51)

  • Arch 0.7 ISO: wrong udev setup?

    I recently installed a PC for a friend with the Arch 0.7 ISO. I have 2 questions on the default udev setup.
    1) lilo.conf
    Our bootloader was lilo. When we changed the udev permissions, our changes were ignored. We solved the problem by appending "devfs=nomount" to our boot line in the lilo.conf (thanks Wiki ). That was missing in the default lilo.conf
    Could that option be added to the default lilo.conf?
    2) fstab
    in the default fstab, sysfs is mounted. On the wiki (http://wiki.archlinux.org/index.php/UdevHowTo) it is said to unmount sysfs.
    Which is better: keep sysfs, or unmount it?
    Thanks is advance!

    zezaz wrote:
    I recently installed a PC for a friend with the Arch 0.7 ISO. I have 2 questions on the default udev setup.
    1) lilo.conf
    Our bootloader was lilo. When we changed the udev permissions, our changes were ignored. We solved the problem by appending "devfs=nomount" to our boot line in the lilo.conf (thanks Wiki ). That was missing in the default lilo.conf
    Could that option be added to the default lilo.conf?
    Yea, you have to add the "devfs=nomount" part manually.  I'm still on the fence on that one, as I don't want to have the defaults break things for kernel 2.4.x users (udev won't work for them, afaik).
    2) fstab
    in the default fstab, sysfs is mounted. On the wiki (http://wiki.archlinux.org/index.php/UdevHowTo) it is said to unmount sysfs.
    Which is better: keep sysfs, or unmount it?
    Doesn't matter, actually.  You can remove it from your /etc/fstab altogether, as it (and /proc) will be explicitly mounted in /etc/rc.sysinit at boot-up.

  • [SOLVED][GRUB]Install problem with the new method

    Hi,
    it is not my first install of Arch Linux but I have a problem with this new kind of installation method, especially with GRUB.
    Here is my hard drives configuration :
    /dev/sda1 -> SSD 120 GB ntfs (windows)
    /dev/sdb1 -> HD 1 TB ext4 (data)
    /dev/sdc :
    /dev/sdc1 -> ext2 /boot
    /dev/sdc2 -> swap
    /dev/sdc3 -> ext4 /
    /dev/sdc5 -> ext4 /home
    During the installation, I installed grub (with grub-install) in /dev/sdc. I assumed it was the correct drive to install it but apparently not, Windows starts automatically and I don't have the grub menu.
    Should I install my system again or is there a way to boot on the livecd and install it ?
    Should I :
    1) mount /dev/sdc3 in /mnt then /dev/sdc1 in /mnt/boot and finally /dev/sdc5 in /mnt/home
    2) pacstrap /mnt grub-bios
    3) arch-chroot
    4) grub-install
    Thank you.
    Last edited by hiveNzin0 (2012-09-12 06:15:15)

    DSpider wrote:
    If you set whatever drive "/dev/sdc" is (brand and model) to boot first in the BIOS, all you need to do is install a bootloader on Arch. You don't even need a separate boot partition. It will use the /boot folder on root partition. Then install os-prober (if you don't already have this installed) and re-generate the .cfg.
    https://wiki.archlinux.org/index.php/Be … bootloader
    The problem is that I cannot select another hard drive. The only one available for the boot order is the Samsung 830 series (/dev/sda with Windows).
    The other options are the CD drive and removable disk.
    I checked that this morning, maybe I was too tired. I will check again this evening.
    But if I am right and I cannot select my intel SSD (containing my arch setup) for the boot order, would the solution I described work ? I don't see why not but my knowledge are basic in Linux.
    Thank you again for your help.

  • Grub-install doesn't overwrite MBR

    So hi!
    I've been hit by quite a peculiar problem a few hours ago and not being able to find a solution to it elsewhere, I came here for help. I had a dual boot of Arch and W7 a long time ago, which had an interesting feature of not letting W7 hibernate (long story short, I connected a GPT partitioned HDD, W7 detected it and started messing around with recovery partitions and whatnots; when I repartitioned it with MBR and installed Arch on it, W7 cried its "boot configuration data store" (?) is missing, started coming back to desktop after hibernation request and I couldn't do anything with utilities pertaining to the issue). Since I wasn't using Arch much at the time on that PC, I had to sacrifice GRUB in order to get myself a properly working Windows installation. Whatever I've done to the disk that time, it worked nicely, until I decided to boot into Arch. Not finding a GRUB there wasn't a surprise, but here's the problem I found after chrooting into it from a live USB:
    I followed the standard procedure for restoring GRUB, as follows:
    1. mount partitions;
    2. arch-chroot into the installation;
    3. execute
    # grub-install --target=i386-pc --recheck /dev/sda
    # grub-mkconfig -o /boot/grub/grub.cfg
    (neither of which mentioned any problems)
    4. exit, umount -R, reboot,
    But, sadly, it didn't boot. It hang before any message came from GRUB, as if there was a corrupted bootsector (normally, it should show a message saying this media is not a bootable device or something along these lines, right?). I booted into the live USB again and checked what file -s /dev/sda had to say, and lo and behold,
    /dev/sda: DOS/MBR boot sector
    So I'm kind of flabbergasted about the reasons for which grub-install couldn't overwrite the MBR correctly. I'd appreciate any ideas as to whether that's what actually happened and why.
    Great thanks for your time,
    yakcyll~
    Last edited by yakcyll (2014-06-20 16:50:32)

    Rexilion wrote:
    Highly likely as Grub depends on the disk ordering by the BIOS as to determine what disk get's booted first. Again, highly likely as I'm not entirely sure. For all I know Grub installs a payload at the beginning of the disk (MBR) and then wires it up with fs drivers so it can boot it's second stage data. This would not require a BIOS for helping out as the sata drivers can do this.
    However, it does create and handle a device.map file containing the order of disks (or whatever).
    Why not enable the disk inside the bios and try again? But could you also confirm that wiping the MBR with dd and reinstalling with Grub did not fix the issue?
    So I did enable it there, while having all the other disks out of the case, and tried to grub-install from live USB, but to no avail (still shows up as DOS/MBR boot sector and doesn't boot, but grub-install doesn't report any errors). I tried wiping the first 446 bytes and then reissuing grub-install, but that made no difference either (the disk identifier got zeroed out though) - it still shows up as a dos/mbr boot sector (when I issued file -s /dev/sda in between dd and grub-install, it also presented me with the partition table itself, the information about which is missing otherwise). Next thing to try is probably do a chrooted upgrade of the system from live USB (or just GRUB itself).
    EDIT: So hexdump presents the first four bytes of /dev/sda as 0xeb63 0x9000. As far as I know, MBR's signature is 0xAA55, so why isn't it there? There is one occurence of 0xaa55 there, but it's somewhere in the middle and it's not aligned to double word boundary, so I'm not sure if that's relevant. Nevermind, I forgot the MBR signature is supposed to be at the end of the sector.
    Last edited by yakcyll (2014-06-22 13:39:04)

  • Grub-install fails to install core.img to boot partition

    I am trying to reinstall Arch onto a Dell Precision T3600 workstation, where it used to work fine, but I am stuck at the booloader step.
    Details:
    1. I have only one disk, partioned with gpt.
    2. I am using Grub with Bios
    3. As per installation instructions (preliminary requirements, BIOS systems), I created a 1007KiB boot partition at the beginning of the disk, of type ef02.
        The partition (which is umber 5 in my partition table) goes from sector 34 to sector 2047
    4. I mounted the root partition to /mnt, arch-chroot'd into it, and ran
    # grub-install --target=i386-pc --recheck --debug /dev/sdx
    # grub-mkconfig -o /boot/grub/grub.cfg
    5. I generated the /boot/grub.cfg file with the recommended
    # grub-mkconfig -o /boot/grub/grub.cfg
    Results:
    when I try to boot, grub starts, but it cannot find anything to boot from and drops me into its shell.
    Furthermore (this may be unrelated), when I take a look at the dis again (after rebooting from the install disk), I see that the gpt partition table is corrupted. Exact message  from gdisk is:
    Caution: invalid backup GPT header, but valid main header: regenerating backup header from main header:
    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: damaged
    Can anyone tell me where I am going wrong? The Installation manual is not very explicit on how to deal with the (very small) boot partition. Is grub-install supposed to create the core.img file even when the partition is not mounted? Or should it be mounted. It certainly cannot contain eveyrthing that goes into /boot (which is over 100Mb).
    Thanks for the help

    Head_on_a_Stick wrote:
    Your partition table is corrupted; you could clear it using:
    # dd if=/dev/zero of=/dev/sd<x> bs=512 count=1; sync
    Then use gdisk to recreate your partition table and re-install.
    Alternatively, you could ask gdisk to re-create the backup GPT header from the main header: start up the program & press "r" followed by "d".
    I had already fixed the partition table exactly as you suggested---sorry for not having been clear. It still does not boot. 
    Head_on_a_Stick wrote:
    Your partition table is corrupted; you could clear it using:
    If it still will not boot, post your /boot/grub/grub.cfg along with the output of:
    # gdisk -l /dev/sd<x>
    lsblk -f
    Here they are:
    /boot/grub.cfg:
    # DO NOT EDIT THIS FILE
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    ### BEGIN /etc/grub.d/00_header ###
    insmod part_gpt
    insmod part_msdos
    if [ -s $prefix/grubenv ]; then
    load_env
    fi
    if [ "${next_entry}" ] ; then
    set default="${next_entry}"
    set next_entry=
    save_env next_entry
    set boot_once=true
    else
    set default="0"
    fi
    if [ x"${feature_menuentry_id}" = xy ]; then
    menuentry_id_option="--id"
    else
    menuentry_id_option=""
    fi
    export menuentry_id_option
    if [ "${prev_saved_entry}" ]; then
    set saved_entry="${prev_saved_entry}"
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi
    function savedefault {
    if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
    fi
    function load_video {
    if [ x$feature_all_video_module = xy ]; then
    insmod all_video
    else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
    fi
    if [ x$feature_default_font_path = xy ] ; then
    font=unicode
    else
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt3'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 74c69286-1775-44de-90c8-3834585da6b6
    else
    search --no-floppy --fs-uuid --set=root 74c69286-1775-44de-90c8-3834585da6b6
    fi
    font="/usr/share/grub/unicode.pf2"
    fi
    if loadfont $font ; then
    set gfxmode=auto
    load_video
    insmod gfxterm
    set locale_dir=$prefix/locale
    set lang=en_US
    insmod gettext
    fi
    terminal_input console
    terminal_output gfxterm
    if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
    # Fallback normal timeout code in case the timeout_style feature is
    # unavailable.
    else
    set timeout=5
    fi
    ### END /etc/grub.d/00_header ###
    ### BEGIN /etc/grub.d/10_linux ###
    ### END /etc/grub.d/10_linux ###
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f ${config_directory}/custom.cfg ]; then
    source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
    source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    ### BEGIN /etc/grub.d/60_memtest86+ ###
    ### END /etc/grub.d/60_memtest86+ ###
    lsblk -f (sda1 is the swap partition, sda5 is the boot partition):
    NAME FSTYPE LABEL UUID MOUNTPOINT
    sda
    sda1
    sda3 /
    sda4 /home
    sda5
    sr0
    loop0
    loop1
    arch_root-image /etc/resolv.conf
    loop2
    arch_root-image /etc/resolv.conf
    Finally, here is the partition table from gdisk -l
    GPT fdisk (gdisk) version 0.8.10
    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 1953525168 sectors, 931.5 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): 8B675D08-1A4A-44D3-ADC3-A7763E331455
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1953525134
    Partitions will be aligned on 8-sector boundaries
    Total free space is 0 sectors (0 bytes)
    Number Start (sector) End (sector) Size Code Name
    1 2048 67112959 32.0 GiB 8200 Linux swap
    3 67112960 276828159 100.0 GiB 8300 Linux filesystem
    4 276828160 1953525134 799.5 GiB 8300 Linux filesystem
    5 34 2047 1007.0 KiB EF02 BIOS boot partition

  • Grub-install: "cannot find EFI directory" (CSM mode)

    Hi,
    I'm trying to install grub on the mbr with 'grub-install /dev/sdb', but I get "cannot find EFI directory'. I have an Asus laptop with secure boot disabled and CSM enabled (I *need* CSM because otherwise - I don't know the reason - I can't boot from USB/disk). I have Windows 7 installed (/dev/sdb2) and I know there's a small partition (/dev/sdb1) which was created during Windows 7 installation which contains a 'Boot' directory, a 'bootmgr' file and other stuff. Now, my purpose is to dual boot Windows 7 and Arch while the BIOS is in CSM mode. The problem is that a simple grub-install /dev/sdX does not work as expected (under Gentoo, it simply worked out-of-the-box). By now, I can chroot into my fresh Arch installation (/dev/sdb3). Another thing: possible targets for grub-install are 'i686-pc' and 'x86_64-efi'; when running grub-install the program automatically selects 'x86_64.efi' as target. I don't know if it's correct (I do have an AMD64 laptop, just to clarify). Thanks in advance.

    tant0c1b0 wrote:Hi,
    I'm trying to install grub on the mbr with 'grub-install /dev/sdb', but I get "cannot find EFI directory'. I have an Asus laptop with secure boot disabled and CSM enabled (I *need* CSM because otherwise - I don't know the reason - I can't boot from USB/disk). I have Windows 7 installed (/dev/sdb2) and I know there's a small partition (/dev/sdb1) which was created during Windows 7 installation which contains a 'Boot' directory, a 'bootmgr' file and other stuff. Now, my purpose is to dual boot Windows 7 and Arch while the BIOS is in CSM mode. The problem is that a simple grub-install /dev/sdX does not work as expected (under Gentoo, it simply worked out-of-the-box). By now, I can chroot into my fresh Arch installation (/dev/sdb3). Another thing: possible targets for grub-install are 'i686-pc' and 'x86_64-efi'; when running grub-install the program automatically selects 'x86_64.efi' as target. I don't know if it's correct (I do have an AMD64 laptop, just to clarify). Thanks in advance.
    You are telling the system to act like it is a BIOS system as far as the boot process goes but I don't think you are using a disk with a MBR, master boot record partition table. Is your disk actually GPT? This is a common gotcha when trying to use CSM mode on a UEFI based system since UEFI systems come with GPT disks. I believe this describes Grub installation in your configuration.
    https://wiki.archlinux.org/index.php/GR … structions
    To be clear though, I don't think this is a good direction to go. This isn't keeping things simple though that may have been why you chose to do it. I don't have enough information to know but it sounds like your disk expected to be in a UEFI system and was created with a GPT partition scheme. I would use it that way for Arch and for Windows if you choose to have that installed. I think it creates unneeded complexity to create a hybrid UEFI/BIOS configuration. I would always have all disks using the same partition scheme (the reason you can't boot "USB/disk" may be that you need GPT) and all OS's booting UEFI on a UEFI system.

  • [SOLVED] EFI grub Install problems

    I know this topic has been beat to death but I cannot for the life of me figure this out.
    My Config:
    1 Hard Drive -- /dev/sda
    /dev/sda2 is EFI Partition.
    /dev/sda5 is /mnt/boot   during the install
    /dev/sda6 is /mnt/  during the install
    PC has windows 8.1 installed and booting fine with rEFInd installed.   I run through the basic arch installation and mount my /dev/sda2 to /boot/ like in the beginners guide.
    I chroot and do the commands below: (from the wiki)
    # mount -t efivarfs efivarfs /sys/firmware/efi/efivars # ignore if already mounted
    # pacman -S grub efibootmgr
    # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck
    It installs fine, and then I run:
    # grub-mkconfig -o /boot/grub/grub.cfg
    It completes as well, and im left with a EFI/arch_grub/something.efi and then a /grub folder with the config in it on my EFI partition.
    When I reboot, grub completly takes over and doesnt boot anything.  Just stuck at grub2>... 
    I have to boot off live CD and remove the EFI/arch_grub folder and the other grub folder to be able to boot windows again.
    What am I doing wrong here?
    Any help is appreciated....
    Last edited by skwid (2013-11-19 17:38:01)

    teateawhy wrote:You mounted the boot partition on sda5 to /boot, instead of mounting the ESP on sda2 to /boot. The beginner's guide expects you to mount the ESP to /boot.
    Ok, I went back and re-done the entire thing and made sure I mounted /dev/sda5 to /boot.   That left me with a /boot/EFI folder which my refind and microsoft folders are in.
    Ran through the installs and everything went fine.  I have a /boot/EFI/arch_grub/grubx64.efi file and a /boot/efi/grub/ folder with the grub.cfg file.  No errors.
    Rebooted, and same thing.  reFINd no longer runs first, grub does.  grub is broken because there are no kernel lines or anything.
    When I reboot the PC and select the boot menu in the BIOS, I get a UEFI entry for "arch_grub" and I can select it and it boots to the broken grub.
    I can select rEFInd and it will run, but not automatically like it used to.
    If I remove all the arch_grub and grub folder from my EFI partition, then everything works, but of course, no arch.

  • Trying to install Arch with Ubuntu hardy already installed

    I have Ubuntu already installed on my system and I want to install Arch on a separate 10gig partition ( which is already made) but when I boot from the Arch cd and go to install Arch only sees the main drive it doesn't see anything else what am I doing wrong. I only want to install arch on the 10 gig partition for now until I am more familiar with Linux
    Last edited by Shadowmeph (2008-05-20 17:35:28)

    I have just read that  it is informative but I am not sure of what that will do inorder for me to be able to install Arch on My tem gig partition, when I am in ubuntu I stat gparted to see what the names of my partitions are and this is what it shows /dev/sda3 swap     1gig /dev/ sda2 reiserfs 10 gigs ( where I want to install Arch)  sda1 / Ubuntu how do I install arch onto dev/sda 2 ) the ten gig partition) if arch doesn't see it? do I have to delete the partition or formaste the 10 gig partition differently? I am pretty new to Linux so I am not sure of how to do this.
    this is what my grub looks like
    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.
    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not use 'savedefault' or your
    # array will desync and will not let you boot your system.
    default 0
    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 3
    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    hiddenmenu
    # Pretty colours
    #color cyan/blue white/blue
    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret
    # examples
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below
    ## DO NOT UNCOMMENT THEM, Just edit them to your needs
    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=18573b0e-4906-4c7f-8e32-b544fd854ab5 ro
    ## Setup crashdump menu entries
    ## e.g. crashdump=1
    # crashdump=0
    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,0)
    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true
    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false
    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash
    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false
    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=
    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0
    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single
    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all
    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true
    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false
    ## should update-grub add savedefault to the default options
    ## can be true or false
    # savedefault=false
    ## ## End Default Options ##
    title Ubuntu 8.04, kernel 2.6.24-16-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=18573b0e-4906-4c7f-8e32-b544fd854ab5 ro quiet splash
    initrd /boot/initrd.img-2.6.24-16-generic
    quiet
    title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=18573b0e-4906-4c7f-8e32-b544fd854ab5 ro single
    initrd /boot/initrd.img-2.6.24-16-generic
    title Ubuntu 8.04, memtest86+
    root (hd0,0)
    kernel /boot/memtest86+.bin
    quiet
    ### END DEBIAN AUTOMAGIC KERNELS LIST
    ok edit two I think that I have Arch install but I am not sure of which way to use
    Dual booting with other linux distros
    This is done exactly the same way that Arch linux is loaded. Here we assume that the other distro is on partition [s/h]da3.
    title Other Linux
    root (hd0,2)
    kernel /boot/vmlinuz (add other options here as required)
    initrd /boot/initrd.img (if the other kernel uses/needs one)
    [edit] Dual booting with other linux distro (Chainloading)
    To avoid maintenance nightmare, you might want to chainload the GRUB in the MBR to another bootloader you might have installed in the bootrecord of a partition [(hd0,2) in our example] instead of the MBR. This way the auto-magic stuff of some distro will manage the menu.lst on (hd0,2) (if it is grub) for its own distro and you will boot with all the option needed (like the correct last kernel) without the need to copy/paste some part of that menu.lst into yours.
    In our example [1], GRUB is in the MBR and some other bootloader (BL) (be it grub or lilo) is in the Boot Record of (hd0,2).
    |   |           |           |    %   (hd0,2)     |
    | M |           |           | B  %               |
    | B |  (hd0,0)  |  (hd0,1)  | L  %  Other        |
    | R |           |           |    %  Distro       |
    |   |           |           |    %               |
      |                            ^
      |     chainloading           |
    Then, you simply use in your menu.lst:
    title Other Linux distro
    root (hd0,2)
    chainloader +1
    Last edited by Shadowmeph (2008-05-20 17:56:20)

  • [Solved] grub-install hangs

    I have an install of ARCH linux on a 2 partitioned hard drive with Ubuntu on a separate partition. Originally the drive contained a 64 bit version of Ubuntu on the first partition. I moved the drive to a different (32 bit) computer and installed 32 bit Ubuntu on the second partition. I then reformatted the first partition and installed 32 bit ARCH running update-grub from Ubuntu which found the new ARCH installation without any difficulty. As this seems to be becoming my main distribution I would like to reinstall grub2 from ARCH. I installed grub2 from the extra repository (1.98-5). When I enter 'sudo grub-install /dev/sda' the command hangs indefinitely. I attempted this in single user mode as well.
    I did note the following appearing in /var/log/errors.log and the kernel log:
    Aug 18 14:02:46 localhost kernel: end_request: I/O error, dev fd0, sector 0
    .. (repeated several times... eventually...)
    Aug 18 17:20:54 localhost kernel: Buffer I/O error on device fd0, logical block 0
    This seems odd as I don't have a floppy drive connected. Running grub install with the --no-floppy option produced the same result.
    EDITED TO ADD: It appears as though the floppy drive related errors are occurring specifically when grub-install is executing. Further they seem to occur when the --no-floppy flag is included.  It appears as though the script is stuck repeatedly trying to access the floppy drive despite the flag.
    EDITED WITH SOLUTION: I disabled the floppy drive in the system bios (no drive is/was connected) and grub installed without issue. I didn't realize I had the non-existent drive enabled as oddly ubuntu had no problem with installing grub while the ARCH version ignored my explicit instructions to disregard the floppy drive.
    Any suggestions most appreciated!
    Last edited by scotths (2010-08-19 17:44:11)

    I have an install of ARCH linux on a 2 partitioned hard drive with Ubuntu on a separate partition. Originally the drive contained a 64 bit version of Ubuntu on the first partition. I moved the drive to a different (32 bit) computer and installed 32 bit Ubuntu on the second partition. I then reformatted the first partition and installed 32 bit ARCH running update-grub from Ubuntu which found the new ARCH installation without any difficulty. As this seems to be becoming my main distribution I would like to reinstall grub2 from ARCH. I installed grub2 from the extra repository (1.98-5). When I enter 'sudo grub-install /dev/sda' the command hangs indefinitely. I attempted this in single user mode as well.
    I did note the following appearing in /var/log/errors.log and the kernel log:
    Aug 18 14:02:46 localhost kernel: end_request: I/O error, dev fd0, sector 0
    .. (repeated several times... eventually...)
    Aug 18 17:20:54 localhost kernel: Buffer I/O error on device fd0, logical block 0
    This seems odd as I don't have a floppy drive connected. Running grub install with the --no-floppy option produced the same result.
    EDITED TO ADD: It appears as though the floppy drive related errors are occurring specifically when grub-install is executing. Further they seem to occur when the --no-floppy flag is included.  It appears as though the script is stuck repeatedly trying to access the floppy drive despite the flag.
    EDITED WITH SOLUTION: I disabled the floppy drive in the system bios (no drive is/was connected) and grub installed without issue. I didn't realize I had the non-existent drive enabled as oddly ubuntu had no problem with installing grub while the ARCH version ignored my explicit instructions to disregard the floppy drive.
    Any suggestions most appreciated!
    Last edited by scotths (2010-08-19 17:44:11)

  • Arch, Windows Multiboot with Grub - overwrites Windows MBR

    Hi,
    I'm not sure, if I understand the way it works right.
    Each partition has a boot record. Windows is at /dev/sda1, so there is a boot record at the beginning of this partition. /dev/sda2 is System reserverd for Windows.
    And my archlinux is at /dev/sda3 (yes only one partition, so its easier for the installation ).
    I installed grub with:
    # modprobe dm-mod
    # grub-install --recheck /dev/sda
    # grub-mkconfig -o /boot/grub/grub.cfg
    (the way its descripted in the wiki)
    So far I know it writes a master boot record at the beginning of /dev/sda.
    But the disk starts with the windows partition so it overwrites the boot record on /dev/sda1 (the windows boot record).
    Is that true so far?
    Its the way I did it last time I tried to install Grub. The result: I couldnt start Windows anymore (Grub only showed arch).
    As solution I have to provide space at the beginning of the disk? So the master boot record will be installed at that space?
    Best regards Helmsen

    You could simply create a persistent entry with one of the /etc/grub.d/*custom files.  Then you could avoid installing os-prober.  But it sounds like in your case, the automation of grub is soemthing you are after.  So go ahead and install os-prober, and let it do its thing.
    As a new Arch user I thought that grub2's automagic configuration was pretty cool. But at the time I was still distro-hopping, so it took about a week before I realized how not cool it really was.

  • Dual boot Arch / Windows 8 with grub, uefi and gpt

    hi,
    (my aplogies for my bad english)
    after a fresh installation without worries I have one last problem : starting w8
    Partitions :
    [root@ToshCM christian]# gdisk -l /dev/sda
    GPT fdisk (gdisk) version 0.8.7
    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 1465149168 sectors, 698.6 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): BAE3660C-FC6F-11E1-9C45-C6B1BB081CD7
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 1465149134
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 3757 sectors (1.8 MiB)
    Number Start (sector) End (sector) Size Code Name
    1 2048 923647 450.0 MiB 2700 Basic data partition
    2 923648 1456127 260.0 MiB EF00 Basic data partition
    3 1456128 1718271 128.0 MiB 0C01 Basic data partition
    4 1718272 1230518271 585.9 GiB 0700 Basic data partition
    5 1445343232 1465147391 9.4 GiB 2700 Basic data partition
    6 1230518272 1250998271 9.8 GiB 8200
    7 1250998272 1291958271 19.5 GiB 8300
    8 1291958272 1445343231 73.1 GiB 8300
    2 = efi (fat32)
    4 = Windows (ntfs)
    6 = swap
    7 = /
    8 = /home
    EFI partition is mounted in /boot/efi
    [root@ToshCM christian]# grep efi /etc/fstab
    UUID=7CD3-EE8E /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
    For now I have a grub that works perfectly without Windows
    Now I try to follow this page
    [root@ToshCM christian]# grub-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
    7CD3-EE8E
    [root@ToshCM christian]# grub-probe --target=hints_string /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
    --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2
    I put the result in /etc//grub.d/40_custom
    [root@ToshCM christian]# cat /etc/grub.d/40_custom
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7CD3-EE8E
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    I regenerates grub.cfg
    grub-mkconfig -o /boot/grub/grub.cfg
    I check the result in /boot/grub/grub.cfg
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7CD3-EE8E
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    ### END /etc/grub.d/40_custom ###
    After reboot I can see a fine line with Windows but it has no effect, neither start nor error message
    The computer is a Toshiba Satellite C855-1TM
    In the BIOS Advanced page "Boot Mode" is [UEFI Boot]
    In the Security page "Secure Boot" is [Disabled]
    Thanks in advance

    vintherine wrote:
    the.ridikulus.rat wrote:
    @vintherine: Everything you mentioned in the 1st post is correct. In your case the correct commands should be:
    grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
    grub-mkconfig -o /boot/grub/grub.cfg
    Thanks. I've tried that, get now a single line with Windows, which does not work
    EDIT: Are you able to boot Windows independent of GRUB, ie. directly from the firmware boot menu?
    I've tried F12 key, found a menu, started on the HD, found a new menu corresponding with the EFI directories (arch_grub, Microsoft....). Microsoft entry sent me on... grub menu
    EDIT: Can you try (note the extra line : "set gfxpayload=keep")
    It's time for diner (i'm in France). I'll see this in the next hour.
    Many thanks
    Seems like the actual Windows bootmgfw.efi was overwritten by grubx64.efi or something else. In the boot menu Windows's entry (created by Windows installer) is usually titled "Windows Boot Manager".
    EDIT:
    Try this. Copy the files from Windows's C:\Windows\Boot\EFI to <EFISYS>/EFI/Microsoft/Boot/ . Overwrite any exisitng files, and make sure <EFISYS>/EFI/Microsoft/Boot/BCD file exists. That is the Windows equivalent of grub.cfg (although BCD cannot be read easily since it is not a text file). Try your menuentry again.
    Last edited by the.ridikulus.rat (2013-09-27 18:29:09)

  • Grub install option in Solaris Express 11

    I am tryin to install OracleSolaris 11 express 201011 from live cd,but found some critical options missing(which are there in other linux/opensolaris distros)
    *Advanced Grub install option( whether to mbr or to the particular solaris install parition)
    Since i have a mutiboot of --
    Vista(the primary boot loader)(soon be upgrading to win7)
    |
    |---Neogrub (chainloads)
    |
    |--Ubuntu,Kubuntu,fedora,(solaris 11 ???)
    can i achieve this configuration ?will solaris 11 grub remove the vista boot loader from mbr?
    Thanks in advance

    I am tryin to install OracleSolaris 11 express 201011 from live cd,but found some critical options missing(which are there in other linux/opensolaris distros)
    *Advanced Grub install option( whether to mbr or to the particular solaris install parition)There isn't an option for this with OpenSolaris or Solaris 11 Express. It just overwrites the MBR without asking.
    Since i have a mutiboot of --
    Vista(the primary boot loader)(soon be upgrading to win7)An entry should be created for you by default.
    |---Neogrub (chainloads)No idea.
    |--Ubuntu,Kubuntu,fedora,(solaris 11 ???)In order to boot any of the Linux Operating Systems it's boot partition has to be extfs2 otherwise the GRUB that comes with OpenSolaris will not understand it. I learned that one the hard way trying to figure out why it couldn't read an extfs4 partition. It can't.
    can i achieve this configuration ?will solaris 11 grub remove the vista boot loader from mbr?yep.
    alan

Maybe you are looking for